|| | |||Browse by category|
Why my IlvZoomViewInteractor does not maintain the aspect ratio that I set on it?
You initialize a zoom view interactor and set the aspect ratio for the dragged rectangle. Then push the interactor on the view but at runtime the interactor does not keep the aspect ratio you just set.
What happens is that when the zoom view interactor is attached to the manager view:
- If this view is not keeping aspect ratio:
The interactor aspect ratio will be set to 0, which means no aspect ratio should be kept.
- If the view is keeping the ratio and the view has been made visible:
The interactor aspect ratio is the width/height ratio of the view's dimension.
- If the view is keeping the ratio and the view has not been made visible:
The aspect ratio set on the interactor will be kept as expected.
In order to be in the safe side, you should set aspect ratio of the interactor after it is attached to the view. For example:
IlvZoomViewInteractor zoomer = new IlvZoomViewInteractor();