My requires is as below.
i have a added UILable
inside UIView width & height is 30
. i have set UIPinchGestureRecognizer
to that UIView
. Pinch in out functionality is working fine with UIView.
But my i want that when i zoom in UILable
font size and numberOfLine
automatically set in that UIView
.
So at initial UILable
not visible in View. When i Zoom in that time UILable
get the are to display text
so than UILable
will be visible (ex. This time in 3 line). If i increase the Zoom level than text will be display in one row.
how can archive this functionality ?
See the below screenshot What i want to do
******** Image 1 *****************
******** Image 2 *****************
******** Image 3 *****************
Thanks in Advance ..
See this: resize all subview in scrollViewDidZoom On
scrollViewDidZoom
you can set the font size proportionally to zoomScale. I would suggest to setnumberOfLines
to 0 on label, but of course you can set it manually too when zooming in/out.You can use the delegate to detect when the zoom changes, and make your label visible then:
Play with different values for
minimunScaleToShowZoom
and check which one suits you.