Created
July 6, 2020 21:46
-
-
Save BrunoScheltzke/e2764d33bbf736998cd7a97f6ae77841 to your computer and use it in GitHub Desktop.
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
// | |
// UITextField.swift | |
// | |
// Created by Bruno Scheltzke on 07/06/20. | |
// Copyright © 2020 Bruno Scheltzke. All rights reserved. | |
// | |
import UIKit | |
extension UITextField { | |
func setLeftPaddingPoints(_ amount:CGFloat){ | |
let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: amount, height: self.frame.size.height)) | |
self.leftView = paddingView | |
self.leftViewMode = .always | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment