建一个类

如,在Contans.swift中

import UIKit

let kMAIN_SIZE = UIScreen.mainScreen().bounds

 

在其他地方直接用

比如在

MyTabbarViewController.swift中

 var bgView = UIView(frame:CGRectMake(0, 0, kMAIN_SIZE.width, kMAIN_SIZE.height - 20 - 44));

相关文章:

  • 2021-08-24
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
  • 2021-12-22
猜你喜欢
  • 2021-09-20
  • 2021-09-04
  • 2021-10-18
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
相关资源
相似解决方案