UIToolBar
来源:互联网 发布:薛之谦的淘宝店铺 编辑:程序博客网 时间:2024/05/17 05:58
// Do any additional setup after loading the view from its nib.
UIBarButtonItem *one = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:nil action:nil];
UIBarButtonItem *two = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks target:nil action:nil];
UIBarButtonItem *three = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:nil action:nil];
UIBarButtonItem *four = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:nil action:nil];
UIBarButtonItem *flexItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
NSArray *toolBarItems =[NSArray arrayWithObjects:flexItem, one, flexItem, two, flexItem, three, flexItem, four, flexItem, nil];
toolbar = [[UIToolbar alloc] init];
[toolbar setItems:toolBarItems animated:NO];
[toolbar sizeToFit];
CGFloat toolbarHeight = [toolbar frame].size.height;
CGRect viewBounds = self.view.bounds;
CGFloat rootViewHeight = CGRectGetHeight(viewBounds);
CGFloat rootViewWidth = CGRectGetWidth(viewBounds);
CGRect rectArea = CGRectMake(0, rootViewHeight - toolbarHeight, rootViewWidth, toolbarHeight);
[toolbar setFrame:rectArea];
[self.view addSubview:toolbar];
- UIToolBar
- UIToolbar
- UIToolbar
- UIToolbar
- UIToolbar
- UIToolBar
- UIToolbar
- UIToolBar
- UIToolbar
- UIToolBar,UIBarButtonItem
- Transparent UIToolBar
- Transparent UIToolBar
- UIToolBar使用
- swift--- uitoolbar
- UIBarButtonItem,UIToolBar
- IOS UIToolbar
- IOS UIToolBar
- UIToolBar使用
- QTabWidget
- Qt使用Gsoap
- QListWidget
- QScrollArea
- QT
- UIToolBar
- 页面动画
- Android让页面默认弹出输入法的问题 .
- UIScrollView
- GPS坐标换算
- Sqlite
- WebService
- 产品经理经验总结
- Edit空间编辑完成