티스토리 뷰

Mobile/iOS

[iOS]presentModalViewController 대체

out of coding 2016. 3. 2. 09:32

6.0 초과 버전에서는 지원하지 않는 메소드 presentModalViewController를 대체하려면 다음과 같이 하면 된다.

presentViewController메소드는 5.0부터 지원을 한다.


presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated를

presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^ __nullable)(void))completion 으로 대체를 한다.


예를 들자면


* before

[self presentModalViewController:controller animated:YES];


* after

[self presentViewController:controller animated:YES completion:nil];


잘된다.

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
글 보관함