IOS中的模态层presentViewController:animated:completion:

获取当前rootviewcontroller 并弹出模态层 

   [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:smvc animated:YES completion:^(void){

        

    }];


关闭

  [self dismissViewControllerAnimated:YES completion:nil];


你可能感兴趣的:(IOS中的模态层presentViewController:animated:completion:)