Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit da07baa

Browse files
committed
pageIndex:NumberOfSectionsInTableView returns 1 by default now
1 parent 59d57d2 commit da07baa

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

Classes/ARTableViewPagerViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ - (UITableViewCell *)pageIndex:(NSUInteger)pageIndex tableView:(UITableView *)ta
194194
// optionals
195195
- (NSInteger)pageIndex:(NSUInteger)pageIndex numberOfSectionsInTableView:(UITableView *)tableView{
196196
// Return the number of sections.
197-
return 0;
197+
return 1;
198198
}
199199

200200
- (NSString *)pageIndex:(NSUInteger)pageIndex tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {

Example/SimpleExample/SimpleExample/SimpleTableViewPagerViewController.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ - (void)goToFirstPage
8383
}
8484

8585
#pragma mark - Paging view data source
86-
- (NSInteger)pageIndex:(NSUInteger)pageIndex numberOfSectionsInTableView:(UITableView *)tableView
87-
{
88-
// Return the number of sections.
89-
return 1;
90-
}
9186

9287
- (NSInteger)pageIndex:(NSUInteger)pageIndex tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
9388
{

README.markdown

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,6 @@ Gives you the page index of the current displayed page.
9898
####moveToPageAtIndex:animated
9999
Changes the displayed page to the given page index. If animated is YES the change is animated with a swipe.
100100

101-
102-
Note:
103-
You have to implement the delegate method
104-
- (NSInteger)pageIndex:(NSUInteger)pageIndex numberOfSectionsInTableView:(UITableView *)tableView
105-
in order to get it to work.
106-
107101
Licence
108102
----------
109103
Copyright (c) 2012 arconsis IT-Solutions GmbH (http://www.arconsis.com )

0 commit comments

Comments
 (0)