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

  • Home
  • SEARCH
  • 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 6717085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:48:39+00:00 2026-05-26T08:48:39+00:00

In the viewController class I want to make a draw method that adds an

  • 0

In the viewController class I want to make a draw method that adds an UIImageView to the main view as a subview. Now how do I get the View object from the app so that I can invoke the draw method on that specific view in the method of another class. Also Where in the code is the view instantiated that pops up on my iphone when I start the app by default?

Thank you very much.

  • 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-05-26T08:48:40+00:00Added an answer on May 26, 2026 at 8:48 am

    I would recommend getting a more firm grasp of views and view controllers in the docs:

    http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009503-CH1-SW2

    http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/AboutViewControllers/AboutViewControllers.html

    But, if you need to access the view from your viewController, it’s as simple as accessing the view property:

    [myViewController.view addSubview:someOtherView];

    Regarding your question about where the root view is instantiated, it depends on whether or not you’re using a XIB to design your interface. If you want to modify the view controller’s view in code, override the view controller’s viewDidLoad and make sure you call [super viewDidLoad] first.

    If you want to select a different view controller at startup, you can do so in the app delegate in application: didFinishLaunchingWithOptions: launchOptions since this is where the app assigns its window and rootViewController properties.

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

Sidebar

Related Questions

I have a view controller class that has to implement several protocols. Too keep
I have the problem that my view controller class has too many delegates and
I have a viewController (Planner) that loads two view controllers (InfoEditor and MonthlyPlan) when
I'm asking my ViewController for it's view.center property and drawing a new UIView that
I have a BSjax class that I wrote that lets me make async calls
So I have a ViewController Class which is my first view, I then add
HI, I have a view that has three UIScrollViews on the screen. I want
Let's say I have a ViewController that needs access to a view. In the
I want to make multi view application. My goal is when program launch to
I have created a custom view hierarchy in an XIB that I want to

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.