mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-05-10 03:11:09 +00:00
Update RootOptionsController.m
This commit is contained in:
parent
bd47cce0d4
commit
be69cedbbf
1 changed files with 9 additions and 0 deletions
|
|
@ -178,6 +178,15 @@
|
||||||
|
|
||||||
@implementation RootOptionsController (Privates)
|
@implementation RootOptionsController (Privates)
|
||||||
|
|
||||||
|
- (UIImage *)resizeImage:(UIImage *)image toSize:(CGSize)size {
|
||||||
|
UIGraphicsBeginImageContextWithOptions(size, NO, [UIScreen mainScreen].scale);
|
||||||
|
[image drawInRect:CGRectMake(0, 0, size.width, size.height)];
|
||||||
|
UIImage *resizedImage = UIGraphicsGetImageFromCurrentImageContext();
|
||||||
|
UIGraphicsEndImageContext();
|
||||||
|
|
||||||
|
return resizedImage;
|
||||||
|
}
|
||||||
|
|
||||||
- (UIImage *)resizeImage:(UIImage *)image newSize:(CGSize)newSize {
|
- (UIImage *)resizeImage:(UIImage *)image newSize:(CGSize)newSize {
|
||||||
UIGraphicsBeginImageContextWithOptions(newSize, NO, [UIScreen mainScreen].scale);
|
UIGraphicsBeginImageContextWithOptions(newSize, NO, [UIScreen mainScreen].scale);
|
||||||
[image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];
|
[image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue