0

i have an issue,

htmltext = [NSString stringWithFormat:@"<style>width:100%"

and the percentage (%) have a warning : invalid conversion specifier '"'

how we write percentage in obj c which is i write on webview.

thanks!

Jens
  • 67,715
  • 15
  • 98
  • 113
yogie1989
  • 27
  • 1
  • 6

2 Answers2

2

You should use %% which escapes the %.

However, if you don't have any parameters (as in your example) then you should just use:

htmltext = @"<style>width:100%";
hypercrypt
  • 15,389
  • 6
  • 48
  • 59
-2

Try this -

htmltext = [NSString stringWithFormat:@"<style>width:100%%"];

Use %% which escapes the %.

Akshay Nalawade
  • 1,447
  • 2
  • 14
  • 29