Fudgey
Fudgey

Reputation: 3833

Resizing a UIImageView from its Centre Point

I'm trying to use a slider to grow and image:

- (IBAction)sliderChangedSizeOfTarget:(UISlider *)slider {
    [puckImagePrev setTransform:CGAffineTransformMakeScale(slider.value, slider.value)];
}

However when it does this it doesn't grow from its centre point. Despeite the fact i have got the image set as centred in the properties window.

How is this possible?

Upvotes: 0

Views: 52

Answers (1)

Vlad
Vlad

Reputation: 3366

It might be a problem caused by AutoLayout. Try disabling it and see what happens then.

Upvotes: 1

Related Questions