• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

New programmer of IOS: What are View Controllers?

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

Please explain to me with clear demonstration What are View Controllers?


thanks
 
Ranch Hand
Posts: 47
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi! It's hard to understand what "clear" means for you.

Perhaps you've heard about Model-View-Controller idea? In short it is like this - the part of your program which is responsible for displaying information to user is logically split into:

- Views - think of them as simple templates which could be stuffed with necessary data;
- Models - data containers, some plain objects or arrays simply containing all data you want to inject into Views;
- Controllers - some classes or just methods which take care of preparing Models.

For example if I have a page with a list of users, then here is a template - some set of styles and layouts for this list, then there are data, for example an array of objects each representing single user (with the name and URL to his profile for example) an there is a code which, for example, checks whether you are allowed to see the list at all, requests the user names from one database table, then their urls from another table, then glues them together to create "Model".

Now back to your question. In IOS programming View Controller is a thing resembling this ideology. In short it is something which helps you to prepare your data and serve it to be displayed.

This article looks like it contains detailed enough overview of them. Feel free to ask if you feel that some specific part of their explanation look vague to you...
 
Mohammad Ashari Rahman
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the explanation and link..the site should be helpful
 
reply
    Bookmark Topic Watch Topic
  • New Topic