Wednesday, May 20, 2009

在mac上開發xcode的經驗

在此記錄 xcode & Objective-C 的經驗

1)
在 mac 上編譯
gcc -o prog file.m -lobjc -framework cocoa
在 ubuntu 上編譯
gcc -o prog file.m -lobjc -lgnustep-base

筆記,
1) Every method has an implicit local variable called self, which is a pointer
to the object that is executing the method.
2) Because you will frequently need objects that you are not retaining, many classes have class methods that return autoreleased objects.
3) outlet感覺有點像class AppController, 透過outlet, 存取 UI 的 controller. 或者 class AppController 如何存取 UI 的 controller, 則是透過 outlet 指向這個 controller.

No comments: