ios - Customize uiswitch image properly? -
i have uiswitch in ios 6 app, that's on , off image customised.
self.testswitch.onimage = [uiimage imagenamed:@"on"]; self.testswitch.offimage = [uiimage imagenamed:@"off"];
i use 77 points wide , 22 points tall image purpose (154x44 in retina), stated in documentation. image not fit uiswitch, seems ugly, default style hides one, on attached image.
what should set make work in proper way?
apple doesn't have appearance api uiswitch
. can set tint color property (ontintcolor
). that's not want, guess. problem customizing uiswitch there's opportunity apple reject app.
but there apis custom switch such rcswitch
(https://github.com/robertchin/rcswitch) or ttswitch
. tutorial , example of how use rcswitch
can found here: http://www.raywenderlich.com/23424/photoshop-for-developers-creating-a-custom-uiswitch.
Comments
Post a Comment