I am still new to the iPhone SDK, and I find it pretty confusing. I have, until now, only used managed languages like Java, C#, VB.NET, and some Python.
Here's code that adds a table to the screen. The table shows up on the screen, but its contents do not. The methods that should fill them in are never entered.
Here's one of the methods that refuses to be called in the delegate:
Entry point:
Here's code that adds a table to the screen. The table shows up on the screen, but its contents do not. The methods that should fill them in are never entered.
PHP:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after app launch.
NSLog(@"1");
tv = [[UITableView alloc] initWithFrame:CGRectMake(20, 20, 500, 500) style:UITableViewStylePlain];
tableController = [[*descendent of UITableViewController* alloc] init];
tv.delegate = tableController;
//tv.backgroundColor = [UIColor greenColor];
[window addSubview:tv];
[window makeKeyAndVisible];
NSLog(@"2");
return YES;
}
Here's one of the methods that refuses to be called in the delegate:
PHP:
- (void)viewDidLoad
{
[super viewDidLoad];
// Configure the table view.
self.tableView.rowHeight = 73.0;
self.tableView.backgroundColor = DARK_BACKGROUND;
}
Entry point:
PHP:
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, @"*Implementor of UIApplicationDelegate*");
[pool release];
return retVal;
}