小编Mat*_*Mat的帖子

iPhone 5 TabBar无法正常工作

我正在更新我们的应用程序,我添加了新的默认图像,但我的标签栏不能在iPhone 5上工作.我做了一些研究并创建了一个if语句检查显示器的大小,然后将标签栏放在适当的位置地点.问题是,当if语句达到iPhone 5的屏幕大小并将标签栏放在正确的位置时,按钮不起作用......如果我将垂直位置更改为较小的值,则按钮会起作用.这是代码:

UITabBar *tabBar = self.tabBarController.tabBar;

if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
{
    CGSize result = [[UIScreen mainScreen] bounds].size;
    if(result.height == 480)
    {
        tabBar.frame=CGRectMake(0,431,320,49);
    }
    if(result.height == 568)
    {
        tabBar.frame=CGRectMake(0,519,320,49);
    }
}
Run Code Online (Sandbox Code Playgroud)

现在,如果我将"519"垂直对齐更改为"450",则标签栏在屏幕上方较高,但按钮确实有效.任何想法 - 这让我疯了!这是我需要为我工作以启动更新的最后一件事.

iphone ios6 iphone-5

15
推荐指数
2
解决办法
4228
查看次数

iOS 6 MPMoviePlayerViewController和presentMoviePlayerViewControllerAnimated Rotation

在之前的iOS版本中,我们的视频会自动旋转,但在iOS 6中则不再如此.我知道presentMoviePlayerViewControllerAnimated之前的设计是为了做到这一点,但我如何告诉MPMoviePlayerViewController自动旋转?

MPMoviePlayerViewController *moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
[self presentMoviePlayerViewControllerAnimated:moviePlayer];
Run Code Online (Sandbox Code Playgroud)

iphone ios ios6 iphone-5

4
推荐指数
2
解决办法
8023
查看次数

标签 统计

ios6 ×2

iphone ×2

iphone-5 ×2

ios ×1