首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

IOS4 note 五(2)

2012-07-01 
IOS4 note 5(2)??In this example, we used the presentPopoverFromBarButtonItem:permittedArrowDirectio

IOS4 note 5(2)

?

?

In this example, we used the presentPopoverFromBarButtonItem:permittedArrowDirections:animated:instance method of our popover controller to display the popover on a barbutton. Sometimes you may need to display a popover on a certain point on a certainview. In those cases, you need to use the presentPopoverFromRect:inView:permittedArrowDirections:animated:? instance method of? the popover?controller where the presentPopoverFromRect parameter will specify therectangular area from where the popover has to be displayed.

?

action on its contents, such as tapping ona button—you can set the modalInPopoverproperty? of? the?view? controller? that?is? displayed? in?the? popover? to?YES.? If? we? setthis property to YES in the AddNewViewController’s viewDidLoad method, as shownhere, the popover that gets displayed on the root view controller will not bedismissed if the user taps on any other view on the screen:

- (void)viewDidLoad {

?[super viewDidLoad];

?self.modalInPopover = YES;

?self.contentSizeForViewInPopover = CGSizeMake(200.0f,

???????????????????????????????????????????????168.0f);

}

热点排行