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

alertView

时间:2016-02-26 17:10:53      阅读:117      评论:0      收藏:0      [点我收藏+]

标签:

    // 下面弹出
    UIActionSheet *popup = [[UIActionSheet alloc] initWithTitle:nil delegate:cell cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
    [popup addButtonWithTitle:str];
    [popup addButtonWithTitle:kTextCancel];
    [popup setCancelButtonIndex:buttonTitles.count];
    [popup showInView:[UIApplication sharedApplication].keyWindow];

 

NSString *buttonTitle = [popup buttonTitleAtIndex:buttonIndex];
// 查看点击的是哪个button

 

// 从中间出来
UIAlertView *editNameAlertView = [[UIAlertView alloc] initWithTitle:@"Edit album name" message:kTextNewAlbumMessage delegate:self cancelButtonTitle:kTextCancel otherButtonTitles:kTextSave,nil];
    editNameAlertView.delegate = self;
    editNameAlertView.alertViewStyle = UIAlertViewStylePlainTextInput;
    [editNameAlertView textFieldAtIndex:0].placeholder = kTextTitle;
    [editNameAlertView textFieldAtIndex:0].text = self.label.text;
    [editNameAlertView textFieldAtIndex:0].autocapitalizationType = UITextAutocapitalizationTypeSentences;

 

alertView

标签:

原文地址:http://www.cnblogs.com/MrTao/p/5220877.html

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