美文网首页
点击向上滑提示框

点击向上滑提示框

作者: Wang99 | 来源:发表于2017-09-19 08:38 被阅读0次
- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIButton *theBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    
    [theBtn setTitle:@"点击" forState:UIControlStateNormal];
    
    theBtn.frame = CGRectMake(50, 100, 200, 44);
    [theBtn addTarget:self action:@selector(click) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:theBtn];
 
}

-(void)click{

    UIAlertController *alert=[UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
    
    [alert addAction:[UIAlertAction actionWithTitle:@"找回密码" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
       
     
    }]];
    [alert addAction:[UIAlertAction actionWithTitle:@"验证手机号码" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  
    }]];
    
    [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        
    }]];
    [self presentViewController:alert animated:YES completion:^{}];

}

相关文章

网友评论

      本文标题:点击向上滑提示框

      本文链接:https://www.haomeiwen.com/subject/wraisxtx.html