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
—– BEGIN LICENSE —– | |
K-20 | |
Single User License | |
EA7E-940129 | |
3A099EC1C0B5C7C5 33EBF0CF BE82FE3B |
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
// tap anywhere on the view | |
var viewTab = UITapGestureRecognizer(target: self, action: "dismissKeyboard") | |
view.addGestureRecognizer(viewTab) | |
func dismissKeyboard() { | |
view.endEditing(true) | |
} |
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 delay(delay: Double, closure: ()->()) { | |
dispatch_after( | |
dispatch_time( | |
DISPATCH_TIME_NOW, | |
Int64(delay * Double(NSEC_PER_SEC)) | |
), | |
dispatch_get_main_queue(), | |
closure | |
) | |
} |
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
You can turn it on manually if you want. Just quit Xcode first, open terminal and paste: | |
defaults write com.apple.dt.Xcode IDECodeCompletionFuzzyMode 3 |
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
Quit Xcode | |
Delete the folder /Users/<username>/Library/Developer/CoreSimulator/Devices. | |
For example, in Terminal: rm -rf ~/Library/Developer/CoreSimulator/Devices | |
In Terminal: killall -9 com.apple.CoreSimulator.CoreSimulatorService (or just reboot). |
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
xcodebuild \ | |
-scheme your-project-name \ | |
-sdk iphonesimulator \ | |
-destination 'platform=iOS Simulator,name=iPhone 6,OS=8.1' \ | |
test | xcpretty --test --color |
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
rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
rm -rf /Users/your-name/Library/Developer/Xcode/DerivedData/* |
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
rm -rf ~/.rbenv | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
rbenv install --list | |
rbenv install 2.2.3 |
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
import UIKit | |
struct Person { // Entity (usually more complex e.g. NSManagedObject) | |
let firstName: String | |
let lastName: String | |
} | |
struct GreetingData { // Transport data structure (not Entity) | |
let greeting: String | |
let subject: String |
OlderNewer