반응형
[ios/code snippet] Phone 인지 Pad 인지 검사하기 |
UIUserInterfaceIdiom userInterfcae = [UIDevice currentDevice].userInterfaceIdiom;
if ( userInterfcae == UIUserInterfaceIdiomPad ) {
NSLog(@“This is Pad”);
} else if ( userInterfcae == UIUserInterfaceIdiomPhone ) {
NSLog(@“This is Phone”);
} else if (userInterface == UIUserInterfaceIdiomTV ) {
NSLog(@“This is TV”);
} else { // UIUserInterfaceIdiomUnspecified = -1
NSLog(@“This is Unspecified”);
}
반응형
'프로그래밍 놀이터 > iOS' 카테고리의 다른 글
[ios/tutorial] Implicit Animation (0) | 2017.11.28 |
---|---|
[ios] Umbrella Framework? Umbrella Header? (0) | 2017.11.27 |
[ios] Layer Animation 완료 후 position 유지하기 (0) | 2017.11.25 |
[ios/reference] Layer Style Property Animations (0) | 2017.11.24 |
[ios/reference] Improving Animation Performance (0) | 2017.11.23 |
댓글