Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

namanhams

macrumors regular
Original poster
Jun 3, 2009
153
0
I have an image with detail :
- Dimension : 930 x 1433 pixels
- Resolution : 71 pixels / inch

The image has left/top/right/bottom border with black color

I display the image inside an UIImageView. The mode is "Scale to fill"
- If i set the width of the UIImageView to 84, i totally can not see the left border
- If i set the width to 85, i can see the left border but it's very blur
- If i set the width bigger and bigger, the left border appears clearer
- If i set the width to 120, it becomes normal

The same happens for top/bottom border
- Set height to 110 : can not see top/bottom border
- Set height to 120 : can see but still blur
- Set height to 140 : they become normal

I test it in the iPad simulator 4.3. When i view it in Interface Builder, it appears normal.

Anyone have any hint ?
Thanks.
 
Last edited:
In your IB. Have u thought about your View, that is in your NIB File. That it has a Navigation/Tool/Tabbar that you are not "telling" it about. Or even the gray status bar on top? (which costs u 20px too).
I Have had huge amounts of trouble with IB Before, but it was all because I'm doing code on top of that. Which makes it confused ;)
 
In your IB. Have u thought about your View, that is in your NIB File. That it has a Navigation/Tool/Tabbar that you are not "telling" it about. Or even the gray status bar on top? (which costs u 20px too).
I Have had huge amounts of trouble with IB Before, but it was all because I'm doing code on top of that. Which makes it confused ;)

I'm not sure i understand what you say. My issue is with the border of the image. There's nothing to deal with the Navigation/Tool/Tab bar.
 
How wide is the border? This does not sound strange to me: the image is being scaled so the border is going to get smaller and smaller as you make the image smaller and smaller. If you want a constant border with a scaling image within it this is not the way to do it.
 
How wide is the border? This does not sound strange to me: the image is being scaled so the border is going to get smaller and smaller as you make the image smaller and smaller. If you want a constant border with a scaling image within it this is not the way to do it.

I also guess it's the reason, but how come it appears normally in Interface Builder ?

Thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.