码迷,mamicode.com
首页 > 其他好文 > 详细

UIActionSheet(操作列表)

时间:2015-06-30 23:31:57      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:

 1 #import "AppDelegate.h"
 2 
 3 @interface AppDelegate ()<UIActionSheetDelegate>
 4 
 5 @end
 6 
 7 @implementation AppDelegate
 8 
 9 
10 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
11     self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
12     // Override point for customization after application launch.
13     self.window.backgroundColor = [UIColor whiteColor];
14     
15     UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"File Action" delegate:self cancelButtonTitle:@"cancel" destructiveButtonTitle:@"load" otherButtonTitles:@"save",@"Delete", nil];
16     [sheet showInView:self.window];
17     
18     
19     [self.window makeKeyAndVisible];
20     return YES;
21 }
22 
23 - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
24 {
25     NSLog(@"Button %ld is pressed...",buttonIndex);
26 }
27 
28 @end

 

UIActionSheet(操作列表)

标签:

原文地址:http://www.cnblogs.com/lantu1989/p/4611960.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!