0

Here is my current code. I have not even gotten past the viewDidLoad method override because on the line where it says super viewdidload it throws the error @interface for uitableview declares for the selector viewdidload.

I am not too familiar with iPhone development and i am still beginning. Can someone please help me with this

my code

@interface myUITVC : UITableViewController UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) NSMutableArray *array;

@end


@implementation myUITVC

-(void)viewDidLoad
{
[super viewDidLoad];
}

@end
Rugmangathan
  • 3,186
  • 6
  • 33
  • 44
Joshua Blevins
  • 689
  • 1
  • 10
  • 27

2 Answers2

2
  1. You don't have to declare the table delegate and data source if you're subclassing UITableViewController (since UITableViewController declares it.)

    Change

    @interface myUITVC : UITableViewController UITableViewDelegate, UITableViewDataSource>
    

    to

    @interface myUITVC : UITableViewController
    
  2. You're missing a capital "D" in viewDidLoad.

Aaron Brager
  • 65,323
  • 19
  • 161
  • 287
  • Sorry. I have edited the post to have the capital D. I have it correctly typed in my code. It is still throwing a fit. I dont get it :(. – Joshua Blevins Mar 01 '14 at 05:38
  • @0x7fffffff It wouldn't hurt anything, but it's not required since they're declared in the interface for UITableViewController. I suggested deleting them since they're redundant. – Aaron Brager Mar 01 '14 at 05:42
  • Do you mean the UITableViewDelegate and UITableviewDataSource is redundant? I omitted both of those. – Joshua Blevins Mar 01 '14 at 05:45
  • I am such a noob. I had it typed as UITableView and not UITableViewController...It's late guys, don't hate. – Joshua Blevins Mar 01 '14 at 05:52
1

Looks like you're just missing a < before the UITableViewDelegate declaration.

sartak
  • 653
  • 4
  • 17