- Visually indicates which controls are active or have actions associated with them.
- Use tintColor in code to set Tint.
Example:view.tintColor = UIColor.red
- Setting Tint on a UIView changes the tint for all subviews.
Example: - You can override Tint set by the parent UIView by setting Tint on the control.
- Globally set Tint in the AppDelegate.
Example:var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { window?.tintColor = UIColor.purple return true }
- Globally set Tint through Storyboard.
Example: - The non-transparent parts of a UIImage can use the Tint color.
Change the "Render As" property to "Template Image". Done from the image in the Assets.xcassets: - Note: As of Xcode 8, the tint will only show on the image during run-time, not design-time on the StoryBoard.
(Xcode 8)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.