var myActionSheet:UIActionSheet = UIActionSheet() var title : String? = "Select Source" myActionSheet.title = title myActionSheet.delegate = self myActionSheet.addButtonWithTitle("camera") myActionSheet.addButtonWithTitle("Library") myActionSheet.addButtonWithTitle("Cancel") myActionSheet.cancelButtonIndex = 2 myActionSheet.showInView(self.view) func actionSheet(myActionSheet: UIActionSheet!, clickedButtonAtIndex buttonIndex: Int){ println("the index is %d", buttonIndex) }
UIActionSheet的使用
猜你喜欢
转载自wang-peng1.iteye.com/blog/2107021
今日推荐
周排行