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
| // THANKS: http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/ | |
| for family: String in UIFont.familyNames { | |
| print("\(family)") | |
| for names: String in UIFont.fontNames(forFamilyName: family) { | |
| print("== \(names)") | |
| } | |
| } |
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
| # iOS screenshots to get around El Cap Xcode 8.2.1 issue | |
| # http://stackoverflow.com/a/41125408/84783 | |
| # Android / Genymotion screenshots | |
| # http://stackoverflow.com/a/24316765/84783 | |
| function ss() { | |
| i="0" | |
| while true; do | |
| filename=~/Desktop/$1_$2_`printf %02d $i`.png | |
| if [ "$1" == "ios" ]; then | |
| xcrun simctl io booted screenshot $filename |
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
| let playersArray: [[String: String]] = [ | |
| ["number": "1", "name": "De Gea", "position": "G"], | |
| ["number": "3", "name": "Bailly", "position": "D"], | |
| ["number": "6", "name": "Pogba", "position": "M"], | |
| ["number": "9", "name": "Ibrahimovic", "position": "F"], | |
| ["number": "8", "name": "Mata", "position": "M"], | |
| ["number": "10", "name": "Rooney", "position": "F"] | |
| ] | |
| let playersDictionary = playersArray.reduce([String:[String:String]](), { (dict, tuple) in |