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
    
  
  
    
  | struct Colors { | |
| static let colorOne = UIColor(red:0.87, green:0.85, blue:0.82, alpha:1) | |
| } | |
| let mapColor = ["colorOne": Colors.colorOne] | 
  
    
      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
    
  
  
    
  | This is what i have... | |
| @IBInspectable var colorString: String = "" { | |
| didSet { | |
| backgroundColor = colorDict[colorString] | |
| } | |
| } | |
| let colorDict = [ | |
| "colorOne": UIColor(red:0.87, green:0.85, blue:0.82, alpha:1), | 
  
    
      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
    
  
  
    
  | if iOS8 { | |
| let userNotificationTypes: UIUserNotificationType = (UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound) | |
| let settings = UIUserNotificationSettings(forTypes: userNotificationTypes, categories: nil) | |
| application.registerUserNotificationSettings(settings) | |
| application.registerForRemoteNotifications() | |
| } else { | |
| let userNotificationTypes: UIRemoteNotificationType = (UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound) | |
| application.registerForRemoteNotificationTypes(userNotificationTypes) | |
| } | 
  
    
      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
    
  
  
    
  | protocol MyProtocol { | |
| func method() -> String | |
| func hey() -> String | |
| var commonOfMyClass: CommonMyClass { get } // i need this here | |
| } | |
| protocol SharedLogic { | |
| func hey() -> String | |
| } | 
  
    
      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
    
  
  
    
  | protocol MyProtocol { | |
| func method() -> String | |
| func hey() -> String | |
| var commonOfMyClass: CommonMyClass { get } | |
| } | |
| protocol SharedLogic { | |
| func hey() -> String | |
| } | 
  
    
      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
    
  
  
    
  | protocol MyProtocol { | |
| func method() -> String | |
| func hey() -> String | |
| } | |
| protocol SharedLogic { | |
| func hey() -> String | |
| } | |
| class CommonMyClass: SharedLogic { | 
  
    
      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
    
  
  
    
  | protocol MyProtocol { | |
| func method() -> String | |
| var commonOfMyClass: CommonMyClass! { get } | |
| } | |
| class CommonMyClass { | |
| func commontPrint() -> String { | |
| return "Hey im common" | |
| } | |
| } | 
  
    
      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
    
  
  
    
  | class SharedMethods { | |
| func sharedMethod() { | |
| println("Shared :-)") | |
| } | |
| } | |
| protocol MyProtocol { | |
| func method() -> String | |
| } | 
  
    
      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 MainMenuVC: UITableViewDataSource { | |
| func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
| var cell = tableView.dequeueReusableCellWithIdentifier("cell") as? MenuEntryView | |
| if cell == nil { | |
| cell = NSBundle.mainBundle().loadNibNamed("XibName", owner: self, options: nil).first as SubclassUITableViewCell | |
| println("new one") | |
| } else { | |
| println("dequeued!") | |
| } | 
  
    
      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 loadViewFromNib() -> UIView { | |
| //Option 1 | |
| let bundle = NSBundle.mainBundle() | |
| let nib = UINib(nibName: nibName, bundle: bundle) | |
| return nib.instantiateWithOwner(self, options: nil)[0] as UIView | |
| //Option 2 | |
| return NSBundle.mainBundle().loadNibNamed(nibName, owner: self, options: nil).first! as UIView | |
| } |