본문 바로가기

xocde4 이하버전 소스에서 xocde5이상 업데이트 시 status bar 겹치는 문제 해결법 -info.plist 에 View controller-based status bar appearance를 NO로 추가AppDelegate의 didFinishLaunchingWithOptions에 아래 코드 추가 (해당코드는 검은색 배경으로 되어있으니 필요에 따라서 변경하면 됩니다.) [self.window setBackgroundColor:[UIColor blackColor]]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque]; ViewController 마다 오버라이딩 함수 추가- (void)viewWillLayoutSubviews { if ([[UIDevice currentDevice].systemVer.. 더보기
ios 화면 회전상태 확인 코드, os 버전 확인 코드 화면 회전 UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; if(!UIDeviceOrientationIsLandscape(orientation)) { //가로 }else{ //세로 } 버전 확인 if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) { } 더보기
ios 배포버전 로그(NSLog) 숨기기 App 배포시 NSLog를 숨기지 않으면 Orgaizer의 Console에서 해당 로그가 찍혀 나오는것을 볼 수 있습니다. 이를 막기 위해서는 .pch파일 (프로젝트명.pch)에 아래의 코드를 추가 한 후 Build Setting에서 Preprocessor Macros의 Debug에 DEBUG=1을 추가해 주시면 됩니다. #ifdef DEBUG #define NSLog( s, ... ) NSLog(@"%s(%d)\n%@", __FUNCTION__, __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__]) #else #define NSLog( s, ... ) #endif #define LOG(s, ...) NSLog(@s, ##__VA_ARGS__) 더보기