In my app i have a UIWebView having a content from file (HTML)
im wondering if there is any way to let the user changing the font color form 5 colors or something like that
Any way??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you want to change it from the app (objective-c) or the html?
You could create a javascript function inside your html file which changes the font (by changing a class on the body tag for example).
If you want to change it from the app you can call the function with:
[webView stringByEvaluatingJavaScriptFromString:@"changeColor('red')"];something like this should work.
CSS
JS
Example
http://jsfiddle.net/mMhwC/