【发布时间】:2012-01-20 21:27:50
【问题描述】:
我在工具栏中有 2 个按钮。有没有办法隐藏工具栏并仍然显示 2 个按钮?这是目前为止的:
UIBarButtonItem *cameraButton = [[UIBarButtonItem alloc]
initWithTitle:@"Camera"
style:UIBarButtonItemStyleBordered
target:self
action:@selector(useCamera:)];
/* UIBarButtonItem *cameraRollButton = [[UIBarButtonItem alloc]
initWithTitle:@"Camera Roll"
style:UIBarButtonItemStyleBordered
target:self
action:@selector(useCameraRoll:)]; */
NSArray *items = [NSArray arrayWithObjects: cameraButton,
/* cameraRollButton*/ nil];
[toolbar setItems:items animated:YES];
【问题讨论】: