UIActionSheet
2015-07-09 16:08
435 查看
- (IBAction)showFruits:(id)sender
{
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select a fruit"
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:nil];
for (NSString *fruit in self.fruits) {
[actionSheet addButtonWithTitle:fruit];
}
actionSheet.cancelButtonIndex = [actionSheet addButtonWithTitle:@"Cancel"];
[actionSheet showInView:self.view];
}
{
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select a fruit"
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:nil];
for (NSString *fruit in self.fruits) {
[actionSheet addButtonWithTitle:fruit];
}
actionSheet.cancelButtonIndex = [actionSheet addButtonWithTitle:@"Cancel"];
[actionSheet showInView:self.view];
}
相关文章推荐
- UINavigationController学习记录
- ui
- Android UI学习 - Tab的学习和使用(转)
- N-QueensII : 4ms and short
- UITableView/表格视图
- Android UI自动化测试最佳实践
- 对Django框架架构和Request/Response处理流程的分析
- Active Directory:Dsquery Commands
- UIButton
- ngui 鼠标事件穿透问题
- UI_KVC赋值
- XQuery
- NGUI出现Shader wants normals, but the mesh UIAtlas doesn't have them
- iOS——UITableVew 头部图片下拉放大
- UIButton UIEdgeInsetsMake
- iOS笔记057 - UI总结03
- 1007. Maximum Subsequence Sum (25)
- Implement Queue using Stacks
- Android-优化UI性能(5)-优化布局文件
- [iOS]UIView动画学习笔记(下)