我在视图中使用tabbar当我设置tabbar高度1000然后集合视图也增加它的大小,当我设置tabbar hiegt 568它就消失了。我不知道如何解决它
当我在ios6中运行应用程序时,还有状态栏问题。如果我的问题非常复杂,那么只需要ping我。我可以提供有关此问题的全部信息。
这是我的代码。
//In View Controller:
- (void)viewDidLoad
{
[super viewDidLoad];
tabbar_obj = [[mytabbar alloc] initWithNibName:@"mytabbar" bundle:nil];
if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
{
NSLog(@"Ipad ");
}
else
{
NSLog(@"Iphone %f ",[[UIScreen mainScreen] bounds].size.height);
if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0"))
{
if ([[UIScreen mainScreen] bounds].size.height == 568) {
tabbar_obj.view.frame = CGRectMake(0, 0, 320, 568);
//this is iphone 5 xib
// tabbar_obj.view.frame = CGRectMake(0, 0, 320, 568);
} else //if ([[UIScreen mainScreen] bounds].size.height == 480)
{
tabbar_obj.view.frame = CGRectMake(0, 0, 320, 568);
// this is iphone 4 xib
}
}
else if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.1"))
{
if ([[UIScreen mainScreen] bounds].size.height == 568) {
// tabbar_obj.view.frame = CGRectMake(0, 20, 320, 568);
//this is iphone 5 xib
[self.view setFrame:CGRectMake(0,0, 320, 568)];
tabbar_obj.view.frame = CGRectMake(0, 0, 320, 568);
} else //if ([[UIScreen mainScreen] bounds].size.height == 460)
{
[self.view setFrame:CGRectMake(0,0, 320, 480)];
tabbar_obj.view.frame = CGRectMake(0,0, 320,568);
// this is iphone 4 xib
}
}
[self.view addSubview:tabbar_obj.view];
appdel.mytabbar_obj = tabbar_obj;
}
}