Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Classes/GoAutoSlideView.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ NS_ASSUME_NONNULL_BEGIN
* The bottom margin of indicator.
*/
@property (nonatomic, assign) CGFloat indicatorBottomMargin;
/**
* The page control of the slide view.
*/
@property (nonatomic, strong, readonly) UIPageControl *pageControl;
/**
* Loads/Reloads the page view of the auto slide view.
*/
Expand Down
4 changes: 1 addition & 3 deletions Classes/GoAutoSlideView.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ @interface GoAutoSlideView() <UIScrollViewDelegate>

@property (nonatomic, strong) NSTimer *slideTimer;

@property (nonatomic, strong) UIPageControl *pageControl;

@property (nonatomic, strong) NSMutableArray *contentViews;

@property (nonatomic, strong) UIScrollView *scrollView;;
Expand Down Expand Up @@ -64,7 +62,7 @@ - (void)resetPageControl{
return;
}
if (!self.pageControl) {
self.pageControl = [[UIPageControl alloc] init];
self->_pageControl = [[UIPageControl alloc] init];
self.pageControl.hidesForSinglePage = YES;
self.pageControl.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
self.pageControl.center = CGPointMake(CGRectGetWidth(self.bounds) / 2, CGRectGetHeight(self.bounds) - (self.indicatorBottomMargin > 0 ? self.indicatorBottomMargin : 20));
Expand Down