开发者

Why does my text look so bad in my ios App?

I have a uiscrollview that has a custom child view that contains text and images. The text items are UILabels. I have attached an image representing the quality iss开发者_如何学Cue:

Why does my text look so bad in my ios App?

Do you guys think it might be worth a shot to draw the text, then convert to a uiimage and display that instead? Maybe it would scale better? Or perhaps there is a way to smooth the text?


There's no reason to expect that you're going to draw the text better than UILabel does. Your picture is very hard to make out, but here's what you want to look at:

  • Are you just adding a UILabel to the UIScrollView's contentView, or are you doing something else fancier. That "something else fancier" could easily be the problem.
  • Make sure you're drawing on pixel-aligned boundaries. The easiest way is to make sure the origin of your UILabel is integral (not a fraction). On a retina display, you can get away with half-points, but it's usually easier just to make everything integers.


I thinks it is the position issue. I bet you set the x or y value to float value like 12.3 or 12.5 .


What I have done now is I have created a uiimage version of my text and am showing that now instead of the uilabels, the quality is soo much better, you can really see the difference when you are looking at it scaled up on the ipad, it must just do a better job scaling images then text?

Before:

Why does my text look so bad in my ios App?

After:

Why does my text look so bad in my ios App?

The above images show how the text renders on the ipad with my app scaled up, before and after my change.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜