模态视图的呈现和关闭

#pragma mark 模态的呈现”
- (IBAction)addNote:(id)sender {
    UIStoryboard *mainStoryBoard=[UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];
    ViewController *addPage=[mainStoryBoard instantiateViewControllerWithIdentifier:@"addNoteNavigation"];
    addPage.modalTransitionStyle=UIModalTransitionStyleCrossDissolve;
    addPage.modalPresentationStyle=UIModalPresentationFormSheet;
    [self presentViewController:addPage animated:YES completion:nil];
}

#pragma mark 模态的关闭”
- (IBAction)doneAdd:(id)sender {
    [self dismissViewControllerAnimated:YES completion:^{
        
    }];
}

posted @ 2015-04-22 16:15  静坐观雨  阅读(131)  评论(0编辑  收藏  举报