Zooming to UIView and it's sub-views

Posted by leon on Stack Overflow See other posts from Stack Overflow or by leon
Published on 2010-04-29T15:23:47Z Indexed on 2010/04/29 15:27 UTC
Read the original article Hit count: 245

Filed under:
|
|

Hi,

I have a UIView which I can zoom to (as it is set as a subview of UIScrollView). UIView has UILabel, UITextField, etc.

If I just zoom to the UIView, then of course label and text field get fuzzy (the same effect if you are zooming to the image file without changing image resolution).

To solve the problem I need to increase the font size and sizes of the UILable and UITextField in according to the scale used to zoom in (scale is passed as a param by the UIScrollView).

This is where I am getting confused.

  1. Changing frame (by increasing it width and height by zooming scale) I get all my elements (sub-views) repositions (because changing frame effects center and bounds)

Question: 1. What would I need to do to zoom in to the sub-views and just increase the sub-view sizes while keeping them in the exactly the same position?

thanks

© Stack Overflow or respective owner

Related posts about uiscrollview

Related posts about uiview