I’m trying to present a view using code in Objective C, but all it comes up with is the title bar and a black screen. This is the code I am using:
MoreByUserViewController *morebyuser = [[MoreByUserViewController alloc] initWithOwnerId:self.ImageOwner];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:morebyuser];
[self presentModalViewController:navController animated:YES];
I am calling this from the startup view (hereby referred to as View 1) and the view I’m trying to load will be View 2.
I don’t have View 2 included as #include or @class in View 1, do I need to?
Like Ryan and Dustin said, you probably are not loading the nib in that
initWithOwnerIDmethod. I would recommend initializing the view first, and then setting theownerIDas a property after.