From 206e32a76d35647d2e029a67d5b3278d55726698 Mon Sep 17 00:00:00 2001 From: Zhixuan Lai Date: Tue, 9 Dec 2014 20:29:33 -0800 Subject: [PATCH] new release --- README.md | 8 +++++--- ZLSwipeableView.podspec | 4 ++-- ZLSwipeableView/ZLPanGestureRecognizer.h | 13 +++++++++++++ ZLSwipeableView/ZLPanGestureRecognizer.m | 13 +++++++++++++ ZLSwipeableView/ZLSwipeableView.m | 14 ++++++++++---- .../ZLSwipeableViewDemo.xcodeproj/project.pbxproj | 6 ++++++ 6 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 ZLSwipeableView/ZLPanGestureRecognizer.h create mode 100644 ZLSwipeableView/ZLPanGestureRecognizer.m diff --git a/README.md b/README.md index ffc2ab7..39b8b70 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ZLSwipeableView =============== -A simple view for building card like interface like [Tinder](http://www.gotinder.com/) and [Potluck](https://www.potluck.it/). +A simple view for building card like interface like [Tinder](http://www.gotinder.com/) and [Potluck](https://www.potluck.it/). ZLSwipeableView was originally developed for [Murmur](http://zhxnlai.github.io/#/murmur). Preview --- @@ -79,9 +79,11 @@ Requirements - iOS 7 or higher. - Automatic Reference Counting (ARC). -Contributions +Credits --- -- Thanks [iamphill](https://github.com/iamphill) for adding new delegates +- Thanks [iamphill](https://github.com/iamphill) for adding new delegates. +- Thanks [mdznr](https://github.com/mdznr) for making the code style consistent. +- Thanks [coryalder](https://github.com/coryalder) for making dataSource and delegate IBOutlets. License --- diff --git a/ZLSwipeableView.podspec b/ZLSwipeableView.podspec index 162b654..adebdc7 100755 --- a/ZLSwipeableView.podspec +++ b/ZLSwipeableView.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "ZLSwipeableView" - s.version = "0.0.5" + s.version = "0.0.6" 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.5" } + s.source = { :git => "https://github.com/zhxnlai/ZLSwipeableView.git", :tag => "0.0.6" } s.source_files = "ZLSwipeableView", "ZLSwipeableView/**/*.{h,m}" # s.exclude_files = "Classes/Exclude" s.framework = "UIKit" diff --git a/ZLSwipeableView/ZLPanGestureRecognizer.h b/ZLSwipeableView/ZLPanGestureRecognizer.h new file mode 100644 index 0000000..777276b --- /dev/null +++ b/ZLSwipeableView/ZLPanGestureRecognizer.h @@ -0,0 +1,13 @@ +// +// ZLPanGestureRecognizer.h +// ZLSwipeableViewDemo +// +// Created by Zhixuan Lai on 12/9/14. +// Copyright (c) 2014 Zhixuan Lai. All rights reserved. +// + +#import + +@interface ZLPanGestureRecognizer : UIPanGestureRecognizer + +@end diff --git a/ZLSwipeableView/ZLPanGestureRecognizer.m b/ZLSwipeableView/ZLPanGestureRecognizer.m new file mode 100644 index 0000000..7435ddb --- /dev/null +++ b/ZLSwipeableView/ZLPanGestureRecognizer.m @@ -0,0 +1,13 @@ +// +// ZLPanGestureRecognizer.m +// ZLSwipeableViewDemo +// +// Created by Zhixuan Lai on 12/9/14. +// Copyright (c) 2014 Zhixuan Lai. All rights reserved. +// + +#import "ZLPanGestureRecognizer.h" + +@implementation ZLPanGestureRecognizer + +@end diff --git a/ZLSwipeableView/ZLSwipeableView.m b/ZLSwipeableView/ZLSwipeableView.m index 907d1cc..b5373b0 100755 --- a/ZLSwipeableView/ZLSwipeableView.m +++ b/ZLSwipeableView/ZLSwipeableView.m @@ -7,8 +7,9 @@ // #import "ZLSwipeableView.h" +#import "ZLPanGestureRecognizer.h" -static const int numPrefetchedViews = 3; +const NSUInteger kNumPrefetchedViews = 3; @interface ZLSwipeableView () @@ -111,7 +112,7 @@ - (void)loadNextSwipeableViewsIfNeeded { - (void)loadNextSwipeableViewsIfNeeded:(BOOL)animated { NSInteger numViews = self.containerView.subviews.count; NSMutableSet *newViews = [NSMutableSet set]; - for (NSInteger i=numViews; i