简体   繁体   中英

Customization UISegmentedcontrol and UISwitch iOS 9 in swift without installing pods

3 days I am searching internet for Customization UISegmentedcontrol and UISwitch iOS 9 in swift. I got switch and segmented control, so I want to implement some fancy design with images etc... but I cant find anything without installing some old cocoa pods in obj-C. Is there native way to custimizate them? some fresh new tutorial for this issue? As well, I dont want to programmatically set them.

Thanks in advance.

PS I hope there wont be down vote :)

EDITED:

图片1

图片2

图片3

Both UISwitch and UISegmentedControl have fairly powerful inbuilt customisation capabilities, such as allowing you to set background images, tint colour, text attributes, You can also try subclassing or extending these control for even more granular control. Try referring to these docs:

https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISwitch_Class/index.html#//apple_ref/doc/uid/TP40006784-CH3-SW7

https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISegmentedControl_Class/index.html#//apple_ref/doc/uid/TP40006807-CH3-SW33

:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM