box86rowh
box86rowh

Reputation: 3415

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 issue:

enter image description here

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?

Upvotes: 2

Views: 936

Answers (3)

box86rowh
box86rowh

Reputation: 3415

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:

enter image description here

After:

enter image description here

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

Upvotes: 0

Rob Napier
Rob Napier

Reputation: 299265

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.

Upvotes: 5

Lunayo
Lunayo

Reputation: 538

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 .

Upvotes: 0

Related Questions