Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 14, 2011, 03:21 AM   #1
franium
macrumors member
 
Join Date: Nov 2010
Change the uitableview footer height in landscape mode

Hi everyone,

I have a grouped UITableView with some sections (with an header title). I want to add a footer to the first section, so I use
Code:
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section {

   switch (section) {
    case 0:
        return @"some lines of text...........bla bla bla bla bla etc etc");
        break;
    default:
        return nil;
        break;
    }
}
My problem is with the landscape mode. There is a quite big space between the footer and the header of the next section, so I change the footer height programatically in this way:

Code:
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
	switch (section) {
		case 0:
			if (UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation)) {
				return 85.0;
			} else {
				return 75.0;
			}
			break;
		default:
			return 10;
			break;
	}
}
But how can I change the footer height in
Code:
(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)orientation duration:(NSTimeInterval)duration
Any suggestions?
Thanks in advance,
Fran

Last edited by franium; Jan 14, 2011 at 03:37 AM.
franium is offline   0 Reply With Quote
Old Jan 14, 2011, 09:30 AM   #2
PhoneyDeveloper
macrumors 68030
 
PhoneyDeveloper's Avatar
 
Join Date: Sep 2008
Several UITableView methods cause it to reload sections. reloadData, reloadSections:withRowAnimation: and probably beginUpdates/endUpdates. Call one of these when the device rotates.
PhoneyDeveloper is offline   0 Reply With Quote
Old Jan 14, 2011, 02:04 PM   #3
franium
Thread Starter
macrumors member
 
Join Date: Nov 2010
Quote:
Originally Posted by PhoneyDeveloper View Post
Several UITableView methods cause it to reload sections. reloadData, reloadSections:withRowAnimation: and probably beginUpdates/endUpdates. Call one of these when the device rotates.
Thanks! I resolved using reloadData
franium is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Tags
footer, grouped, uitableview

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Issue with disabling UITableView custom cell from indenting while in editing mode ord6 iPhone/iPad Programming 6 Mar 9, 2013 12:17 PM
Messages not going into landscape mode brayhite iPhone 0 Sep 25, 2012 03:47 PM
UITableView cell in editing mode straber iPhone/iPad Programming 1 Sep 25, 2012 01:44 PM
So what does the keyboard look like in landscape mode now? krashx7 iPhone 5 Sep 16, 2012 05:46 PM
When held in landscape mode..... Enlightenment1 iPad 25 Jun 13, 2012 01:50 PM

Forum Jump

All times are GMT -5. The time now is 08:43 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC