1.The difference is card.h are the public API. That's what the Your dot h is. It ' s your public API. It's what's methods in your class you want to make public so that's other people can call them. CARD.M is your private API and all your implementation. 2.it ' s important to understand, in objective-c all object S,all of them live in the heap and we had pointers to them. There ' s no such thing as making an object on the stack or anything like that. They is all in the heap. Heap is just where you allocate free memory. (Lesson1 38:00) 3.all pointer properties having to be strong or weak because the objective-c had to know what to do wit h the memory and the heap. Strong means keep the memory for the thing this points to,in the Heap,as long as I or anyone else have a strong pointer to It. So the is called reference counting. It's not garbage collection,it ' s reference counting. So objective-c was going to keep track of every a strong pointer to a object in the Heap,and as long as at least one StronG Pointer Exists,it ' s going to keep, in heap. As soon as there is no strong pointers left,it would free the memory out of the heap,instantly. Not garbage collected later,but actually instantly,reclaim the memory. (Lesson1 39:00) 4.if you have a weak pointer,that tells Objective-c,okay,i has a pointer to this thing in the heap a nd keep it in memory as long as someone else have a strong pointer to it. But as soon as no one else have a strong pointer to the thing,it gets freed from memory. And this pointer,if it is weak,gets set to nil. And remember weak no only cleans it up,but it sets your pointer to nil. (Lesson1 40:00) 5.nonatomic means calling this setter and getter, the go along with the This property are not thread safe. So can ' t has a threads trying to set of this property at the same time. (Lesson1 42:00) 6.when you type the @property on the. H,this gets added to your @implementation. And not only That,they ' re public,because you put on @preoerty declaration inR header file. (Lesson1 46:00) 7.these properties (BOOL) don ' t need the strong or weak. Because they ' re primitive types,they ' re not stored in the heap. (Lesson1 47:00) 8.we didn't say card.contents equals equals self.contents.Because We ' d just be comparing the pointer S then,not what's the pointers point to. (Lesson1 54:00)
[Lecture Notes] Stanford University public class: IOS 7 app development Lecture1