Swiftgram/submodules/LegacyComponents/Sources/UIScrollView+TGHacks.m
2020-02-22 15:38:54 +04:00

21 lines
500 B
Objective-C

#import "UIScrollView+TGHacks.h"
#import <objc/message.h>
@implementation UIScrollView (TGHacks)
- (void)stopScrollingAnimation
{
CGPoint offset = self.contentOffset;
[self setContentOffset:offset animated:false];
self.scrollEnabled = false;
self.scrollEnabled = true;
// UIView *superview = self.superview;
// NSUInteger index = [self.superview.subviews indexOfObject:self];
// [self removeFromSuperview];
// [superview insertSubview:self atIndex:index];
}
@end