mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-04 20:00:53 +00:00
+ Now comes with vertical AND horizontal centering.
This commit is contained in:
parent
901a2e1cdd
commit
f9bc3d74cb
@ -138,7 +138,7 @@ typedef NS_ENUM(NSInteger, BITImageAnnotationViewControllerInteractionMode) {
|
|||||||
self.scaleFactor = factor;
|
self.scaleFactor = factor;
|
||||||
CGSize scaledImageSize = CGSizeMake(self.image.size.width * factor, self.image.size.height * factor);
|
CGSize scaledImageSize = CGSizeMake(self.image.size.width * factor, self.image.size.height * factor);
|
||||||
|
|
||||||
CGRect baseFrame = CGRectMake(self.view.frame.size.width/2 - scaledImageSize.width/2, self.view.frame.size.height - size.height, scaledImageSize.width, scaledImageSize.height);
|
CGRect baseFrame = CGRectMake(self.view.frame.size.width/2 - scaledImageSize.width/2, self.view.frame.size.height/2 - scaledImageSize.height/2, scaledImageSize.width, scaledImageSize.height);
|
||||||
|
|
||||||
self.imageView.frame = baseFrame;
|
self.imageView.frame = baseFrame;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user