Last active
August 17, 2016 07:01
-
-
Save Gurdeep0602/01f3fffe605c71fcee1ca829cf9f3b78 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
// | |
// PrettyTextField.swift | |
// | |
// | |
// Created by Gurdeep Singh on 26/05/15. | |
// Copyright (c) 2015 AppInventiv. All rights reserved. | |
// | |
import UIKit | |
class PrettyTextField: UITextField { | |
let padding : CGFloat = 10.0 | |
override func textRectForBounds(bounds: CGRect) -> CGRect { | |
var rect = bounds | |
rect.origin.x = rect.origin.x + padding | |
return rect | |
} | |
override func editingRectForBounds(bounds: CGRect) -> CGRect { | |
var rect = bounds | |
rect.origin.x = rect.origin.x + padding | |
return rect | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment