Skip to content

Commit

Permalink
1.1 Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vowed21 committed Jan 20, 2016
1 parent e51c80e commit 0c72307
Show file tree
Hide file tree
Showing 31 changed files with 477 additions and 657 deletions.
13 changes: 0 additions & 13 deletions HWViewPager.podspec

This file was deleted.

466 changes: 0 additions & 466 deletions HWViewPager.xcodeproj/project.pbxproj

This file was deleted.

41 changes: 0 additions & 41 deletions HWViewPager/Base.lproj/LaunchScreen.xib

This file was deleted.

2 changes: 2 additions & 0 deletions HWViewPager.h → HWViewPager/HWViewPager.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@

-(void) setPagerDelegate:(id<HWViewPagerDelegate>)pagerDelegate;

-(void) setPage:(NSInteger)page isAnimation:(BOOL)isAnim;

@end

14 changes: 14 additions & 0 deletions HWViewPager.m → HWViewPager/HWViewPager.m
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,20 @@ -(CGFloat) getOffsetFromPage:(NSInteger)pageNum scrollView:(UIScrollView*)scroll
}


-(void) setPage:(NSInteger)page isAnimation:(BOOL)isAnim{

if(page == self.selectedPageNum || page >= self.itemsTotalNum){
return;
}

CGFloat offset = [self getOffsetFromPage:page scrollView:self];
[self setContentOffset:CGPointMake(offset, 0) animated:isAnim];
self.selectedPageNum = page;
if(self.userPagerDelegate != nil){
[self.userPagerDelegate pagerDidSelectedPage:page];
}
}




Expand Down
12 changes: 0 additions & 12 deletions HWViewPager/Images.xcassets/first.imageset/Contents.json

This file was deleted.

Binary file removed HWViewPager/Images.xcassets/first.imageset/first.pdf
Binary file not shown.
12 changes: 0 additions & 12 deletions HWViewPager/Images.xcassets/second.imageset/Contents.json

This file was deleted.

Binary file not shown.
Loading

0 comments on commit 0c72307

Please sign in to comment.