mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Merge branch 'beta' into bazel
This commit is contained in:
@@ -71,6 +71,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
//! @abstract The range of text currently selected. If length is zero, the range is the cursor location.
|
||||
@property NSRange selectedRange;
|
||||
|
||||
@property (readonly) CGRect selectionRect;
|
||||
|
||||
#pragma mark - Placeholder
|
||||
/**
|
||||
@abstract Indicates if the receiver is displaying the placeholder text.
|
||||
|
||||
@@ -566,6 +566,15 @@
|
||||
_textKitComponents.textView.selectedRange = selectedRange;
|
||||
}
|
||||
|
||||
- (CGRect)selectionRect {
|
||||
UITextRange *range = [_textKitComponents.textView selectedTextRange];
|
||||
if (range != nil) {
|
||||
return [_textKitComponents.textView firstRectForRange:range];
|
||||
} else {
|
||||
return [_textKitComponents.textView bounds];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Placeholder
|
||||
- (BOOL)isDisplayingPlaceholder
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user