This file contains 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 isModal() -> Bool { | |
if let presentingViewController = self.presentingViewController { | |
return true | |
} | |
if let presentingViewController = self.presentingViewController?.presentedViewController { | |
let exists = (presentingViewController === self) | |
if exists { return true } | |
} | |
if let presentedNavViewController = self.navigationController?.presentingViewController?.presentedViewController { | |
let exists = (presentedNavViewController === self) |
This file contains 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
.DS_Store | |
.AppleDouble | |
.LSOverride | |
# Thumbnails | |
._* | |
# Files that might appear on external disk | |
.Spotlight-V100 |
This file contains 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
+ (UIColor *)colorWithHex:(NSString *)hexCode | |
{ | |
if (!hexCode) { | |
return nil; | |
} | |
NSString *hex = [hexCode copy]; | |
if ([hex hasPrefix:@"#"]) { | |
hex = [hex substringFromIndex:1]; |