어떤 이벤트/처리를 기다릴때,
sleep하면 처리자체가 멈추므로.
현재의 메인스레드 이외에는 멈추면 안됨.
그럴때, while문 사이에..
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
스테이터스바 표시
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
// iOS 7
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
} else {
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
- (BOOL)prefersStatusBarHidden {
return YES;
}
http://stackoverflow.com/questions/12661031/how-to-hide-a-status-bar-in-ios
스테이터스바 텍스트 컬러
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
-(UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
}
http://stackoverflow.com/questions/17678881/how-to-change-status-bar-text-color-in-ios-7