Discussion Forums  >  Uncategorized

Replies: 0    Views: 141

jsa986
Apple Fan
Profile
Posts: 24
Reg: Jan 19, 2012
location unknow...
240
02/09/12 12:13 PM (12 years ago)

viewDidload screen

Hi all I want to make a custom alert when a user first uses my app, im following a youtube tutorial and the alert code goes after the viewDidload section. Where is the equivalent code in the view controller.m delegate in buzztouch package? is it here somewhere? initWithViewController ------------------------- This method returns the appropriate screen view controller for the passed in screen object. All BT_screen controllers have an initWithBTscreen method that is used to initialize the controller. It's possible that the app is asked to init a screen that doesn't exist in it's configuration data. */ +(id)initViewControllerForScreen:(BT_item *)theScreen{ if([theScreen itemId] == nil){ [BT_debugger showIt:self:[NSString stringWithFormat:@initViewControllerForScreen: ERROR finding screen with itemId: %@, [theScreen itemId]]]; }else{ if([theScreen.itemNickname length] > 1){ [BT_debugger showIt:self:[NSString stringWithFormat:@initViewControllerForScreen nickname: \%@\ itemId: %@ type: %@, [theScreen itemNickname], [theScreen itemId], [theScreen itemType]]]; }else{ [BT_debugger showIt:self:[NSString stringWithFormat:@initViewControllerForScreen nickname: \%@\ itemId: %@ type: %@, @no nickname?, [theScreen itemId], [theScreen itemType]]]; } } Instantiate a view controller with ClassName == BT_item.itemType. If the itemType is a custom plug-in we need to get the type of view controller to allocate from the JSON data... */ //return this view controller. NSObject *theViewController = nil; NSString *theClassName = [theScreen itemType]; //are we loading a custom plugin? if([[theScreen itemType] isEqualToString:@BT_screen_plugIn]){ //get the class name of the custom UIViewController we want to load... theClassName = [BT_strings getJsonPropertyValue:theScreen.jsonVars:@classFileName:@]; } //screenType required if([theClassName length] > 0){ Class theClass = NSClassFromString(theClassName); if(theClass != nil){ if([theClass respondsToSelector:@selector(alloc)]){ theViewController = [[theClass performSelector:@selector(alloc)] initWithScreenData:theScreen]; return theViewController; } } }//screenType length if(theViewController == nil){ [BT_debugger showIt:self:[NSString stringWithFormat:@initViewControllerForScreen: ERROR, could not initialize view controller for screen with itemId: %@, [theScreen itemId]]]; //get error screen data BT_item *errorScreenData = [self getErrorViewController]; theViewController = [[BT_screen_menuList alloc] initWithScreenData:errorScreenData]; } //should not be here. return theViewController; Thanks in advance
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.