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
| // | |
| // AppDelegate.swift | |
| // | |
| import UIKit | |
| @UIApplicationMain | |
| class AppDelegate: UIResponder, UIApplicationDelegate { |
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
| /* | |
| // TO APPLY DIFFERENT STRINGS FROM VARIANTS.STRINGS RATHER THAN LOCALIZABLE.STRINGS | |
| var localised:String | |
| { | |
| return Bundle.main.localizedString(forKey:self, value:Bundle.main.localizedString(forKey:self, value:nil, table:nil), table:"variants") | |
| } | |
| // TO CONTROL THE LINE HEIGHT OF AN ATTRIBUTED STRING (LIKE TAB BAR BUTTONS) | |
| let paragraphStyle = NSMutableParagraphStyle() |
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
| // | |
| // Functions.swift | |
| // Repnote | |
| // | |
| // Created by Jonathan Neumann on 23/03/2017. | |
| // Copyright © 2017 Audioy. All rights reserved. | |
| // | |
| import Foundation | |
| import UIKit |
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
| // HOW TO USE PRIVATE COCOAPODS | |
| // SOURCE: http://albertodebortoli.github.io/blog/2014/03/11/cocoapods-working-with-internal-pods/ | |
| // SOURCE: https://coderwall.com/p/7ucsva/private-cocoapods | |
| // SOURCE: http://product.hubspot.com/blog/architecting-a-large-ios-app-with-cocoapods | |
| 0. INSTALL COCOAPODS | |
| sudo gem install cocoapods | |
| 1. CHECK REPOS LOCATION, WHICH SHOULD BE EMPTY | |
| cd ~/.cocoapods/repos/ |
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
| // Remember to #import <CommonCrypto/CommonCrypto.h> in the Bridging-Header.h file | |
| /* Example of use | |
| let query = "#test1 #test2 #test3" | |
| let queryArray = query.characters.split{$0 == "#"}.map(String.init) | |
| guard let hash = combineStringsIntoHash(queryArray) else{ | |
| return | |
| } | |
| print("hash: \(hash)") | |
| */ |
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
| // | |
| // UITextViewWithPlaceholder.swift | |
| // Repnote | |
| // | |
| // Created by John Neumann on 11/01/2017. | |
| // Copyright © 2017 Audioy. All rights reserved. | |
| // | |
| import UIKit |
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
| // | |
| // UIScrollViewWithKeyboard.swift | |
| // Repnote | |
| // | |
| // Created by John Neumann on 29/01/2017. | |
| // Copyright © 2017 Audioy. All rights reserved. | |
| // | |
| import UIKit |
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 | |
| # | |
| # echo "Loading ${HOME}/.bash_profile" | |
| #source ~/.profile # get my PATH setup | |
| source ~/.bashrc # get my Bash aliases |
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 | |
| import UIKit | |
| extension UIColor{ | |
| class var random: UIColor { | |
| let hue : CGFloat = CGFloat(arc4random() % 256) / 256 // use 256 to get full range from 0.0 to 1.0 | |
| let saturation : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.5 // from 0.5 to 1.0 to stay away from white | |
| let brightness : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.5 // from 0.5 to 1.0 to stay away from black | |
| return UIColor(hue: hue, saturation: saturation, brightness: brightness, alpha: 1) | |
| } |
OlderNewer