API updates

This commit is contained in:
Ali
2021-07-02 20:13:29 +04:00
parent e2e669e74b
commit 2a09dda7d9
21 changed files with 75 additions and 692 deletions

View File

@@ -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
{