File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 55
66*  Keep up with the Objective-C style guide above. Will highlight differences
77  here.
8+ *  Prefer ` struct ` s over ` class ` es wherever possible
9+ *  Default to marking classes as ` final ` 
810*  Use ` let `  whenever possible to make immutable variables
911*  Name all parameters in functions and enum cases
1012*  Use trailing closures
Original file line number Diff line number Diff line change 22
33import  Foundation // or not
44
5+ // MARK: Types
6+ 
7+ // Prefer structs over classes
8+ struct  User  { 
9+   let  name :  String 
10+ } 
11+ 
12+ // When using classes, default to marking them as final
13+ final  class  MyViewController :  UIViewController  { 
14+ } 
15+ 
516// MARK: Closures
617
718// Use typealias when closures are referenced in multiple places
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments