URL for sending a user to the app review page on device’s app store

Update: iOS 4.2 seems to have fixed this and links now open the App Store app directly rather than the review page. This article Dissecting iTunes links explains everything. Heading straight to a review form It’s also possible to send someone straight to the review form for an app. https://userpub.itunes.apple.com/WebObjects/MZUserPublishing.woa/wa/addUserReview?id=337064413&type=Purple+Software Simply replace the ID with … Read more

Detect iPhone/iPad purely by css

iPhone & iPod touch: <link rel=”stylesheet” media=”only screen and (max-device-width: 480px)” href=”https://stackoverflow.com/questions/3839809/iphone.css” type=”text/css” /> iPhone 4 & iPod touch 4G: <link rel=”stylesheet” media=”only screen and (-webkit-min-device-pixel-ratio: 2)” type=”text/css” href=”https://stackoverflow.com/questions/3839809/iphone4.css” /> iPad: <link rel=”stylesheet” media=”only screen and (max-device-width: 1024px)” href=”https://stackoverflow.com/questions/3839809/ipad.css” type=”text/css” />

Detect the current top cell in a UITableView after scrolling

You could try using UITableView‘s -indexPathsForVisibleRows or -indexPathForRowAtPoint. For example, let’s say that you want to print the indexPath of the topmost visible cell, when you stop dragging your table. You could do something like this: – (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{ NSIndexPath *firstVisibleIndexPath = [[self.tableView indexPathsForVisibleRows] objectAtIndex:0]; NSLog(@”first visible cell’s section: %i, row: %i”, firstVisibleIndexPath.section, firstVisibleIndexPath.row); … Read more

Change the width of Master in UISplitViewController

If you subclass UISplitViewController, you can implement -viewDidLayoutSubviews and adjust the width there. This is clean, no hacks or private APIs, and works even with rotation. – (void)viewDidLayoutSubviews { const CGFloat kMasterViewWidth = 240.0; UIViewController *masterViewController = [self.viewControllers objectAtIndex:0]; UIViewController *detailViewController = [self.viewControllers objectAtIndex:1]; if (detailViewController.view.frame.origin.x > 0.0) { // Adjust the width of the … Read more