|Index|>>
Add callback for after rotation.
Use Notification like this:
in viewDidLoad
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:UIDeviceOrientationDidChangeNotification object:nil];
Then I used CGPointCenter instead of frame origin.x and origin.y for CGRectMake.
Check this warning.
2013-08-19 12:03:18.817 generika[99638:c07] Presenting action sheet clipped by its superview. \ Some controls might not respond to touches. On iPhone try -[UIActionSheet showFromTabBar:] or -[UIActionSheet showFromToolbar:] \ instead of -[UIActionSheet showInView:].
Then, I removed unused toolbar from current webview.
use NSPredicate
for mathch (instead of compare) like this:
How to use key and value in NSPredicate
- (void)filterContentForSearchText:(NSString *)searchText scope:(NSString *)scope { [self.filtered removeAllObjects]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"%K contains[cd] %@", @"name", searchText]; self.filtered = [NSMutableArray arrayWithArray:[self.products filteredArrayUsingPredicate:predicate]]; }