iphone - How can I programatically set a TableView to be grouped -
I have been trying to trying to set up your tableview dynamic froma configuration file and override the template code are 2 worked on the lines of the comment (neither 2 is the one that comes with the template). I using default Aanm your variables are defined below: However my code should return an inconsistent type error, any idea why ?!
- (id) initWithStyle: (UITableViewStyle) style {initWithStyle override //: If you can make as a controller program and optimize want to perform viewDidLoad is not suitable for Are there. JeanieAppDelegate * appDelegate = (JeanieAppDelegate *) [[UIApplication shared application] delegate]; If (self = [super initWithStyle: (UITableViewStyle *) appDelegate.skin.tableViewStyle]) {// 1 if (self = [super initWithStyle: UITableViewStyleGrouped]) {// 2 if (self = [super initWithStyle: style]) { } Healthy return; }
@interface skin: NSObject {UITableViewStyle * tableViewStyle; } @property (nanatomic) uTitablesVustible * tablewishstyle; @end
UITableViewStyle is not a pointer type
@interface skin: NSObject {UITableViewStyle tableViewStyle; } @protecti (nonatomic) UTTableViewstyle table view style; @ And
and you do not need to put it in the argument as a supplementary in the argument. The compiler should know how to
[super initWithStyle: appDelegate.skin.tableViewStyle].
Comments
Post a Comment