iOS 5 获取 alertView 上的 TextField
2017-07-12 本文已影响5人
PPFSaber
UIAlertView *alertview = [[UIAlertView alloc]initWithTitle:NSLocalizedString(@"活动费用(元/人)", nil) message:nil delegate:self cancelButtonTitle:NSLocalizedString(@"取消", nil) otherButtonTitles:NSLocalizedString(@"确定", nil), nil];
alertview.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField *textFiled = [alertview textFieldAtIndex:0];
textFiled.keyboardType = UIKeyboardTypeNumberPad;
textFiled.placeholder = NSLocalizedString(@"请输入活动费用(元/人)", nil);
[alertview show];