mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
API updates
This commit is contained in:
@@ -29,15 +29,6 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (void)addTextViewMethods
|
||||
{
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^
|
||||
{
|
||||
InjectInstanceMethodFromAnotherClass([HPTextViewInternal class], [HPTextViewInternal class], @selector(textViewAdjustScrollRange:animated:), NSSelectorFromString(TGEncodeText(@"`tdspmmSbohfUpWjtjcmf;bojnbufe;", -1)));
|
||||
});
|
||||
}
|
||||
|
||||
- (void)setText:(NSString *)text
|
||||
{
|
||||
BOOL originalValue = self.scrollEnabled;
|
||||
@@ -64,25 +55,6 @@
|
||||
[super setScrollEnabled:isScrollable];
|
||||
}
|
||||
|
||||
- (void)textViewAdjustScrollRange:(NSRange)range animated:(BOOL)animated
|
||||
{
|
||||
static SEL selector = NULL;
|
||||
static void (*impl)(id, SEL, NSRange, BOOL) = NULL;
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^
|
||||
{
|
||||
Method method = class_getInstanceMethod([UITextView class], selector);
|
||||
if (method != NULL)
|
||||
impl = (void (*)(id, SEL, NSRange, BOOL))method_getImplementation(method);
|
||||
});
|
||||
|
||||
animated = false;
|
||||
|
||||
if (impl != NULL)
|
||||
impl(self, selector, range, animated);
|
||||
}
|
||||
|
||||
- (void)scrollRectToVisible:(CGRect)__unused rect animated:(BOOL)__unused animated
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user