标签:blog http 使用 io for ar cti html log
1、初始化UIPopoverController
UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:navigationController];
//必须是个 ViewController
/*且该 ViewController的 viewDidLoad方法中要设置其在popover中的尺寸,如
self.contentSizeForViewInPopover = CGSizeMake(300.0, 280.0);
*/
self.recentSearchesPopoverController = popover;
recentSearchesPopoverController.delegate = self; //self要实现UIPopoverControllerDelegate协议
2、设置当popover弹出时,用户仍可以交互的视图
// Ensure the popover is not dismissed if the user taps in the search bar.
popover.passthroughViews = [NSArray arrayWithObject:searchBar];
3、展现popover
[self.recentSearchesPopoverController presentPopoverFromRect:self.searchBar.bounds
inView:self.searchBar
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:NO];
4、消失popover
//dismiss the popover.
[recentSearchesPopoverController dismissPopoverAnimated:YES];
5、实现 UIPopoverControllerDelegate协议的方法
- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController {
}
原文地址:http://www.cnblogs.com/zhulin/archive/2011/02/28/1967354.html
标签:blog http 使用 io for ar cti html log
原文地址:http://www.cnblogs.com/gaoenjoy/p/3935170.html