This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | extension UIDevice { | |
| static func isX() -> Bool { | |
| if UIDevice().userInterfaceIdiom == .phone { | |
| switch UIScreen.main.nativeBounds.height { | |
| case 2436: | |
| return true | |
| default: | |
| return false | |
| // case 480: | |
| // print("iPhone Classic") | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | func measure(f: ()->()) { | |
| let start = CACurrentMediaTime() | |
| f() | |
| let end = CACurrentMediaTime() | |
| print("测量时间:\(end - start)") | |
| } | |
| measure { | |
| doSomeHeavyWork() | |
| } |