2012 年文章归档
共 7 篇文章
半手工打造一個Viewer (配合NIB)
// // main.m // // // Created by unknown on 12/6/1. // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. // #import <UIKit/UIKit.h> // 好用的列按鈕項目建立巨集 #define BARBUTTON(TITLE, SELECTOR) [[uibarbuttonitem alloc] \ initWithTitle:TITLE style:UIBarButtonItemStylePlain target:self \ action:SELECT…
2012-06-01 17:14 · iphone/ipad
手工打造一個Viewer
// // main.m // // // Created by unknown on 12/6/1. // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. // #import <UIKit/UIKit.h> // 好用的列按鈕項目建立巨集 #define BARBUTTON(TITLE, SELECTOR) [[uibarbuttonitem alloc] \ initWithTitle:TITLE style:UIBarButtonItemStylePlain target:self \ action:SELECT…
2012-06-01 15:27 · iphone/ipad
在xcode 4.2中開啟(build setting/project setting)
如下圖,在a.地方點選右鍵,(Open as/xcode project),在b.地方選擇正確的target
2012-02-22 18:25
EXC_BAD_ACCESS 錯誤排除
在xcode 4.2中,Product/Edit Scheme(或是 "cmd+<")會出現 在左側的Run部分正確點選後,在下方Environment Virable加入一個變數NSZombieEnabled, 並設定Value=YES
2012-02-22 18:00
iphone/ipad
本章將建立一個最簡單的iphone範例程式(xcode 4.2),如同所有的入門範例ㄧ樣 將使用Hello World 1.如下圖,選取第一個選項,"Create a new xcode project" 2.此project的template使用sing view application來建立 3.賦予此project一個有意義的名字,在本章中,先不使用storyboard,並且使用GC(Garbage collection),所以注意到該圖的勾選項 4.點選左側project,viewController_iphone,在開啓右側的object inspector,將Button和Tex…
2012-02-20 13:17 · iphone/ipad
如何在ubuntu下的gcc 來編譯object-C
如何在ubuntu下的gcc 來編譯object-C sudo apt-get install gnustep sudo apt-get install gnustep-devel 安裝完畢後,便可以透過make來編譯 ############################################################################### 如果出現下面錯誤,則表示找不到NextSetup的相關liberary,必須要修正script shell為下 gcc gnustep-config --objc-flags -lgnustep-base hello.…
2012-01-20 14:14
含有ObjectC的Automake操作
@寫完基本的程式後 hello.m #import <stdio.h> int main(int argc,const char *argv[]) { printf("hello world\n"); return 0; } step 1. autoscan 會產生 configure.scan step 2. mv configure.scan configure.in 修改configure.in的內容,並且加入(修改)下面四行 AM_INIT_AUTOMAKE(jeffrey,1.0) AC_PROG_OBJC AM_CONDITIONAL(, false) AC_OUTPUT(Mak…
2012-01-20 11:50