mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Video Editing
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#import "TGPhotoTextEntityView.h"
|
||||
|
||||
#import "TGPaintSwatch.h"
|
||||
#import "TGPhotoPaintFont.h"
|
||||
|
||||
#import "TGColor.h"
|
||||
#import "LegacyComponentsInternal.h"
|
||||
|
||||
@@ -102,6 +105,20 @@ const CGFloat TGPhotoTextSelectionViewHandleSide = 30.0f;
|
||||
return entity;
|
||||
}
|
||||
|
||||
- (UIImage *)image {
|
||||
CGRect rect = self.bounds;
|
||||
|
||||
UIGraphicsBeginImageContextWithOptions(CGSizeMake(rect.size.width, rect.size.height), false, 1.0f);
|
||||
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||
|
||||
[self drawViewHierarchyInRect:rect afterScreenUpdates:false];
|
||||
|
||||
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
- (bool)isEditing
|
||||
{
|
||||
return _textView.isFirstResponder;
|
||||
|
||||
Reference in New Issue
Block a user