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 4027964
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:09:42+00:00 2026-05-20T11:09:42+00:00

I am new to programming for the iPhone and this will be my first

  • 0

I am new to programming for the iPhone and this will be my first question here. I have experience with different languages like php/java/c++.

My question is about ViewControllers and views in iOS.

I have started a project which will contain several different things like a login screen, a main screen and several other screens. The goal of this project is to learn how to create everything programmatically instead of using interface builder to get more accustomed to the system. I am using the book: “Advanced iOS 4 Programming” to help me.

I have been able to create all the screens ( and stuff like logging-in is working ), but I am not sure if I did it correctly.

All of my code for creating the textfields/labels/buttons is now located in the ViewController while the main view where everything is put on is almost empty, with nothing being done in it. Shouldn’t the code to create the textfields and other components be located in the view itself, or is this the correct approach?

I have looked at several different examples but most use interface builder. The book itself is also not very clear in this matter.

Thanks in advance.

Kind regards,
Jasper

  • 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-20T11:09:43+00:00Added an answer on May 20, 2026 at 11:09 am

    In the view you have the view – on other words, literally what the human user sees with their eyeballs.

    So, for example, if you are doing complicated drawing you will have your own custom drawRect: method, and that for example is in the view.

    On the other hands ……

    In the view controller you have things that control the view.

    Generally speaking “everything” goes in the view controller.

    When you first start programming for iPhone (or Mac), simply put everything in the view controller and don’t worry too much. There’s plenty to learn. OK?

    Eventually, separate out the “actual drawing” separately in to the view.

    Hope this simple explanation for beginners helps!

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

Sidebar

Related Questions

I am fairly new to iPhone/ObjC programming, though I have several years of experience
I am using this http://imthi.com/blog/programming/iphone-rss-reader-application-with-source-code.php as a start for my rss reader in my
I am new to iPhone programming and have a MacBook running Leopard with XCode
I am new to iPhone programming and would like to be able to use
Hii....i am new to iPhone programming..Can anybody help me out please i have an
I know this isn't a programming question, but since a lot of people here
I'm fairly new to core data and iphone programming. Maybe this is an obvious
thats my first question here and i hope someone can help me. I´m new
I am fairly new to programming and while doing a lot of reading this
We have 2 new GIS programmer/analyst in our department (new to programming and ArcObjects)

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.