From c1b390179cc43c2a878d013b6b02cdc69a55c8b7 Mon Sep 17 00:00:00 2001 From: Brandon Tate Date: Fri, 30 May 2014 11:05:26 -0400 Subject: [PATCH] Added readonly current index property. --- BTGridPager/BTGridPager.h | 8 +++++++- BTGridPager/BTGridPager.m | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/BTGridPager/BTGridPager.h b/BTGridPager/BTGridPager.h index e5aff40..91295ae 100644 --- a/BTGridPager/BTGridPager.h +++ b/BTGridPager/BTGridPager.h @@ -42,7 +42,10 @@ typedef NSUInteger BTGridResetMode; @protocol BTGridPagerDelegate; @protocol BTGridPagerDataSource; -@interface BTGridPager : UIScrollView +@interface BTGridPager : UIScrollView{ + @private + __strong BTGridIndex *_currentIndex; +} /** Data Source for the grid pager. */ @property (nonatomic, weak) IBOutlet id gridPagerDataSource; @@ -50,6 +53,9 @@ typedef NSUInteger BTGridResetMode; /** Delegate for grid pager actions. */ @property (nonatomic, weak) IBOutlet id gridPagerDelegate; +/** The current index being displayed. */ +@property (nonatomic, readonly) BTGridIndex *currentIndex; + /** Number of views to load on each side of currently viewed slide. * Defaults to 1 */ diff --git a/BTGridPager/BTGridPager.m b/BTGridPager/BTGridPager.m index 5743b89..6d572d1 100644 --- a/BTGridPager/BTGridPager.m +++ b/BTGridPager/BTGridPager.m @@ -12,7 +12,6 @@ @interface BTGridPager(){ @private CGPoint _lastOffset; int _numRows; - __strong BTGridIndex *_currentIndex; }