- Size classes (compact, regular)에 따른 AutoLayout Adaptivity : Swift Sample
- Orientation (Portrait, Landscape)에 따른 AutoLayout Adaptivity : Objective-C Sample
Swift Sample
- Interface Builder based
Objective-C Sample
- Programmatically based
Swift |
Objective-C |
---|---|
-
여기에 존재하지 않는 추가적인 문서는 다음의 기술위키 문서를 참고하세요.
-
Swift Sample : Interface Builder based
- Objective-C Sample : Programmatically
- (void)viewDidLoad {
[super viewDidLoad];
[self configureTableView];
[self configureDataSource];
[self updateUI];
__weak __typeof(self) weakSelf = self;
NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
self.observer = [notificationCenter addObserverForName:UIDeviceOrientationDidChangeNotification
object:nil
queue:[NSOperationQueue mainQueue]
usingBlock:^(NSNotification *note) {
if (weakSelf.presentedViewController == nil &&
UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation) == YES) {
ViewControllerX *vc = [ViewControllerX new];
vc.modalPresentationStyle = UIModalPresentationFullScreen;
vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[weakSelf presentViewController:vc animated:YES completion:^{}];
}
}];
}
- iOS 16 이상의 Simulator부터는
WKWebView
이용 시 다음과 경고 로그가 발생한다.- Apple Developer Forums 에 따르면 시스템 버그로 사료된다.
[Security] This method should not be called on the main thread as it may lead to UI unresponsiveness.
sonkoni(손관현), isomorphic111@gmail.com
This project is released under the MIT License. See LICENSE for more information.