Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Truly Understanding The Methods

for a while now, I've gotten a grip on how to declare/create your own methods in the header and implement them in the implementation. that's all easy. creating what your class will consist of in the header and actually carrying it out in the implementation. like I said, that's the easy part. the difficulty comes in for me when:

if you select a single View Application or anything other than empty application. there is some default code waiting for you. I wish there was a class on treehouse that could explain or breakdown what each of those methods are used for. ViewDidLoad is easy to comprehend (it's what you want to happen when the view loads) and so are others, but some of these other methods in like the appDelegate or in other cases, get sort of lengthy. in addition, you don't know what you want to go within that scope because you're not even sure what that method is asking for. (well it's like that for me)

BUT, if someone could explain or even break down exactly what each specific is asking. Making Apps would be a breeze. It would make it to where, I know specifically what it wants so I'll place this information there. otherwise how do I give it the answer if I don't understand the question? I have the drive, but I just want to understand the how or the why it is done the way it is.

I guess this is an open discussion, and not a question, idk.

2 Answers

Hi Rashii, you might want to Option+Click for more info and intensively make use of the excellent Xcode documentation. As a becoming iOS developer you gonna have to get comfortable using this documentation on a daily basis. But for a much better understanding of some of the mechanisms you described I found the reading of "iOS Programming: The Big Nerd Ranch Guide" from Aaron Hillegass & Joe Conway extremely helpful (IMHO the best book on the topic at the moment). Kind Regards Holger

Chris McKnight
PLUS
Chris McKnight
Courses Plus Student 11,045 Points

I like to start out with either the Single view application or an empty application. However, I am looking at learning about creating games so I might start using either the OpenGL or SpriteKit templates. Essentially each template just starts you out with a different storyboard, core data (if checked), and a specific type of view controller/container view controller.

Master Detail - Creates an application with UISplitViewController if you select iPad only otherwise if creates an application with a UITableViewController and a UIViewController with a push segue. Tabbed application - Creates an application with UITabBarController and a UIViewController Single view application - Creates an application with a single UIViewController Page based application - Creates an application with a UIPageViewController Utility application - Starts off with a main UIViewController and a FlipsideViewController. The storyboard contains a modal segue that flips horizontally when the info button is tapped

If you select Core Data, a few methods get added to the application delegate. These methods setup the Core Data stack by creating the persistent store, persistent store coordinator and a managed object context. I believe these should be pulled out of the app delegate into a singleton class but that's just a preference.

Let me know if you have any specific questions.

thanks chris,

I already understand the information you provided.

I was more concerned with the methods already preset in the implementation. how do you know which ones you need or use for your own project?

thanks chris,

I already understand the information you provided.

I was more concerned with the methods already preset in the implementation. how do you know which ones you need or use for your own project?

Chris McKnight
Chris McKnight
Courses Plus Student 11,045 Points

I just start with the single page template. It is more minimalistic and doesn't bloat my brand new app.

Check out IOS basics over at code school dot com its really good and it may help you Rashii. Its call "Try Objective-C". They do a good job of explaining most of the basics. However I still prefer Treehouse over code school.