点击向上滑提示框

- (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:^{}];

}

你可能感兴趣的:(点击向上滑提示框)