cocoa touch - iPhone animation with stretchable image -


I have found a UIView subclass that pulls UIImage as background. The image is created using the IjageLeftCapWidth: topCapHyight: method, it has round edges.

I also use the animation block inside, from which I resize my scene. I expected that during the animation, the drawRect: method is sometimes called, resulting in the background image being prepared properly.

Unfortunately, the animation seems to render the image and then save it again during the animation, which clearly makes the edges of the first round to stretch out.

I can think that there is only one solution that will uphold me three different UIImageViews (top cap, medium fill, bottom hat), original background image, and then fill the caps images again and Fill image scaling. However, it seems quite complex ...

Is there any better way than I can stop it?

EDIT: Found. Looks bad ...

While digging through some Apple docs, I accidentally got my problem Found solutions You only have to play with the UIView's contentStretch parameter. This lets you manually specify the area of ​​your view which is spread over during the animation.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -