I am learning iphone dev now. Now I am reading book "iPhone 4 Development". During reading this book, I am confused about some syntax about objective-c used in this book. Ok, here are my questions:
- Link framework v.s. header file
At the end of chapter 7 of this book, the book mentions "link project to framework". In this book, it links to project to AudioToolbox.framework. I am wondering why not just add the header file instead of linking framework? What's the difference between linking to a framework and adding a header file?
- "self" in dot & "[]" expression
In chapter 9 of this book, sample code uses dot operator and square bracket expression several times, for example: SecondLevelViewController *controller = [controllers objectAtIndex:row];
and SecondLevelViewController *nextController = [self.controllers objectAtIndex:row];
I think these two sentences have the same function. So when should I use "self"? When not?
Thanks, Sam