반응형
CGRect screenBounds = [[UIScreen mainScreen] bounds];
// CGFloat screenScale = [[UIScreen mainScreen] scale];
CGSize screenSize ;
bool portraitYN;
if (UIDeviceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation])) {
screenSize = CGSizeMake(screenBounds.size.width, screenBounds.size.height);
portraitYN = YES;
//other codes
}
else {
screenSize = CGSizeMake(screenBounds.size.height, screenBounds.size.width);
portraitYN = NO;
//other codes
}
반응형
'Developer > IOS' 카테고리의 다른 글
Tag를 이용한 delegate 에서의 분기문 (0) | 2013.08.01 |
---|---|
sqlLite 처리 .. (0) | 2013.07.25 |
IOS button color Change, round, (0) | 2013.07.16 |
view의 위치 잡기 (0) | 2013.07.15 |
네비게이션 컨트롤러 navigationcontroller (0) | 2013.07.11 |