iOS开发中Date Picker和UITool Bar控件的使用简介

2020-01-14 18:20:05王旭

NSMutableArray *myToolBarItems = [NSMutableArray array]; 

[myToolBarItems addObject:[[[UIBarButtonItem alloc] 

                                                        initWithTitle:@"myTile"  

                                                        style:UIBarButtonItemStylePlain  

                                                        target:self  

                                                        action:@selector(action)] autorelease]]; 

[myToolBar setItems:myToolBarItems animated:YES]; 

[myToolBar release]; 

[myToolBarItems];                                                         


 

 

setItems传入值或者说items是一个对象数组。

3.在UIToolBar上面添加image

复制代码