ios - Making an image go full screen like in photos app -
how can create uiimage go total screen, not actual frame of image, photos in ios photos app, tap photo , goes special total screen mode, can zoom in etc. many thanks!
add uiimageview
subview uiscrollview
it's frame equal size of screen.
set uiscrollviewdelegate
, implement delegate method:
- (uiview *)viewforzoominginscrollview:(uiscrollview *)scrollview { homecoming self.yourimageview; }
attach 2 tap gesture recognizers imageview:
single tap recognizer -> zooming normal frame double tap recognizer -> zooming in rapidly specific spotimplement tapgesturerecognizer selectors , direct zoom logic using:
cgpoint location = [taprecognizer locationinview:self.yourimageview]; // location of tap
and
[self.scrollview zoomtorect:whateverrect animated:yes]; //zooming in/out locations [self.scrollview setzoomscale:whateverscale animated:yes];
ios objective-c swift uiimageview
No comments:
Post a Comment