Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to NKJPagerViewController

nakajijapan
February 18, 2015

Introduction to NKJPagerViewController

NKJPagerViewController is a PagerTabStrip, which is in Android. It contains an endlessly scrollable UIScrollView.

https://github.com/nakajijapan/NKJPagerViewController

nakajijapan

February 18, 2015
Tweet

More Decks by nakajijapan

Other Decks in Technology

Transcript

  1. Endless Scroll • Tabs • ࣗલͰ࣮૷ • Tab,ViewControllerͰSwipeͨ͠ͱ͖ 1 -

    (void)scrollWithDirection:(NSInteger)direction 2 3 4 5 6 7 $POUFOU0⒎TFU 4DSFFO
  2. Endless Scroll • Tabs 1 2 3 4 5 6

    7 1 2 3 4 5 6 1 2 3 4 5 6 7
  3. Endless Scroll • Tabs 1 2 3 4 5 6

    7 1 2 3 4 5 6 1 2 3 4 5 6 7 1 2 3 4 5 6 7
  4. Endless Scroll • Tabs 1 2 3 4 5 6

    7 1 2 3 4 5 6 1 2 3 4 5 6 7 1 2 3 4 5 6 7 4DSPMM7JFX಺ʹ͋Δ֤7JFXͷҐஔΛ࠶഑ஔ $POUFOU0⒎TFUͷҐஔ΋ҰͭͣΒͯ͠Ҡಈ͍ͯ͠ͳ͍͔ͷ Α͏ʹݟ͔͚ͤΔ
  5. Usage #pragma mark NKJPagerViewDataSource @protocol NKJPagerViewDataSource <NSObject> - (NSUInteger)numberOfTabView; -

    (NSInteger)widthOfTabView; - (UIView *)viewPager:(NKJPagerViewController *)viewPager viewForTabAtIndex:(NSUInteger)index; - (UIViewController *)viewPager:(NKJPagerViewController *)viewPager contentViewControllerForTabAtIndex:(NSUInteger)index; @end #pragma mark NKJPagerViewDelegate @protocol NKJPagerViewDelegate <NSObject> @optional - (void)viewPager:(NKJPagerViewController *)viewPager didSwitchAtIndex:(NSInteger)index withTabs:(NSArray *)tabs; - (void)viewPagerDidAddContentView; @end
  6. Usage #pragma mark NKJPagerViewDataSource @protocol NKJPagerViewDataSource <NSObject> - (NSUInteger)numberOfTabView; -

    (NSInteger)widthOfTabView; - (UIView *)viewPager:(NKJPagerViewController *)viewPager viewForTabAtIndex:(NSUInteger)index; - (UIViewController *)viewPager:(NKJPagerViewController *)viewPager contentViewControllerForTabAtIndex:(NSUInteger)index; @end #pragma mark NKJPagerViewDelegate @protocol NKJPagerViewDelegate <NSObject> @optional - (void)viewPager:(NKJPagerViewController *)viewPager didSwitchAtIndex:(NSInteger)index withTabs:(NSArray *)tabs; - (void)viewPagerDidAddContentView; @end OVNCFSPGUBCT XJEUIGPSFBDIUBC WJFXGPSUBC WJFX$POUSPMMFS