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 UIKit | |
| class someClass: UIViewController { | |
| @IBOutlet weak var phoneNumber: UITextField! | |
| static let localNumberMaxLength = 7 | |
| static let areaCodeMaxLength = 3 | |
| static let countryCodeMaxLength = 3 | |
| func StringRangeToRange(text: String, range: NSRange) -> Range<String.Index> { |
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 UIKit | |
| class TableViewController: UITableViewController, UITextFieldDelegate { | |
| // MARK: - | |
| // MARK: Outlets | |
| @IBOutlet weak var loginField: UITextField! | |
| @IBOutlet weak var passwordField: UITextField! | |
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 | |
| func delay(delay:Double, closure:()->()) { | |
| dispatch_after( | |
| dispatch_time( | |
| DISPATCH_TIME_NOW, | |
| Int64(delay * Double(NSEC_PER_SEC)) | |
| ), | |
| dispatch_get_main_queue(), closure) | |
| } |
NewerOlder