Learn Objective C Tutorial For Beginners – Episode 3 – Methods

[ad_1]
Learn Objective C Tutorial For Beginners is a series that introduces the Objective C programming language and teaches you how to write code to build iPhone apps.

Learning Objective C doesn’t have to be hard! In these tutorials, you will learn Objective C programming syntax, classes and software design patterns so that you can program iOS apps.

Combined with the Learn XCode 4 Tutorial series, you’ll be making iPhone apps in no time!

In this episode, we talk about Method Declaration and Invoking Methods

Source Code for this video:

For the all the episodes in this Learn Objective C Tutorial For Beginners series, visit the playlist:

For more XCode and Objective C Tutorials, visit my channel:

WEBSITE:
TWITTER:

My channel, CodeWIthChris, is about all the aspects of building iOS apps. I’ll post video tutorials on Objective C, XCode, how to submit apps to the Apple App Store, and tutorials on building various types of apps or integrating things like analytics, advertisements etc. You might even find the odd app review here or there!

If you want to see more ObjectiveC and XCode Video Tutorials, please SUBSCRIBE so that you don’t miss an episode and remember to LIKE and COMMENT if you have questions.

Intro & Outro music
“deche ok” by Gablé (


Posted

in

by

Tags:

Comments

30 responses to “Learn Objective C Tutorial For Beginners – Episode 3 – Methods”

  1. Gaurav Pandey Avatar

    .h and .m is so confusing.
    Please do not consider that we know this already. When some errors come you add or change something which you are aware of but we have no clue why you did it. Suddenly there is a new thing in the flow.

    I still can't find a step-by-step tutorial for the beginners. Clearing the fundamentals of Obj-C.

  2. Siva Prasad Avatar

    need tutorial Core Data with objective c (Save, Fetch, Search, Delete )
    rest API with objective c for get and post methods
    please provide i am struggling a lot

  3. Behnam Jahangiri Avatar

    hi mr chris.
    really thanks for your tutorials.
     can u tell some about factory method and how much its been used and can u show an example of that?….
    i road it in objective – c programming in apple developer website and that was question for me because there wasn't enough example about Factory methods.
    thanks

  4. 1Richmar Avatar

    Coming from a background of c/c++, C#, python, etc, this syntax is just awful. i'm excited to add Objective-C to my toolbox, but man is the language nasty.

  5. Required Taste Avatar

    I still haven't been able to find a video or series that explains objective-C from the basics… everyone just starts typing code and assumes I know what it means. I've watched a million objective-C tutorials and I still feel like I haven't learned anything and I'm still hopelessly confused.

  6. vulkein Avatar

    Hey Chris, nice tutorials!
    However as you read through these comments you can see that there are many confused people and this is why:
    It may be good to note especially when talking to people who know nothing of Objective C that you are assuming the method you created called "sampleMethodWithParameter" is being called somewhere else like in the AppDelegate. It was confusing to me because I thought you were writing a method call for this method but in fact you were only using that method to call another method you wrote called "doSomething" in the myClass class.

    Perhaps what you should consider doing at the end of all your videos is to go back and point out exactly how your code is executed; showing where your code starts and which methods call which methods to get a result.

  7. Kondencuotas Pienas Avatar

    Good stuff. Thanks for your effort doing this!

  8. Hari Karthick Avatar

    sir,video1,and video3 is nt clear……..i dont understand that videos….

  9. Sushma Dharavath Avatar

    video z nt clear.. its sumwat blirding 🙁

  10. yelnatz Avatar

    Coming from a C++/Java background… this syntax is weird as hell.

  11. Paul McKenzie Avatar

    I am used to working with Arduino, and one thing about that is every little thing has to be a function or declared.
    Are some of the things you used, such as sampleMethod and intParam functions or does Xcode/Objective C not demand so much declaring?

  12. Oedelin Jean Avatar

    lol it also took a really long list of suicidal underpaid chinese workers 

  13. CodeWithChris Avatar

    Hey Tye, yes! So your method call would be:
    [object sampleMethodWithParameter:8 withBool:YES]; (The 8 and YES are just example inputs. You can substitute with any number or NO for the bool)

  14. tyebillion Avatar

    But what do you actually do with label "WithBool", do you put it in the method call?

  15. CodeWithChris Avatar

    We're calling the doSomething method of MyClass from another method in another class!

    You can definitely call methods from within methods!

  16. Sayra López Avatar

    So are you calling a method from your MyClass method into ANOTHER method?

  17. CodeWithChris Avatar

    Thanks Evan, hope to see more of you around!

  18. Evan chukz Avatar

    Thanks Chris, your videos are clear and understandable

  19. CodeWithChris Avatar

    Hello! Thanks! Do you have a programming background?

    The "Basics" series is the way i'm focused on teaching people who have no experience with programming but i can see how someone would find the objective-c series useful if they already have basic object oriented programming concepts!

  20. gopinath shiva Avatar

    i am new to objective c and i am follwing ur videos buddy it s helpful

  21. CodeWithChris Avatar

    Thanks for asking questions Scott! It also helps others learn. And welcome 🙂 You make it sound like a cult! lol

  22. CodeWithChris Avatar

    Hey Scott, what you've got there is that you're trying to call the "doSomething" method on the classname. Instead you should be calling it on the variable name. So for example, this is should be your declaration:
    MyClass *variablename = [[MyClass alloc] init];
    [variablename dosomething];

    If you still get an error, then i would check if the "dosomething" method declared in MyClass.h and implemented in MyClass.m?

  23. Scott Atkinson Avatar

    Thanks for your help 🙂 I've joined your clan of followers 😀

  24. CodeWithChris Avatar

    Hey Scott, the "+" symbol you got there should be a "*". Let me know what you see after changing that!

  25. Scott Atkinson Avatar

    the error is on this line [Myclass do something];

  26. Scott Atkinson Avatar

    Hi Chris, thanks for the videos, I'm new to iphone development Im following your video but I have a problem this is my sample method

    – (int)SameMethod:(int)SomePara
    {
    MyClass +Myclass = [[MyClass alloc]init];

    [Myclass dosomething];
    }

    My error is Unknown received "Myclass" did you mean "MyClass' in the root of my project the class is called MyClass and at the top of my page I have #import "MyClass.h"

    any help would be appreciated.

  27. CodeWithChris Avatar

    Thanks for watching Rob!

  28. Rob McCaughey Avatar

    Thanks for these videos! They are very helpful. Keep up the good work!

  29. jaysen Avatar

    You can do it in the HTML5 player, but since ads only work in the flash player,

    and you have ads enabled, it doesn't show up 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *