mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
MESSENGER-3699 double tap for image attachments
This commit is contained in:
committed by
Frank Rotermund
parent
6445195cf6
commit
f2cfaf3b9e
@@ -317,7 +317,7 @@
|
||||
|
||||
scrollView.zoomScale = 1.0;
|
||||
scrollView.minimumZoomScale = 1.0;
|
||||
scrollView.maximumZoomScale = scaleX;
|
||||
scrollView.maximumZoomScale = 3.0;
|
||||
|
||||
// update the image frame to ensure that it fits to the scrollview frame
|
||||
imageView.frame = scrollView.bounds;
|
||||
@@ -922,4 +922,20 @@ andImageOrientation:(UIImageOrientation)orientation
|
||||
return self.stretchable ? imageView : nil;
|
||||
}
|
||||
|
||||
// BWI: allow changing the image zoom level by double tab
|
||||
- (void)toggleZoomLevel
|
||||
{
|
||||
CGFloat currentZoomScale = scrollView.zoomScale;
|
||||
|
||||
if (currentZoomScale < 1.5) {
|
||||
scrollView.zoomScale = 2.0;
|
||||
}
|
||||
else if (currentZoomScale < 2.5) {
|
||||
scrollView.zoomScale = 3.0;
|
||||
}
|
||||
else {
|
||||
scrollView.zoomScale = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user