开发者

UISwitch or other UIControl similar to the Camera app switch

I'm quite new to stackoverflow and this is my first quest开发者_如何学Pythonion.

I am trying to make a control that looks like the one used in the Apple Camera app to switch between video and picture modes, take a look here, the switch at the right bottom of the image.

I have read some other threads about UISwitch customization, but all of them talk about customizing fonts, labels or colors.

Do you have a clue of where I could start? Do you think using UISwitch is a good idea or maybe another type of UIControl? I tried to change the height of an UISwitch but it seems it remains always the same default height.

Thank you!


UISwitch is implemented using a UISlider. UISlider lets you customize almost everything. Simply set the 'continuous' property to NO and when you get the control event that the value changed, after they released their finger, use code to move it to the left or right depending on whether the value is greater than or less than 0.5 or something similar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜