//
// ?ViewController.m
// ?彈框
//
// ?Created by lanou on 16/7/13.
// ?Copyright ? 2016年 lanou. All rights reserved.
//
//UITextfeild:怎么獲取UITextFielld的文本妙色,怎么設(shè)置輸入框鍵盤類型陪毡,設(shè)置占位字符串
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
? ? [super viewDidLoad];
? ? // Do any additional setup after loading the view, typically from a nib.
}
- (IBAction)alertAction:(id)sender {
// ? ?彈框:UIAlertConteoller
// ? ?Title:大標(biāo)題
// ? ?message:小標(biāo)題
// ? ?preferredStyle:彈框樣式
? ? UIAlertController *alertController=[UIAlertController alertControllerWithTitle:@"你好么" message:@"我很好啊" preferredStyle:UIAlertControllerStyleAlert];
? ? UIAlertAction *okAction=[UIAlertAction actionWithTitle:@"確定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
// ? ? ? ?按鈕按下要做的事情
? ? ? ? NSLog(@"淮南師范學(xué)院");
? ? }];
? ? UIAlertAction *cancelAction=[UIAlertAction actionWithTitle:@"取消" style:(UIAlertActionStyleCancel) handler:nil];
// ? ?給彈框添加行為
? ? [alertController addAction:okAction];
? ? [alertController addAction:cancelAction];
? ? [self presentViewController:alertController animated:YES completion:nil];
}
- (void)didReceiveMemoryWarning {
? ? [super didReceiveMemoryWarning];
? ? // Dispose of any resources that can be recreated.
}
?@end