From 6ebc8af2d3764575ac49af5755770fe31f9a5b3e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 1 Nov 2011 04:38:09 +0100 Subject: Use a smaller font for the table of contents. --- ios/main.m | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ios') diff --git a/ios/main.m b/ios/main.m index a5e9a0a5..b25ff472 100644 --- a/ios/main.m +++ b/ios/main.m @@ -303,6 +303,11 @@ static UIImage *renderPage(pdf_xref *xref, int number, float width, float height return [titles count]; } +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return 28; +} + - (UITableViewCell*) tableView: (UITableView*)tableView cellForRowAtIndexPath: (NSIndexPath*)indexPath { static NSString *cellid = @"MuCellIdent"; @@ -311,6 +316,8 @@ static UIImage *renderPage(pdf_xref *xref, int number, float width, float height cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleValue1 reuseIdentifier: cellid] autorelease]; NSString *title = [titles objectAtIndex: [indexPath row]]; NSString *page = [pages objectAtIndex: [indexPath row]]; + [[cell textLabel] setFont: [UIFont systemFontOfSize: 16]]; + [[cell detailTextLabel] setFont: [UIFont systemFontOfSize: 16]]; [[cell textLabel] setText: title]; [[cell detailTextLabel] setText: [NSString stringWithFormat: @"%d", [page intValue]+1]]; return cell; -- cgit v1.2.3