Change the text of UISwitch - iphone

I want to change the switch control text YES/NO in place of ON/OFF , i am not know is it possible or not. if its possible and any one know about it please help me?
Thanks

I think its not possible to change the text of switch in proper way, but every problem has minimum one solution so for your problem you have to create the custom switch control
for help download the code from
here
1 : http://www.xprogress.com/post-30-uiswitch-tutorial-example-how-to-use-the-switch-in-xcode-for-iphone-sample-included/
2 : http://www.catamount.com/blog/1063/uicustomswitch-customizing-uiswitch-color-it-change-labels/
3 : help check this also http://www.xprogress.com/post-30-uiswitch-tutorial-example-how-to-use-the-switch-in-xcode-for-iphone-sample-included/
Thanks,
Raj

There is no way to change this two values in easy way.
You can look here: http://www.catamount.com/blog/1063/uicustomswitch-customizing-uiswitch-color-it-change-labels/
but this solution make custom UISwitch which got other graphics

I currently use this open source library called RCSwitch . Much more robust than the others mentioned.

Related

Is it possible to connect image-maps to the slides?

In order to define areas of the slides as links to wherever, it would be desirable, if the "usemap" tag could be used for that.
Is that possible?
Yes, definitely. Please just try and let me know if there is any problem.

Custom UIActionSheets?

My question is one that I have been wondering for a while now, and I am ready to ask it. In my app, I have a flat unique design in which the default UIActionSheet design does not match.
My question is, how would I go about changing the design, or better yet: Could I create a UIView with the button(s) and add it to the view each time I want my custom created UIActionSheet to show?
Thank you for the help in advance!
Hi you can try this library :
BlockAlertsAnd-ActionSheets

How to programmatically change help contents in Eclipse?

I have an eclipse plugin and I would like to programmatically disable help content TOC's based on a variable I define. In a nut shell, I want to prevent some help docs from showing up in the help contents if a specific type of user is accessing the plugin.
Preferably I would like to do this in the ApplicationWorkbenchAdvisor somewhere.
One thought would be to modify the "primary" value to be false if the variable were set.
Not sure if it would work, but try using the org.eclipse.ui.activities extension point. The tutorial from Vogella tells it is possible to hide only UI elements like wizards, views and so on, but it is from 2009.. Not sure if hiding TOC is now possible. If you try it out, would be nice to give a feedback ;)

Custom Switch - Yes No Type - iPhone

Is there any chance of getting this above switch implemented? Any reference source would be helpful.
You can create Custom switch button with the Help of image. Create a switch button (Set Alpha below to 1) and place a image above UISwitch it will work perfect.
https://github.com/samvermette/SVSegmentedControl
https://github.com/samsoffes/sstoolkit
https://github.com/alinux/iPhone-custom-switch-UIView
This isn't going to be an answer to solve your question, as it is going to be more of a piece of UX advice.
This type of switch goes against Apple's HIG.
You should never display a segmented control or switch where the user will not be able to tell when the control/switch is "On" or "Off". If I were someone who hadn't used switches in an iOS application before, I would not be able to tell what's "On" or "Off" in the image above. It may be easy for you to determine this, but you need to consider the possibility of someone (with less intuition than you) using your application.
Hope this helps.
Take a look at this replacement UISwitch project.

How to change selected text color?

I'm using UITextView, and I need to change color(or background) of selected text, is it posible and how to implement it?
Thx to all, I've understood that it was bad idea.
Take a look at OHAttributedLabel. You will find it here. It basically allows you to format only parts of a label.
Thanks Joseph for mentionning my OHAttributedLabel class/work :)
Hope that helped !
Anyway, since the date of your answer, I did some improvements to my class and fixed some stuff in the code, so don't forget to update / pull from the github repo!
PS: (Sorry for posting a new answer, can't add a comment to an existing answer yet on SO as I just signed in)