0
我嘗試小夥子在UIButton的一個UIViewController點擊裝載視圖點擊
GehaltVIew.m
#import "GehaltVIew.h"
#import "Berechnen.h"
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UIView *footerView = [[UIView alloc] init];
UIButton *berechnenButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
berechnenButton.frame = CGRectMake(10, 10, 300, 40);
[berechnenButton setTitle:@"Berechnen!" forState:UIControlStateNormal];
[berechnenButton addTarget:self action:@selector(berechnenGehalt) forControlEvents:UIControlEventTouchUpInside];
[footerView addSubview:berechnenButton];
return footerView;
}
- (void)berechnenGehalt
{
Berechnen *dvController = [[Berechnen alloc] initWithNibName:@"Berechnen" bundle:nil];
self.view = dvController;
}
,但我得到這個錯誤:
2011-07-22 14:51: 59.598研討會應用2 [33791:207] - [Berechnen SETFRAME:]:無法識別的選擇發送到實例0x5d05bd0
謝謝你,它的工作 –
爲什麼不把它標記爲正確的答案呢? – Fredrik