-(void)addLable
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确认",nil];
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField *nameField = [alert textFieldAtIndex:0];
nameField.placeholder = @"请输入标签名称";
[alert show];
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex==0) {
NSLog(@"你点击了取消");
}else if (buttonIndex==1){
switch (IlableNum) {
case 0:
NSLog(@"你点击了确定");
_addLableOne.text = @"文本改变";
break;
default:
break;
}
}
}
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确认",nil];
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField *nameField = [alert textFieldAtIndex:0];
nameField.placeholder = @"请输入标签名称";
[alert show];
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex==0) {
NSLog(@"你点击了取消");
}else if (buttonIndex==1){
switch (IlableNum) {
case 0:
NSLog(@"你点击了确定");
_addLableOne.text = @"文本改变";
break;
default:
break;
}
}
}