sofach / SFHidesOnSwipe

add hidesOnSwipe to view
MIT License
1 stars 1 forks source link

SFHidesOnSwipe (support ios5+)

add hidesOnSwipe to view

Installation with CocoaPods


pod 'SFHidesOnSwipe'

Usage

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [yourview sf_hidesOnSwipeScrollView:yourscrollview fromFrame:orignFrame toFrame:finalFrame];
}

- (void)dealloc { // 由于有监听scroll,这里必须设置滑动的scrollview为nil,从而取消监听
    [yourview sf_hidesOnSwipeScrollView:nil fromFrame:orignFrame toFrame:finalFrame];
}

enjoy it