NSLog(@"applicationFrame%f",[UIScreenmainScreen].applicationFrame.size.height);
可以的到整个程序的View的大小
NSLog(@"navigationBar%f",self.navigationController.navigationBar.frame.size.height);
NSLog(@"navigationBar%f",self.tabBarController.tabBar.frame.size.height);
floatheightEg = [UIScreenmainScreen].applicationFrame.size.height - self.navigationController.navigationBar.frame.size.height -self.tabBarController.tabBar.frame.size.height;
LeftView*lView=[[LeftView alloc] initWithFrame:CGRectMake(0, 0, 56, heightEg) Number:1];
[self.view addSubview:lView];
现在的lView就个适用iPhone 4/S 和iPhone 5那;
因为的程序里面有navigationController和tabBarController所以要减去navigationController和tabBarController的高度;