i'm using UIWebview to display a local html page.
i tried this
text<span><span/>text
in iOS5, it's "texttext",
but in iOS4, it's "text text".
there is a space,and i want to remove this little space.
any help is appreciated,thanks,
and sorry for my English.
You made a mistake in a span tag. Should be <span></span>. Is it helping? If not, you can manually change CSS params.
Related
I'm attempting to render content both in a UILabel as well as in a WKWebView containing Urdu text. For display Noto Nastalique is used. However, it seems iOS has issues computing the correct spacing/ligature.
Using text from http://behdad.org/urdu/ as a test subject UILabel renders
while WKWebView renders (notice the glyphs overlapping)
In this small example the problems are most obvious in WebKit, but there are similar issues when wrapping text in UILabel. I'm hoping someone has faced and solved similar issues, or could point to information on best-practices for displaying Urdu content.
Example project can be found on github
I believe it is a problem with "Google Noto Nastaleeq" font on iPhone. Apple did try to implement in iOS 9. They had the similar problem.
Have you try to implement Jamil Noori Nastaleeq? Read my guide there I noticed Jamil Noori Nastleeq typeface don't have that kind of rendering issue.
For a reference please read my article that how I was able to make it so. https://medium.com/#mmudassir/nastleeq-and-ios-8-love-story-bit-broken-7cc2311fc784?source=linkShare-563fcf255dda-1461862616
I've already searched a lot regarding this topic and it honestly seems impossible.
Which is a bummer, since being able to add some small details/artistic touch to this bland area would definitely be very welcome.
Unless I am mistaken and there is a way to do that - please, enlighten!
Afaik no, since it is provided by the app, not by the html code. All scrollviews have this behavior enabled by default.
However a image as backgroundcolor should be visible.
I have an app using phonegap. But When I open voiceover function, it read the out the html code for me. For example . It will read "banner png Image". Is there any method that I can use to skip reading div?
Thank you.
I don't think your assumption is correct. I believe it is reading out the file name of the image. Give it a label of some kind!
I know that I can put a link in a UITextView such as "http://stackoverflow.com/" and have it auto detected. I want to know if there is a way to set the UITextView so that the link appears as "Visit StackOverflow" in the UITextView, or if I have to use a UIWebView to do that. I'm fairly sure that I have to use a UIWebView, but I want to make sure.
As far as I'm aware you can't do that, and from reading other posts it appears that there is an undocumented method, but that would get you app rejected (http://stackoverflow.com/questions/2454067/display-html-text-in-uitextview). Why not simply use a web view? As that is what it is designed for! ;)
Jonathan
I have this help page I want to add to my application, but I'm not sure of how to format it. At the moment it's just an image in a scrollview, but surely there's a better way?
Many apps use a WebView to display formatted text. You can then use CSS to style your content as needed.
You could use NSAttribuatedString + RTLabel to display it (or of cause the default cheat of a UIWebView).
To display RichText (NSAttribuatedString use one of these).
http://www.cocoacontrols.com/platforms/ios/controls/rtlabel
https://github.com/Cocoanetics/NSAttributedString-Additions-for-HTML
http://www.cocoanetics.com/2011/01/uiwebview-must-die/
https://github.com/AliSoftware/OHAttributedLabel
https://github.com/mattt/TTTAttributedLabel
Use webview to and with webservices so u can change it later so on