ios - UIImageView and UIButton mess image after screen rotation -


i'm trying make container arrow. container uiview, arrow uiimageview positioning opposite parent center.

i created 'popover' button background image , added arrow. works fine.

all ok

you see rectangle sides sharp.

ok, let's rotate.

mess 1

wat. rotate again...

mess 2

images scaled. , resizing isn't constant. frames ok.

before rotation

2013-04-18 21:20:41.198 project[15790:907]  conta: {{124, 313}, {200, 49}} content: {{0, 9}, {200, 40}} arrow: {{87, 0}, {19, 9}} 

after rotation

2013-04-18 21:22:06.717 project[15790:907]  container: {{161, 387}, {200, 49}} content: {{0, 9}, {200, 40}} arrow: {{87, 0}, {19, 9}} 

what happening there? tried content modes or whatever. autoresizesubviews on views turned off.

after rotation, call cgrectintegral on frames of view(s) in question.

the reason problem ending between pixels being aliased. typically happens when e.g. view centered.

a quick way confirm has happened in simulator check debug > color misaligned images. if images colored, yes, misaligned: not being drawn @ integral pixel coordinates.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -