CS193p 斯坦福IOS开发 2011 (七)

2019-02-14  本文已影响0人  ItchyHiker

UIToolbar

  1. 一般在View的最上面或者最下面,可以加入UIBarButtonItem
  2. UIBarItem可以通过storyboard拖拽实现,也可以通过alloc/init方法

UISplitViewController

  1. 只能在IPad Storyboard使用
  2. 只能作为base UI element

如何使用?

- (BOOL)splitViewController:(UISplitViewController *)sender
   shouldHideViewController:(UIViewController *)master
              inOrientation:(UIInterfaceOrientation)orientation
{
    return YES; // always hide it 
}
- (BOOL)splitViewController:(UISplitViewController *)sender
   shouldHideViewController:(UIViewController *)master
              inOrientation:(UIInterfaceOrientation)orientation
{
    return NO; // never hide it
 }
- (BOOL)splitViewController:(UISplitViewController *)sender
   shouldHideViewController:(UIViewController *)master
              inOrientation:(UIInterfaceOrientation)orientation
{
    return UIInterfaceOrientationIsPortrait(orientation);
}

Popover

如何设置popover大小:

@property (nonatomic) CGSize contentSizeForViewInPopover;
- (void)setPopoverContentSize:(CGSize)size animated:(BOOL)animated;
上一篇 下一篇

猜你喜欢

热点阅读