Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

peacetrain67

macrumors member
Original poster
Dec 20, 2007
68
0
I am trying to make my application launch to a modalviewcontroller, but am getting an error stating the ModalViewController is undeclared (see the picture). How can I declare it is, as it wants me to do?

I want the modalviewcontroller to be called (as a log in screen with some other various options), then once it is loaded, it will have a button i have already assigned to dismiss it. After the dismissal, I want the tabbarcontroller to be shown, which I believe it is:

- (void)applicationDidFinishLaunching:(UIApplication *)application {

// Add the tab bar controller's current view as a subview of the window
[window addSubview:tabBarController.view];
LoginViewController *startapp = [[LoginViewController alloc] initWithNibName:nil bundle:nil];
[presentModalViewController:startapp Animated:YES];
}
 

Attachments

  • Picture 10.png
    Picture 10.png
    16.2 KB · Views: 92
You simply can't do what you are trying to do. It is clear that you need to go back to the start and learn the basics of Objective-C. And Objective-C method call has the form:

Code:
[targetObject methodName:param ...]

You call is missing a targetObject (or Class object if it is a class rather than instance method). This is a basic and fundamental error.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.