pinping

  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的高度;

 

 

分类:

技术点:

相关文章:

  • 2021-09-22
  • 2022-12-23
  • 2021-05-27
猜你喜欢
  • 2021-12-26
  • 2021-07-19
  • 2021-09-01
  • 2021-11-17
  • 2021-07-04
  • 2021-12-08
  • 2021-12-23
相关资源
相似解决方案