2013-10-11 3 views
0

아이폰 OS 6 UIStatusBar에서 UINavigationBar 나타납니다 (그것은 아이폰 OS 7에서 제대로 실행), 내가 UINavigationBar는 UIStatusBar 아래에 나타납니다

, Xocde 5 스토리 보드를 사용하고 있습니다 : 여기 내 코드입니다

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    [UIApplication sharedApplication].statusBarHidden = NO; 

    if ([[[UIDevice currentDevice] systemVersion] floatValue] < 7) //iOS 6 
    { 
     [[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:@"TabImg.png"]]; 
     [[UINavigationBar appearance] setTintColor:[UIColor colorWithRed:.7 green:.2 blue:.1 alpha:1.0]]; 
     [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque]; 
    } 

    return YES; 
} 
홈페이지에

코드,

- (void)viewDidLoad 
{ 
    [super viewDidLoad]; 

     CRViewController *Obj=[[CRViewController alloc] init]; 
     [self.tabBarController presentViewController:Obj animated:YES completion:nil]; 

} 

내가 didFinishLaunchingWithOptions 방법후 내 응용 프로그램을 실행이 해고되면 CRViewController 클래스가 호출됩니다.

내가 실수를하고있는 중이 야

- (void)viewDidLoad 
{ 
    [super viewDidLoad]; 

    [self.navigationController setNavigationBarHidden:YES]; 
    self.tabBarController.tabBar.hidden = YES; 
    [UIApplication sharedApplication].statusBarHidden = YES; 

    ... 
    ... 
    ... 

} 



- (IBAction)SkipClick:(id)sender { 
    [self dismissViewControllerAnimated:YES completion:nil]; 
} 

-(void)viewDidDisappear:(BOOL)animated{ 
    [self.navigationController setNavigationBarHidden:NO]; 
    self.tabBarController.tabBar.hidden = NO; 
    [UIApplication sharedApplication].statusBarHidden = NO; 
} 

CRViewController

코드, ??

미리 감사드립니다.

+0

안녕, 나는 어디에서 설정해야합니다, 내 응용 프로그램에서 현재보기 컨트롤러 – NANNAV

+0

후 설정된 시간 지연 같은 문제에 직면하고있다? – Krunal

+0

이것을 시도하십시오 - (무효) viewDidLoad { [super viewDidLoad]; [self performSelector : @selector (presentListView) withObject : self afterDelay : 0입니다.5]; } - (void) presentListView { CRViewController * Obj = [[CRViewController alloc] init]; [self.tabBarController presentViewController : Obj animated : 예 완료 : 없음]; } – NANNAV

답변

0
Navigation is showing in ios 7 than you have check this it will work 


NSString *version = [[UIDevice currentDevice] systemVersion]; 
int ver = [version intValue]; 
if (ver > 7) 
{ 
} 
else 
{ 
    self.edgesForExtendedLayout = UIRectEdgeNone; 

}

self.tabBarController.tabBar.hidden = YES; 7에서 작동하지 않습니다. 검은 색 화면을 보여줍니다. 숨길 수있는 것보다 그것을

- (무효) hideTabBar

{

의 UITabBar * 한 tabBar = self.tabBarController.tabBar;

UIView * parent = tabBar.superview; // UILayoutContainerView

UIView * content = [parent.subviews objectAtIndex : 0]; // UITransitionView

UIView * window = parent.superview;

[UIView의 animateWithDuration 0.5

애니메이션^{

CGRect tabFrame = tabBar.frame;

tabFrame.origin.y = CGRectGetMaxY (window.bounds);

tabBar.frame = tabFrame; content.frame = window.bounds;

}];

}

관련 문제