Skip to content

sofach/SFHidesOnSwipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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