1. 스토리보드 이름 찾기

[ProjectName]-Info.plist 파일에서 확인할 수 있다.

iPhone 은 "Main storyboard file base name", iPad 는 "Main storyboard file base name (iPad)" 에서 확인할 수 있다.


2. 기기에 맞는 스토리보드 이름 가져오기

NSString *storyboardName = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad? @"MainStoryboard_iPad": @"MainStoryboard_iPhone");


3. 스토리보드 찾기

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle:nil];

+ Recent posts