Swiftgram/LegacyComponents/UIScrollView+TGHacks.m
Ilya Laktyushin 023d786ed5 no message
2018-07-03 17:23:29 +03: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