ios - Property 'viewController' not found on object of type 'AppDelegate' -


this code, i'm trying make 'self.viewcontroller' work, giving me error. need fix this. getting error stated above in header of thread.

    #import "appdelegate.h"     #import "viewcontroller.h"     #import "name.h"      @interface appdelegate ()      -(name *)createnamewithnonsensedatawithindex:(int)index;       @end      @implementation appdelegate      @synthesize tabledata;        - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions {         // override point customization after application launch.         return yes;          self.window = [[uiwindow alloc] initwithframe:[[uiscreen mainscreen] bounds]];          //create dummy data          nsuinteger numberofnames = 25;          self.tabledata = [[nsmutablearray alloc] initwithcapacity:numberofnames];          //create temporary array of tabledata         (nsuinteger = 0; < numberofnames; i++) {             //create new name nonsense data             name *tempname = [self createnamewithnonsensedatawithindex:1];              //add temporary array             [self.tabledata addobject:tempname];          }          self.viewcontroller = [[viewcontroller alloc]             initwithnibname:@"viewcontroller" bundle:nil];           self.window.rootviewcontroller = self.viewcontroller;         [self.window makekeyandvisible];         return yes;       } 

you need declare property use self.viewcontroller

@interface appdelegate ()     -(name *)createnamewithnonsensedatawithindex:(int)index;     @property (nonatomic, strong) viewcontroller *viewcontroller;  @end 

also haroldo gondim mentioned make sure name of nib correct.

since xcode 4.4 can skip @synthesize

declaration/definition of variables locations in objectivec?


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -