簡體   English   中英

如何在iPhone SDK中的Zooz框架中設置方向

[英]how to set orientation with in zooz framework in iphone sdk

我正在使用zooz framework ,在zooz framework中它可以完美工作,但是當我旋轉到風景時,其框架已經以奇怪的方式發生了變化。如何設置Zooz視圖框架?

zooz = [ZooZ sharedInstance];
              
[zooz preInitialize:@"e6178b33-fac9-4a41-b296-162a28e291f8" isSandboxEnv:IS_SANDBOX];

// NSLog(@"HIIII");
    
//ZooZ * zooz = [ZooZ sharedInstance];
     
zooz.sandbox = IS_SANDBOX;
    
zooz.tintColor = [UIColor colorWithRed:1 green:0.8 blue:0 alpha:1];
    
zooz.barButtonTintColor = [UIColor darkGrayColor];

請幫忙!!

Zooz For iPhone當前不支持橫向,並且始終處於縱向模式。 iPad確實支持所有方向。

為了在橫向iPhone應用程序中啟用Zooz,您應該從僅縱向視圖控制器顯示Zooz

如果是唯一的橫向應用程序,則應在目標中啟用所有方向模式,並以“允許的方向”方法在所有視圖控制器上強制橫向。

對於顯示ZooZ ui的視圖控制器,應將其設置為縱向,這樣您的應用程序才能保持橫向,而Zooz UI則是縱向

- (NSUInteger) supportedInterfaceOrientations{
    return  UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
}

- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone)
        return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
    return YES;
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM