본문 바로가기

iPhone dev.

AFNetworking POST 요청 보내기 참고 사이트: http://stackoverflow.com/questions/7623275/afnetworking-post-request This isn't the only way to do it, but requestWithMethod: is one way to do it:NSURL *url = [NSURL URLWithString:@"https://mysite.com/"]; AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url]; NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: height, @"user[height]", weight, @"user[weight].. 더보기
AFNetworking 기초 기존에 유용하게 쓰던 ASIHTTP가 업데이트가 중지된지 한참 되어(ARC도 지원 안 해주시고..) 대체할만한 wrapper class를 찾던 중 AFNetworking을 추천받았다.현재 활발하게 업데이트 되고있으며, 간단한 사용법은 다음과 같다. 참조 사이트: https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking https://github.com/AFNetworking/AFNetworking 불편한 점이 있다면 POST 요청을 할 때 ASIHTTP보다 꽤나 번거롭다는 점이다. 이제 웬만하면 GET으로 보내야겠다는.. ㅎㅎ예제1:Download and Parse JSON AFJSONRequestOperatio.. 더보기
A view can only be associated with at most one view controller at a time... 발생 에러: A view can only be associated with at most one view controller at a time... 해결방법:Xcode 4.2(4.3?) 부터는 interface builder의 xib 안에서 view들이 아닌 view controller를 추가하면 위와 같은 에러가 난다.stackoverflow에서 찾은 해결법:This happened to me already twice in the newest Xcode release. In both cases I needed to make changes to the UIViewController's XIB file (In you case it would be MapViewController.xib:BEFORE:Move.. 더보기
아이폰 3GS/4/4S와 5 화면 구분하기 다음의 코드를 통해 iPhone 5 와 비 iPhone 5 화면을 구분할 수 있다. if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { CGSize result = [[UIScreen mainScreen] bounds].size; if(result.height == 480) { // iPhone Classic } if(result.height == 568) { // iPhone 5 } } 더보기
아이콘 이름 localization ...-info.plist 파일에 LSHasLocalizedDisplayName 키를 넣고 value는 YES로 한다.각 language folder(예: en.lproj, ko.lproj, ...)에 InfoPlist.strings 파일을 만들고 그 안에 다음 내용을 넣는다.영문: "CFBundleDisplayName" = "WeMeet";한글: "CFBundleDisplayName" = "한글명.."; InfoPlist.strings에 CFBundleIconFile 같은 값으로 아이콘도 국가별로 표시되게 할 수 있다. 더보기
iTunes 혹은 appstore로 앱 링크 걸기 Technical Q&A QA1633Creating easy-to-read links to the App Store for your applications and companyQ: How can I create easy-to-read links to the App Store for my applications and company?A: How can I create easy-to-read links to the App Store for my applications and company?iTunes generates URLs for all applications and companies available in the App Store by right-clicking/control-clicking the c.. 더보기
.pem 생성 How to build an Apple Push Notification provider server (tutorial)Posted on July 10, 2009 by David MyttonSee also: How to renew your Apple Push Notification Push SSL CertificateOne of the widely anticipated features of the new iPhone OS 3.0 is push notificationswhich allow messages to be sent directly to an individual device relevant to the application that has been installed. Apple have demoed .. 더보기
“_OBJC_CLASS_$_”, referenced from: error in xcode 4.3.2(코드 옮겼을 때) 2down votefavoriteSo today I ran into a major problem. I got a problem involving my viewcontroller on xcode 4.3.2 as seen in this error message:Undefined symbols for architecture i386: "_OBJC_CLASS_$_SecondViewController", referenced from: objc-class-ref in Birdflix_ProViewController.o "_OBJC_CLASS_$_ThirdViewController", referenced from: objc-class-ref in Birdflix_ProViewController.o "_OBJC_CLA.. 더보기
UITapGestureRecognizer를 view에 적용했을 때 view의 button들이 먹통되는 현상 Stackoverflow.com 참조 UIButton inside a view that has a UITapGestureRecognizerup vote40down votefavorite24share [g+]share [fb]share [tw]I have view with a UITapGestureRecognizer. So when I tap on the view an other view appears above this view. This new view has three buttons. When I now press on one of these buttons I don't get the buttons action, I only get the tap gesture action. So I'm not abl.. 더보기
AES 암호화/복호화 관련 공개된 클래스: https://github.com/rnapier/RNCryptor (기존의 CommonCrypto의 wrapper)stackoverflow의 질문:Use AES to encrypt with Objective-C and decrypt with PHPup vote2down votefavorite2share [g+]share [fb]share [tw]I want to use AES to encrypt a password in Objective-C, and then decrypt it in PHP, but I have two problems.I encrypt the password, but it's an NSData object, so I encode it with base64, but when.. 더보기