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
| // | |
| // UIImage+Extras.swift | |
| // Clay Ellis | |
| // https://gist.github.com/clayellis/3c3bfdee9cac8e9b12ecaefb103d916b | |
| // | |
| import UIKit | |
| extension UIImage { | |
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
| // | |
| // UIColor+Extras.swift | |
| // Clay Ellis | |
| // https://gist.github.com/clayellis/ca658582e111c2525cd38f3ede735362 | |
| // | |
| import UIKit | |
| extension UIColor { |
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
| // | |
| // UIView+Extras.swift | |
| // Clay Ellis | |
| // gist.github.com/clayellis/0cf1b1092b6a08cb4c5b2da9abee5ed9 | |
| // | |
| import UIKit | |
| @objc public protocol ConfigurableView { | |
| @objc optional func configure() |
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 Foundation | |
| enum AssociatedObject { | |
| /// Wrapper for Associated Objects that allows us to use Swift value types. | |
| internal final class Wrapper<T>: NSObject, NSCopying { | |
| let value: T | |
| init(_ value: T) { | |
| self.value = value | |
| } |
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 Foundation | |
| class AsyncOperation: Operation { | |
| public enum State: String { | |
| case ready, executing, finished | |
| fileprivate var keyPath: String { | |
| return "is" + rawValue.capitalized | |
| } | |
| } |
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
| H: (Horizontal) //horizontal direction | |
| V: (Vertical) //vertical direction | |
| | (pipe) //superview | |
| - (dash) //standard spacing (generally 8 points) | |
| [] (brackets) //name of the object (uilabel, unbutton, uiview, etc.) | |
| () (parentheses) //size of the object | |
| == equal widths //can be omitted | |
| -16- non standard spacing (16 points) | |
| <= less than or equal to | |
| >= greater than or equal to |
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
| #!/bin/bash | |
| # Link: <https://gist.github.com/jellybeansoup/db7b24fb4c7ed44030f4> | |
| # | |
| # A command-line script for incrementing build numbers for all known targets in an Xcode project. | |
| # | |
| # This script has two main goals: firstly, to ensure that all the targets in a project have the | |
| # same CFBundleVersion and CFBundleShortVersionString values. This is because mismatched values | |
| # can cause a warning when submitting to the App Store. Secondly, to ensure that the build number | |
| # is incremented appropriately when git has changes. | |
| # |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>CGPDeviceCategory</key> | |
| <string>GamePad</string> | |
| <key>CGPDeviceType</key> | |
| <string>Xbox</string> | |
| <key>DeviceName</key> | |
| <string>SteelSeries Nimbus</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
| # Script below required run from Aggregate Xcode target | |
| # Settings | |
| FRAMEWORK_NAME=#HERE_YOUR_FRAMEWORK_NAME | |
| SCHEME_NAME="${FRAMEWORK_NAME}" | |
| RELEASE_DIR="${HOME}/Desktop/Frameworks" | |
| # Constants | |
| OBJROOT="${OBJROOT}/DependentBuilds" # After that, xcodebuild manages to build this target without issues with new build system introduced in Xcode 10. | |
| UNIVERSAL_OUTPUTFOLDER="${RELEASE_DIR}/${CONFIGURATION}-universal" |
NewerOlder