- App Icon
- Screenshots
- Decriptions
- Tags (< 1000 characters)
- Setup Apple Developer Account
- Grant Access to Developers
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
| private let ImageFolderDirectoryName = "SomeAppDomainImageDirectory" | |
| final class ImageManager: NSObject { | |
| // MARK: Singleton | |
| class func sharedManager() -> ImageManager { | |
| struct Singleton { | |
| static let instance = ImageManager() | |
| } |
Some commands I'm using from xcodebuild for possible future reference. If you don't know what you're doing, this probably isn't a good place to be because I don't either!
xcodebuild -scheme "Bose Connect" -workspace Monet.xcworkspace -configuration Debug clean build test -destination platform='iOS Simulator',name='iPhone 6'
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
| enum SortOrder { | |
| case Ascending, Descending, Same | |
| } | |
| extension Array { | |
| typealias Sorter = (Element, Element) -> SortOrder | |
| func sortWithPriorities(sorters: Sorter...) -> Array { | |
| return sort { (left, right) -> Bool in | |
| for sorter in sorters { | |
| switch sorter(left, right) { |
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
| enum ColorDescriptor { | |
| case PatternImage(imageName: String) | |
| case RGB(r: Int, g: Int, b: Int, a: Int) | |
| } | |
| extension ColorDescriptor : StringLiteralConvertible, RawRepresentable, Equatable { | |
| typealias RawValue = StringLiteralType | |
| typealias ExtendedGraphemeClusterLiteralType = StringLiteralType | |
| typealias UnicodeScalarLiteralType = StringLiteralType | |
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
| import AVFoundation | |
| protocol SoundFile { | |
| var soundFile: String { get } | |
| } | |
| extension SoundFile { | |
| private var nameComponents: [String] { | |
| return soundFile.componentsSeparatedByString(".") |
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 UIView { | |
| class func fromNib(nibNameOrNil: String? = nil) -> Self { | |
| return fromNib(nibNameOrNil, type: self) | |
| } | |
| class func fromNib<T : UIView>(nibNameOrNil: String? = nil, type: T.Type) -> T { | |
| let v: T? = fromNib(nibNameOrNil) | |
| return v! | |
| } | |
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 UITableView { | |
| func registerCell<T : UITableViewCell>(_: T.Type, identifier: String = T.identifier) { | |
| if let nib = T.nib { | |
| registerNib(nib, forCellReuseIdentifier: identifier) | |
| } else { | |
| registerClass(T.self, forCellReuseIdentifier: identifier) | |
| } | |
| } | |
| func registerHeader<T: UITableViewHeaderFooterView>(_: T.Type, identifier: String = T.identifier) { |
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
| internal extension SequenceType { | |
| func ip_splitFilter(@noescape filter: (Generator.Element) throws -> Bool) rethrows -> (passed: [Generator.Element], failed: [Generator.Element]) { | |
| var passed: [Generator.Element] = [] | |
| var failed: [Generator.Element] = [] | |
| try forEach { | |
| if try filter($0) { | |
| passed.append($0) | |
| } else { | |
| failed.append($0) | |
| } |
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
| public struct Weak<T where T : AnyObject> { | |
| public weak var value: T? | |
| public init(_ value: T) { | |
| self.value = value | |
| } | |
| } | |
| public protocol Multicast : class { | |
| typealias Delegate: AnyObject | |
| var delegateReferences: [Weak<Delegate>] { get set } |