Skip to content

Commit

Permalink
Release 1.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo committed Mar 3, 2016
1 parent 79fb346 commit 4478225
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LCBannerView.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "LCBannerView"
s.version = "1.1.0"
s.version = "1.2.0"
s.summary = "A very popular and highly customized banner view! Infinite loop! Support: http://LeoDev.me"
s.homepage = "https://github.com/LeoiOS/LCBannerView"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down
7 changes: 6 additions & 1 deletion LCBannerView/LCBannerView.h
Expand Up @@ -7,7 +7,7 @@
//
// GitHub: http://github.com/LeoiOS
// Mail: mailto:devtip@163.com
// V 1.1.0
// V 1.2.0

#import <UIKit/UIKit.h>

Expand Down Expand Up @@ -35,6 +35,11 @@
*/
@property (nonatomic, assign) CGFloat pageDistance;

/**
* Do not allow scrolling. Default allow scrolling.
*/
@property (nonatomic, assign) BOOL notScrolling;


#pragma mark - Class methods

Expand Down
13 changes: 13 additions & 0 deletions LCBannerView/LCBannerView.m
Expand Up @@ -193,6 +193,19 @@ - (void)setPageDistance:(CGFloat)pageDistance {
}
}

- (void)setNotScrolling:(BOOL)notScrolling {
_notScrolling = notScrolling;

if (notScrolling) {
self.pageControl.hidden = YES;
self.scrollView.scrollEnabled = NO;

if (self.timer) {
[self removeTimer];
}
}
}

#pragma mark - Timer

- (void)addTimer {
Expand Down
3 changes: 2 additions & 1 deletion LCBannerViewDemo/ViewController.m
Expand Up @@ -35,6 +35,7 @@ - (void)viewDidLoad {
currentPageIndicatorTintColor:[UIColor orangeColor]
pageIndicatorTintColor:[UIColor whiteColor]];
bannerView.pageDistance = 20.0f;
bannerView.notScrolling = YES;
bannerView;
})];

Expand Down Expand Up @@ -75,7 +76,7 @@ - (void)viewDidLoad {

- (void)bannerView:(LCBannerView *)bannerView didClickedImageIndex:(NSInteger)index {

NSLog(@"you clicked image in %@ at index: %ld", bannerView, (long)index);
NSLog(@"you clicked image in %p at index: %ld", bannerView, (long)index);
}

@end

0 comments on commit 4478225

Please sign in to comment.