How to set Texfield or Label max length

1. For Max/Min lenght textField or Label must be same name/ variabel ex: textFiledMin.text textFiledMin.text = textFiledMin.text?.safelyLimitedTo(length: 3) //if u use this, need code below TextLengthsMax.swift p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #18b5b1; background-color: #292b36} span.s1 {color: #e7e8eb} span.s2 {color: #29a09f} span.s3 {color: #00aaa3} 2. For UitextField https://stackoverflow.com/questions/25223407/max-length-uitextfield only for fields that are in use...

Passing Data Use User Dafault (viewController 1 --> ViewContoller 3)

This time we have problem is "How to passing data from first view controller to third view controller", now this my answer. take a look.   Above have 3 picture "FirstController -> SecondController -> ThirdController" and use this code UserDafault  - FirstController import UIKit class PassUserDafaultViewController: UIViewController { @IBOutlet weak var textFieldUser: UITextField! override func viewDidLoad() { super.viewDidLoad() } @IBAction...

Login Use Alamofire And SwiftyJSON (Swift 4)

1. Create textField in story board or .xib file import Alamofire import SwiftyJSON import UIKit class LoginViewController: UIViewController, UITextFieldDelegate { @IBOutlet var emailTField: UITextField! @IBOutlet var passTField: UITextField! 2. Button action @IBAction func bMasuk(_ sender: Any) { guard let email = emailTField.text, !(emailTField.text?.isEmpty)! else { return } guard let password = passTField.text, !(passTField.text?.isEmpty)! else { return } let...

Custom Keyboard For textFIeld ( Swift 4)

Use tap Gesture Recognizer in your viewcontroller, and add Action like this below @IBAction func didTapScreen(_ sender: Any) { } First textField (textField1) setting Return Key --> Next Second textField (textField2) setting Return Key --> Done This full code in viewController.swift import UIKit class CustomKeyViewController: UIViewController, UITextFieldDelegate { @IBOutlet weak var textField1: UITextField! @IBOutlet weak var textField2: UITextField!...

Button Alerts With UIAlertController In Swift 4

-- Responding To User Interaction With Actions (.actionSheet) @IBAction func bMasuk(_ sender: Any) { let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) alert.addAction(UIAlertAction(title: "Upload", style: .default, handler: nil)) alert.addAction(UIAlertAction(title: "Contoh Foto", style: .default, handler: { action in let vc = ContohFotoViewController() self.present(vc, animated: true, completion: nil) })) alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil)) self.present(alert, animated: true) }...

Google SignIn Delegate Navigation to second viewController SWIFT 4

I have some problem in login google, i want to google login auto to next layout, no back to firstViewController but next viewController ( secondViewcontroller ) Google button --> Sign In --> First Controller  Google button --> Sign In --> Second View Controller and finally i solve problem like this code below. 1.  func sign  import UIKit import...

Custom button Sign in Facebook swift 4

Facebook Login in Swift 4      The Facebook SDK in Swift enables people to sign into your app with Facebook Login. When people log into your app with Facebook they can grant permissions to your app so that you can retrieve information or perform actions on the Facebook platform on their behalf. First you must install CocoaPods facebook....

Page 1 of 221234522Next