Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7897821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:16:00+00:00 2026-06-03T08:16:00+00:00

#import <UIKit/UIKit.h> #import UCMapviewController.h #import UCMenuviewController.h #import UCOverviewController.h @interface UCRootViewController : UIViewController @property (strong,

  • 0
#import <UIKit/UIKit.h>
#import "UCMapviewController.h"
#import "UCMenuviewController.h"
#import "UCOverviewController.h"

@interface UCRootViewController : UIViewController

@property (strong, nonatomic) UCMapviewController *mapviewController;
@property (strong, nonatomic) UCMenuviewController *menuviewController;
@property (strong, nonatomic) UCOverviewController *overviewController;

This is my rootviewController which does not display anything himself, he is just responsible for presenting the other view controllers when needed (later becoming the delegate of those controllers).

So my question is, do I have to implement a view for this rootviewController? I’ve read the ViewController programming guide, but I couldn’t find an answer to this.

For what I know, the rootviewController makes another controller appear with their own view which then will take over the space. Is this the wrong approach?

thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:16:01+00:00Added an answer on June 3, 2026 at 8:16 am

    Normally I manage my rootViewController in the app delegate in subtle way. For instance, in an application with a Login UIViewController, I will present the rest of the UIViewControllers from that Login View Controller, using, for example, presentModalViewController. But having a rootViewController that handles your UIViewControllers for you it’s not a bad approach, as long as you remember some details (for that I would recommend you reading this). There is also a good WWDC view about containers. 🙂

    Edit 1:

    1) MVC is probably the most used pattern in iOS. It’s difficult not to use it, when developing for iOS, but it takes some experience to correctly implement it

    2) Yes you don’t need it. You can use the AppDelegate for it, by playing with the window.rootViewController

    3) Model is the logic part of your application, plus the data source. Normally, you would have 2 layers: logic and data access. In the model part, you englob both. The controller makes the bridge between the View (what the user sees) and the model, the logic and data that is processed under the hood. You can think of the Xib’s as the Views, the UIViewControllers as the controllers, and the rest of the classes that “fuel” your UIViewControllers as the model.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

#import <UIKit/UIKit.h> #import UCMapviewController.h #import UCMenuviewController.h #import UCOverviewController.h @interface UCRootViewController : UIViewController @property (weak,
In this code: #import <UIKit/UIKit.h> @interface ViewController : UIViewController { UILabel *labelsText; } @property(strong,
h #import <UIKit/UIKit.h> @interface LoginViewController : UIViewController <UITextFieldDelegate> @property (nonatomic, retain) NSDictionary *_data; @end
I have declared this ivar in my ViewController.h #import <UIKit/UIKit.h> @interface FirstViewController : UIViewController
Say I have this code: #import <UIKit/UIKit.h> @interface MyView : UIView @end @implementation MyView
I have some codes as below #import <UIKit/UIKit.h> @interface ViewMoreSettingController : UIViewController < UITableViewDelegate,
I use this library: https://github.com/robbiehanson/CocoaAsyncSocket My test code: #import <UIKit/UIKit.h> @class GCDAsyncUdpSocket; @interface ThirdViewController
I just create a simple UITableView in the UIViewController . .h #import <UIKit/UIKit.h> @interface
#import <UIKit/UIKit.h> @interface quartzViewController : UIViewController { IBOutlet UIView *myView; } @end #import quartzViewController.h
QuestionsViewController.h: #import <UIKit/UIKit.h> @interface QuestionsViewController : UIViewController { int currentQuestionIndex; NSMutableArray *questions; IBOutlet UILabel

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.