diff --git a/README.md b/README.md index 67b94e4..3a2d739 100644 --- a/README.md +++ b/README.md @@ -51,9 +51,15 @@ self.swipeableView.delegate = self; - (void)swipeableView: (ZLSwipeableView *)swipeableView didSwipeRight:(UIView *)view { NSLog(@"did swipe right"); } +- (void)swipeableView:(ZLSwipeableView *)swipeableView didStartSwipingView:(UIView *)view atLocation:(CGPoint)location { + NSLog(@"did start swiping at location: x %f, y%f", location.x, location.y); +} - (void)swipeableView: (ZLSwipeableView *)swipeableView swipingView:(UIView *)view atLocation:(CGPoint)location { NSLog(@"swiping at location: x %f, y%f", location.x, location.y); } +- (void)swipeableView:(ZLSwipeableView *)swipeableView didEndSwipingView:(UIView *)view atLocation:(CGPoint)location { + NSLog(@"did start swiping at location: x %f, y%f", location.x, location.y); +} ~~~ To swipe the top view programmatically: @@ -73,6 +79,10 @@ Requirements - iOS 7 or higher. - Automatic Reference Counting (ARC). +Contributions +--- +- Thanks [iamphill](https://github.com/iamphill) for adding new delegates + License --- ZLSwipeableView is available under MIT license. See the LICENSE file for more info. diff --git a/ZLSwipeableView.podspec b/ZLSwipeableView.podspec index 0db97cb..162b654 100644 --- a/ZLSwipeableView.podspec +++ b/ZLSwipeableView.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "ZLSwipeableView" - s.version = "0.0.3" + s.version = "0.0.5" s.summary = "A simple view for building card like interface like Tinder and Potluck." s.description = <<-DESC ZLSwipeableView is a simple view for building card like interface like Tinder and Potluck. It uses dataSource pattern and is highly customizable. @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "Zhixuan Lai" => "zhxnlai@gmail.com" } s.platform = :ios, "7.0" - s.source = { :git => "https://github.com/zhxnlai/ZLSwipeableView.git", :tag => "0.0.3" } + s.source = { :git => "https://github.com/zhxnlai/ZLSwipeableView.git", :tag => "0.0.5" } s.source_files = "ZLSwipeableView", "ZLSwipeableView/**/*.{h,m}" # s.exclude_files = "Classes/Exclude" s.framework = "UIKit" diff --git a/ZLSwipeableView/ZLSwipeableView.h b/ZLSwipeableView/ZLSwipeableView.h index c07ec08..9636281 100644 --- a/ZLSwipeableView/ZLSwipeableView.h +++ b/ZLSwipeableView/ZLSwipeableView.h @@ -20,7 +20,6 @@ - (void)swipeableView: (ZLSwipeableView *)swipeableView didEndSwipingView:(UIView *)view atLocation:(CGPoint)location; @end - // DataSource @protocol ZLSwipeableViewDataSource @required diff --git a/ZLSwipeableViewDemo/ZLSwipeableViewDemo/ViewController.m b/ZLSwipeableViewDemo/ZLSwipeableViewDemo/ViewController.m index 7fff861..b78eb56 100644 --- a/ZLSwipeableViewDemo/ZLSwipeableViewDemo/ViewController.m +++ b/ZLSwipeableViewDemo/ZLSwipeableViewDemo/ViewController.m @@ -78,9 +78,15 @@ - (void)swipeableView: (ZLSwipeableView *)swipeableView didSwipeLeft:(UIView *)v - (void)swipeableView: (ZLSwipeableView *)swipeableView didSwipeRight:(UIView *)view { NSLog(@"did swipe right"); } +- (void)swipeableView:(ZLSwipeableView *)swipeableView didStartSwipingView:(UIView *)view atLocation:(CGPoint)location { + NSLog(@"did start swiping at location: x %f, y%f", location.x, location.y); +} - (void)swipeableView: (ZLSwipeableView *)swipeableView swipingView:(UIView *)view atLocation:(CGPoint)location { NSLog(@"swiping at location: x %f, y%f", location.x, location.y); } +- (void)swipeableView:(ZLSwipeableView *)swipeableView didEndSwipingView:(UIView *)view atLocation:(CGPoint)location { + NSLog(@"did start swiping at location: x %f, y%f", location.x, location.y); +} #pragma mark - ZLSwipeableViewDataSource - (UIView *)nextViewForSwipeableView:(ZLSwipeableView *)swipeableView {