Alexander Theißen
Alexander Theißen

Reputation: 3889

UITableView (Section)Footer has always maximized width

I want to build a facebook app style login view. The Problem is my footer views has always full width and not the width I set them to have in the interface builder.

The login button is the section footer. The register button is the tableView footer.

  1. How I can make the buttons smaller (in width)?
  2. I want the register button at the button of the view. How do i do this? enter image description here

Upvotes: 0

Views: 832

Answers (1)

Mundi
Mundi

Reputation: 80271

Wrap the button and other views in a separate view. In viewForFooterInSection::

UIView *wrapper = [[UIView alloc] initWithFrame:aSuitableFrame];
UIButton *loginButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
loginButton.frame = CGRectMake(10,5,self.view.bounds.width-20, 44);
// etc.
[wrapper addSubView:loginButton];
// idem for other views

Upvotes: 4

Related Questions