【发布时间】:2014-07-01 07:02:43
【问题描述】:
我目前正在尝试学习一些 iOS 应用程序开发,并面临这个问题 直到现在我都无法修复。
我试着环顾四周,并被告知这样做可以解决问题,但它似乎对我的情况没有帮助。
view.frame = CGRectMake(80.0, 210.0, 160.0, 140.0);
无论如何,这是完整的代码:
- (UIButton *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UIButton *view = [UIButton buttonWithType:UIButtonTypeRoundedRect];;
if (section == [tableView numberOfSections] - 1) {
// This UIView will only be created for the last section of your UITableView
[view setBackgroundColor:[UIColor colorWithRed:(236/255.0) green:(127/255.0) blue:(55/255.0) alpha:1]];
view.titleLabel.font = [UIFont systemFontOfSize: 15 ];
[view setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[view addTarget:self
action:@selector(aMethod:)
forControlEvents:UIControlEventTouchUpInside];
[view setTitle:@"LOGIND" forState:UIControlStateNormal];
view.frame = CGRectMake(80.0, 210.0, 160.0, 140.0);
}
return view;
}
需要有关此处可能出现问题的指导。提前致谢。
【问题讨论】: