码迷,mamicode.com
首页 > 其他好文 > 详细

navigationController and ToolBar

时间:2014-06-04 21:34:39      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:c   style   class   a   tar   get   

UIBarButtonItem *tbarItem = [[UIBarButtonItemalloc] initWithBarButtonSystemItem:UIBarButtonSystemItemActiontarget:selfaction:@selector(book)];

    

    UIBarButtonItem *tbarItem1 = [[UIBarButtonItemalloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAddtarget:selfaction:nil];

    

    UIBarButtonItem *tbarItem3 = [[UIBarButtonItemalloc] initWithTitle:@"title"style:(UIBarButtonItemStyleDone) target:selfaction:nil];

    

    UIBarButtonItem *tbarItem4 = [[UIBarButtonItemalloc] initWithTitle:@"button1"style:(UIBarButtonItemStyleBordered) target:selfaction:nil];

    

    //设置间隔

    UIBarButtonItem *flex = [[UIBarButtonItemalloc] initWithBarButtonSystemItem: UIBarButtonSystemItemFixedSpacetarget:selfaction:nil];

    

    NSArray *itemArray=

  @[tbarItem,flex,tbarItem1,flex,tbarItem3,flex,tbarItem4];

    

    //默认是隐藏的

    [self.navigationControllersetToolbarHidden:NOanimated:YES];

    [self setToolbarItems:itemArray];

navigationController and ToolBar,布布扣,bubuko.com

navigationController and ToolBar

标签:c   style   class   a   tar   get   

原文地址:http://www.cnblogs.com/zhangjl/p/3759321.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!