분류 전체보기
-
iOS 및 Platform의 구분 체크SmartPhone Dev/iPhone 2010. 10. 25. 15:01
#include + (NSString *) platform { size_t size; sysctlbyname("hw.machine", NULL, &size, NULL, 0); char *machine = malloc(size); sysctlbyname("hw.machine", machine, &size, NULL, 0); NSString *platform = [NSString stringWithUTF8String:machine]; free(machine); return platform; } ※ Return Value Possible values: "i386" = iPhone Simulator "iPhone1,1" = iPhone 1G "iPhone1,2" = iPhone 3G "iPhone2,1" = i..
-
iPhone App - iAD 적용SmartPhone Dev/iPhone 2010. 10. 21. 13:16
1. Framework 에 iAd.framework를 추가 2. Target->Get Info->General->Linked Libraries에서 iAd.framework 의 Link 타입을 Required 에서 weak으로 변경 3. project info-> deployment -> iPhone OS deployment target을 iphone OS 3.1.X로 .h #import @interface FirstViewController : UIViewController { ... ADBannerView *bannerView; BOOL bannerIsVisible; } @property (nonatomic, retain) ADBannerView *bannerView; - (void) createBan..