Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/100.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Uitabbarcontroller赢得';在iPhone5中触摸标签栏的标题时,我没有反应_Ios_Cocoa Touch_User Interface_Touch_Uitabcontroller - Fatal编程技术网

Ios Uitabbarcontroller赢得';在iPhone5中触摸标签栏的标题时,我没有反应

Ios Uitabbarcontroller赢得';在iPhone5中触摸标签栏的标题时,我没有反应,ios,cocoa-touch,user-interface,touch,uitabcontroller,Ios,Cocoa Touch,User Interface,Touch,Uitabcontroller,我正在向主视图控制器添加一个tabbarcontroller。如果我触摸标签栏图像徽标下方的标题,它将不会响应。如果单击选项卡栏的图像,它会被单击并选中。本期仅为iPhone5(4英寸屏幕)。但它在3.5英寸的设备上运行良好 请参考下图,红色边框内的区域不会对所有选项卡栏的触摸做出响应 两个设备a.w.a模拟器中都出现相同的问题。我记得在StackOverflow中有一篇文章有完整的tabbar点击访问权限,但现在找不到。请对此提出解决方案 编辑 根据你的评论 I added the tabb

我正在向主视图控制器添加一个tabbarcontroller。如果我触摸标签栏图像徽标下方的标题,它将不会响应。如果单击选项卡栏的图像,它会被单击并选中。本期仅为iPhone5(4英寸屏幕)。但它在3.5英寸的设备上运行良好

请参考下图,红色边框内的区域不会对所有选项卡栏的触摸做出响应

两个设备a.w.a模拟器中都出现相同的问题。我记得在StackOverflow中有一篇文章有完整的tabbar点击访问权限,但现在找不到。请对此提出解决方案

编辑

根据你的评论

I added the tabbarcontroller using, tabctrl.view.frame = CGRectMake(0, 20, 320, 548); [self.view addSubview:tabctrl.view];
还应使用窗口边界或self.view初始化选项卡栏 或者尝试不设置视图,tabbar会自行设置

先前的答复

在实用程序检查器中启用主窗口的全屏显示

您正在使用情节提要吗?或者是他们的主窗口。xib?@Kabira,我没有使用故事板。但是我的项目中没有主窗口。现在该怎么做?在项目中如何初始化窗口?在didfinishlaunching方法中,我添加了
self.window=[[UIWindow alloc]initWithFrame:[[UIScreen mainScreen]bounds];self.viewController=[[viewcontrolleralloc]initWithNibName:@“ViewControlleriPhone5”bundle:nil];self.window.rootViewController=self.viewController我的项目中没有MAinwidow.xib文件。我只是将tabbarcontroller添加到该viewcontroller中
in Main View Controller

-(void) viewDidAppear:(BOOL)animated
{
  [super viewDidAppear:animated];

    // I assumed that you have created yourTabBarController in View did load

    yourTabBarController.view.frame = self.view.bounds;

}