본문 바로가기

Apple - IPhone / IPod Touch

내 아이폰어 언락폰인지 채크하는 방법. iPhone unlock check 전화번호 입력란에 *#06# 을 입력하면IMEI 넘버를 확인할 수 있다. 이 번호를 http://iphoneimei.info 혹은 http://www.imei.info 사이트에 입력하면 언락폰인지 확인이 가능하다. 개인적인 생각이지만 http://iphoneimei.info 사이트가 더 정확한 정보를 제공해주는 듯 하다. 언락폰이면 그림에서 처럼 언락이라고 나온다 ^__^ 통신사 그리고 요금제 상관 없이 자유롭게 사용해 보도록 하자! 더보기
osx 에서 부팅시 데몬 자동 실행하는 방법 예제 The Crowd standalone distribution ships with Tomcat. There is a mismatch between how launchd expects a daemon to behave, and how the default startup scripts for Tomcat operate:OS X's launchd expects the process it starts to run forever, but 'catalina.sh start' starts the JVM to run Tomcat and then exits.Tomcat provides 'catalina.sh stop' to shut down Tomcat cleanly by connecting to a socket whic.. 더보기
Mcrypt to OSX add mcrypt to mac os x server Mcrypt to OSXadd mcrypt to mac os x serverYou can easily install the mcrypt extension to PHP5 on Mac OS X Server. Here’s how:Download and install MacPorts from http://macports.org.The following steps are performed in the Terminal:Force MacPorts to update: sudo port -v selfupdateNow, install memcached: sudo port install php5-mcryptCopy the newly created shared object for mcrypt into Mac OS X’s de.. 더보기
ios 의 status bar 없애기.. - (BOOL)prefersStatusBarHidden { return YES; } 이렇게만 하면 없애지는 줄 알았는데.. 라이브러리 행태의 뷰 컨트롤러를 가져다 쓸 경우에는 info.plist 에 View controller-based status bar appearance no 를 추가로 해줘야 한다.. 이 것 때문에 삽질하는 분들이 없길 빌며... 글을 남김... 더보기
cocos2d-x 화면 세로로 설정하기 // For ios6, use supportedInterfaceOrientations & shouldAutorotate instead - (NSUInteger) supportedInterfaceOrientations{ #ifdef __IPHONE_6_0 //return UIInterfaceOrientationMaskLandscape; return UIInterfaceOrientationMaskPortrait; // 세로 화면 #endif } // For ios6, use supportedInterfaceOrientations & shouldAutorotate instead - (NSUInteger) supportedInterfaceOrientations{ NSInteger mask = 0; #ifdef .. 더보기
cocos2d-x iOS7 으로 바뀐 후 갑자기 텍스트 폰트가 나오지 않을때.. CCLabelTTF 문제가 아님. CCLabelTTF 문제인 줄 알고 한참 씨름을. ㅋㅋ 결국 문제는 다른곳에서 해결.. CCImage.mm 에서 아래 부분처럼 기존것을 새것으로 바꾸면 된다. // CGContextRef context = CGBitmapContextCreate(data, dim.width, dim.height, 8, dim.width * 4, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); CGContextRef context = CGBitmapContextCreate(data, dim.width, dim.height, 8, (int)dim.width * 4, colorSpace, kCGImageAlphaPremultipliedLast | k.. 더보기
TableView의 Row를 클릭시 파란색 없애는 방법 UITableViewCellSelectionStyleNone 더보기
iPhone 다국어 작업 기본 genstrings Classes/*.m 더보기
sleep, wake up 이벤트 처리 코코아 어플에서 MAC OS X이 sleep에 들어가는지, sleep에서 빠져나왔는지를 확인하는 방법이다. Workspace의 notification center에 observer를 등록하는 방식으로 구현이 된다. - (void) receiveSleepNote: (NSNotification*) note { NSLog(@"receiveSleepNote: %@", [note name]); } - (void) receiveWakeNote: (NSNotification*) note { NSLog(@"receiveSleepNote: %@", [note name]); } - (void) fileNotifications { //These notifications are filed on NSWorkspace's not.. 더보기
UIToolbar 오른쪽 정렬 UIBarButtonItem *flexibleSpaceLeft = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; UIBarButtonItem *flexibleSpaceRight = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; // item 가운데 정렬 항목 [_toolbar setItems:[NSArray arrayWithObjects:flexibleSpaceLeft, item, flexibleSpa.. 더보기
iPhone App 아이콘 클리어타입으로 만들기 Info.plist 에 아래 내용을 추가하면 된다. UIPrerenderedIcon 참 쉽죠잉?? 더보기
문자열 다루는 메소드 Unicode 문자열 조작 - (id) initWithUTF8String:(const char *)bytes 문자코드가 UTF8이고, 널 문자로 끝나는 형식의 C언어 문자열에서 정보를 복사한후 리시버를 초기화 합니다. - (const char *)UTF8String 문자 코드가 UTF-8이고, 널문자로 끝나는 형식의 C언어 문자열을 가리키는 포인터를 리턴합니다. 해제후에도 계속 사용할려면 복사 해두어야 한다. - (NSUInteger) length 문자열의 길리를 리턴 - (unichar)characterAtIndex:(NSUInteger)index 문자열내에서 index번째에 위치하는 문자를 리턴합니다. - (id) initWithCharacters:(const unichar *)characters l.. 더보기
iPhone 키보드 닫기 done 버튼 추가 // NotificationNotification을 사용하기 위해서 NotificationCen.. 더보기
How to Double tapping UIScrollView to bring to initial zoom scale @interface UIView (Gestures) // undocumented SDK extension - (void)zoomToScale:(float)scale; - (void)rotateToDegrees:(float)degrees; - (void)setRotationDegrees:(float)degrees duration:(NSTimeInterval)duration; - (float)rotationDegrees; - (void)setZoomScale:(float)scale duration:(NSTimeInterval)duration; - (float)zoomScale; @end - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { .. 더보기
무료앱에서 유료 앱 링크 걸때.. - (IBAction)buyFullVersionButtonPressed { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=xxxxxxxxx"]]; } Replace "xxxxxxx" with your app's ID. 더보기