views:

29

answers:

1

hi all

i am scaling UIView using

[UIView setTransform:CGAffineTransformMakeScale(2.0*scale.value, 2.0*scale.value)]; 

its works fine for me but all subviews are also scale with the UIView, but i don't want to scale all subviews of that UIView.

i tried following this to stop scale subviews.

[UIView setAutoresizesSubviews:NO];

UIView.autoresizingMask = UIViewAutoresizingNone;

but still it scale subviews.

please help me.

A: 

Transformation works on the whole view as it is. There is no way to take things out of it.

Using transform matrices don't alter the size of your views directly, it just determines how the whole thing thing is then rendered on the screen.

If you just scale it by a factor of two, you won't gain or lose any level of detail either. Maybe set its frame instead.

Eiko