0
我試圖建立我的TableView動態弗羅馬配置文件,並一直試圖重寫以下模板代碼我如何編程設置TableView中進行分組
- (id)initWithStyle:(UITableViewStyle)style {
// Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
JeanieAppDelegate *appDelegate = (JeanieAppDelegate *)[[UIApplication sharedApplication] delegate];
if (self = [super initWithStyle:(UITableViewStyle*)appDelegate.skin.tableViewStyle]) {
//1 if (self = [super initWithStyle:UITableViewStyleGrouped]) {
//2 if (self = [super initWithStyle:style]) {
}
return self;
}
的2註釋行工作(2號是與模板一起來的)。我已經定義使用默認的枚舉我的變量如下:
@interface Skin : NSObject {
UITableViewStyle *tableViewStyle;
}
@property (nonatomic) UITableViewStyle *tableViewStyle;
@end
但是我的代碼返回一個不兼容的類型錯誤,任何想法,爲什麼?