Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ios/EnrichedTextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)emitOnLinkPressEvent:(NSString *)url;
- (void)emitOnMentionPressEvent:(MentionParams *)mention;
- (void)emitOnImagePressEvent:(MediaAttachment *)attachment;
- (void)layoutAttachments;
@end

NS_ASSUME_NONNULL_END
Expand Down
11 changes: 11 additions & 0 deletions ios/enrichedTextTextView/EnrichedTextTextView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@

@implementation EnrichedTextTextView

- (void)layoutSubviews {
[super layoutSubviews];

// once the textView actually knows its width and height,
// we can position the inline images
EnrichedTextView *host = self.host;
if (!CGRectIsEmpty(host.textView.frame)) {
[host layoutAttachments];
Comment thread
hejsztynx marked this conversation as resolved.
}
}

- (void)copy:(id)sender {
EnrichedTextView *host = self.host;
if (host == nullptr) {
Expand Down
Loading