 |
 |
|
 |
08-19-2008, 01:08 PM
|
#1 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Posts: 49
|
Starting with Objective C
I just downloaded the iPhone SDK like three days ago and I have too much problems starting. I am looking for easy documentation about Objective-C, Cocoa and the important things. I have a lot of programming experience with PHP and a little with C++ and Visual Basic .NET. I just don't have any experience with Objective Oriented programming.
The documentation from Apples site is too booring and I think that you must be an experienced programmer to actualy understand that. So where can I find something easy to learn? I don't like video tutorials because you can't follow it as easy as written thing.
|
|
|
08-19-2008, 01:19 PM
|
#2 (permalink)
|
|
New Member
Join Date: Aug 2008
Posts: 20
|
I read some of the objective C pdf's from the apple site before I read this.
Cocoa Dev Central: Learn Objective-C
This is a much lighter intro to objectiveC, but I'd suggest skimming through the stuff on apple's site once you are more comfortable.
But nothing compares to just jumping in and getting your hands dirty :P
|
|
|
08-19-2008, 01:19 PM
|
#3 (permalink)
|
|
New Member
Join Date: Apr 2008
Posts: 802
|
Intro to Obj-C and Cocoa Fundamentals are on the Apple site.
Programming in Objective-C by Stephen Kochan
and
Cocoa Programming for Mac OS x by Hillegass.
Learn Obj-C first. Cocoa is the Mac framework (all the extras beyond the language) Note that
the phone is a subset of Cocoa for the Mac and in some areas there are totally different methods. So the Cocoa programming book is only 50-70% relatable to the iPhone.
If this is for the iPhone download the iPhone Programming Guide along with the ViewController Guide and the TableView guide. Actually read them.
Download ALL of the examples.
Consider printing out the online PDF files at Kinkos or somewhere $20-25 for a book with basic binding.
|
|
|
08-19-2008, 01:33 PM
|
#4 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Posts: 49
|
Great!
I looked at Cocoadevcentral tutorial and it was probably as confusing as The Objective C 2.0 Programming Language on the apples site. Somebody already told me to look at the documents on the Apples site in this order:
1) The Objective-C 2.0 Programming Language
2) Cocoa Fundamentals Guide
3) iPhone OS Programming Guide
4) View Controller Programming Guide for iPhone OS
5) Table View Programming Guide for iPhone OS
6) Quartz 2D Programming Guide
7) Core Animation Programming Guide
I think that that foloving guides are better than the first one - and that is the most problematic one. Its hard to learn objective oriented programming from that guide.
And I need this tutorials for iPhone - Maybe later for OSX but for now - just the iPhone.
|
|
|
08-19-2008, 01:59 PM
|
#5 (permalink)
|
|
New Member
Join Date: Apr 2008
Posts: 802
|
There is Intro to Obj-C on Apple's site. I would suggest starting with that.
From there you could consider modifying one of the iPhone Examples slightly to work through your understanding.
|
|
|
08-19-2008, 02:21 PM
|
#6 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Posts: 49
|
I have read that three times on three different sites without knowing that I read it before. That probably mens that I didn't understand it like I should.
|
|
|
08-19-2008, 02:42 PM
|
#7 (permalink)
|
|
New Member
Join Date: Aug 2008
Posts: 1
|
Good resources
There are several good resources referenced here: Learn Cocoa « Fun Script
This includes a free eBook for starting programming with Cocoa and Xcode.
|
|
|
08-20-2008, 06:05 AM
|
#8 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Posts: 49
|
Thanks for this. I just have some problems understanding Classes. That is the only thing I read about but I don't understand them.
SO classes are normaly in different files - cass.h and class.m. Why are some variables defined in the class.h file? Do they all have to be defined there? Because you can define new variable in the class.m file. If I create new view and go to write class files I get the textboxes and labels... defined in class.h file - and if they are not defined there they don't work. The question here is Why can't I just use one source file for the whole program - I know that this is possible with PHP? Why do I have to use different class files - and when must this files be created?
This are my questions - probably they don't make any sense but If someone does know what I am thinking about - please help.
EDIT: Is it possible to use non-objective language with iphone SDK?
Last edited by roli; 08-20-2008 at 07:20 AM.
|
|
|
08-20-2008, 07:33 AM
|
#9 (permalink)
|
|
Registered Member
Join Date: Jul 2008
Location: Slovenia, EU
Posts: 254
|
These are basics roli that apply to almost any language. Class is a structure that defines particular object. In Objective-C syntax class is defined by 2 separate files:
a) Header file .h
b) implementation file .m
In .h file you define an interface for this class. You make a description of class (define it's properties, it's methods, etc...). In .m file you just implement these methods. The variables that you define in .h files are called instance variables and can be accessed from outside world. The variables you define in .m file are temporary local variables.
This Wikipedia article might give you some better understanding of the OOP terms.
Make sure you get them right otherwise it will be really hard for you to start with Cocoa programming. Make first some basic OOP examples in any language and then try with iPhone programming.
Good luck
|
|
|
08-20-2008, 09:10 AM
|
#10 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Posts: 49
|
Problem is that there are no easy OOP guides for any language. OOP is just complicated and I have to live with it.
|
|
|
08-20-2008, 09:13 AM
|
#11 (permalink)
|
|
Registered Member
Join Date: Jul 2008
Location: Slovenia, EU
Posts: 254
|
Quote:
Originally Posted by roli
Problem is that there are no easy OOP guides for any language. OOP is just complicated and I have to live with it.
|
I disagree. There are many books and guides online that guide you into OOP. These can be language independent, it doesn't matter whit which language you start with OOP. Choose one you're most familiar (might be PHP as well as it supports full OOP) and go trough some tutorials. There's plenty online.
|
|
|
08-20-2008, 09:30 AM
|
#12 (permalink)
|
|
New Member
Join Date: Aug 2008
Location: London, UK
Age: 23
Posts: 52
|
I second that, once you understand it OOP makes a LOT of sense, before jumping in with iPhone development learn some OOP basics, like Jume said, PHP has full OOP support.
I personally found Ruby to be a really good language to really get to grips with OOP, as the language itself gets out of the way.
YMMV of course.
Last edited by craig t mackenzie; 08-20-2008 at 09:30 AM.
Reason: craig can't spell
|
|
|
08-20-2008, 09:37 AM
|
#13 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Posts: 49
|
I didn't think about PHP OOP. I know that it suports OOP I just never thought about learning OOP for PHP and then using it with iPhone.
I found a PHP OOP tutorial that starts like this:
Object-Oriented Programming (OOP) tutorials are generally bogged down with programming theory and large metaphysical words such as encapsulation, inheritance and abstraction. They attempt to explain things by comparing code samples to microwaves or automobiles, which only serves to confuse the reader more.
I agree with the last line! Thanks for the help! I will read these tutorials and will see how it goes.
|
|
|
08-20-2008, 02:16 PM
|
#14 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Posts: 49
|
I have read three tutorials about PHP OOP. These things are realy short (about 6 normal pages). Actualy they helped a lot about understanding the OOP. It is not great but I know now what are classes, methods and propertyes and how they are used - at least I know what the thing on Apples site is about. But I think that Objective C is a little larger that that.
Problem with OOP is that it is something different. I remember mw learning my first programming language (Visual Basic) when I was 13. I learnd something but it took a while to learn that - it was just something new. The same is with OOP.
Last edited by roli; 08-20-2008 at 02:52 PM.
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 427 |
| 34 members and 393 guests |
| Argus, Avocado, b.dot, bachonk!, boopyman, DanielNovy, DevSdk, dexxxter, dre, drhansen, Ed99, harrytheshark, HemiMG, JasonR, jmonroe, JonnyBGoode, Locker, Louis002, marchinram, markbuchanan, mlfarrell, mlo, r13mus, rpstro02, rybek, sakrist, scburns123, smasher, themaster, ThirtyOne, Thom786, _nivek |
| Most users ever online was 779, 05-11-2009 at 09:55 AM. |
» Stats |
Members: 23,986
Threads: 38,771
Posts: 170,119
Top Poster: smasher (2,560)
|
| Welcome to our newest member, r13mus |
|