Created
September 19, 2015 14:39
-
-
Save romainmenke/c785a6c2defcb6714439 to your computer and use it in GitHub Desktop.
This file contains 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 | |
var toggleSwitch = UISwitch() | |
var realFrame : CGRect? | |
let frame = toggleSwitch.frame | |
let bounds = toggleSwitch.bounds | |
let subViews = toggleSwitch.subviews | |
let internalView = subViews.first! | |
let internalSubViews = internalView.subviews | |
for i in 0..<internalSubViews.count { | |
guard let imageView = internalSubViews[i] as? UIImageView else { | |
continue | |
} | |
realFrame = imageView.frame | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment