본문 바로가기
[xcode] override/implement method 자동완성 사용하기. xcode 에서 eclipse의 [override/implement method] 자동완성 기능 사용하기. xcode 에서도 eclipse 의 [override/implement method] 자동완성 기능을 비슷하게 사용할 수 있습니다. 함수정의를 위해 - 를 입력 한 후 ESC 를 눌러주면 override 가능한 함수들이 쭉 나옵니다. 한번 해보세요 very easy!! 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 10. 13.
[ios] deprected (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation iOS6 부터 orientation change 에 대해 관할하는 built-in callback function 인 (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 이 deprecated 되었습니다. xcode document에 따르면 이 함수는 deprecated 되었으니 대신 (NSInteger) supportedInterfaceOrientations 와 (UIInterfaceOrientation) preferredInterfa.. 2012. 10. 13.
[xcode] iPhone 단말 현재 orientation 구하는 세가지 방법. 출처 : http://stackoverflow.com/questions/634745/iphone-orientation iPhone 단말 현재 orientation 구하는 세 가지 방법. 1. UIInterfaceOrientation orientation = self.interfaceOrientation; - 이 함수는 UIViewController 클래스에서만 호출할 수 있습니다. 2. UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; - 이는 어디서든 접근할 수 있으며, 가장 무난한 접근방법임. 3. UIDeviceOrientation orientation = [[UIDevice cu.. 2012. 10. 13.
[xcode] 앱의 default orientation 설정 방법. ios 앱의 default orientation 설정 방법 ios 앱 실행할 때 기본 방향( default orientation )을 설정할 수 있습니다. 설정 방법은.. 앱 설정의 [Info] 의 [Supported Interface Orientation] 항목을 통해 조정합니다. 제 테스트 앱에는 Item0 ~ 2 까지 3개가 있는데, 지원하는 orientation 입니다. 이 아이템들의 순서를 바꿀 수 있는데 Item0 으로 지정된 녀석이 default orientation 입니다. 순서를 바꾸어 앱 실행될때의 default orientation 을 설정해보세요. 2012. 10. 13.
[xcode]xib에서 auto resize 가 나타나지 않는다면. xib 에서 auto resize 항목이 나타나지 않는다면? xib 자체에 "User Autolayout" 항목이 있는데 이 부분이 check 되어 있다면 각 view component 에서는 auto resize 항목이 나오지 않습니다. "User Autolayout"을 disable(체크 해제) 시켜주면 개별 view 에 대한 auto resize 를 볼 수 있습니다. 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 10. 13.
[xcode] New File... 에서 UIViewController Subclass 가 없어졌다. 어떻게 생성하나? iOS 개발시 xcode 의 New File... 에서 기존에 있던 UIViewController Subclass 선택하는 것이 없어졌다. 어떻게 생성해야 하나? xcode 가 버전 업(정확한 버전은 구글링 해보세요) 되면서 iOS 관련 class 생성은 모두 objective-c class 로 옮겨졌습니다. objective-c class 를 생성하도록 하고, 다음에 나오는 화면에서 subclass 를 UIViewController 로 지정하면 됩니다. xib 파일이 필요하다면 해당 사항에 check 하는 것을 잊지 마시구요~ 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 10. 13.
[iOS] @property( strong, nonatomic ) 에 대한 설명. * @property( strong, nonatomic ) 에 대한 설명. @property & @synthesize 콤보는 자동 getter & setter 의 생성입니다. @property는 header 에서 정의하며, @synthesize 는 implementation에서 header 에서 정의한 것을 실체화 합니다. @property 안에는 몇 가지 value 들이 들어갈 수 있습니다. atomic vs. nonatomic - 기본값은 atomic 으로 멀티스레딩에서는 atomic이 되어야 합니다. 보통 nonatomic 을 사용합니다. assign vs. retain. vs. copy - setter 에서 객체를 지정 받을 때 assign : 주소값만 지정받고, retain : 기존것을 rele.. 2012. 10. 12.
[object-c] 접두어 NS 의 의미 ( NSString, NSLog ... ) * Object-c 에서 사용하는 접두어 NS 의 의미. 잡스가 개발했던 NextStep OS 의 의미를 딴 것. 즉 Next Step 의 약자이며, 이는 시스템에서 제공해주는 class 임을 의미하는 동시에, 엄격한 rule 이 적용된다. 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 10. 11.
[iOS] Application windows are expected to have a root view controller at the end of application launch 해결법 * iOS 개발시 "Application windows are expected to have a root view controller at the end of application launch" 에러가 발생했을 때 해결하는 방법. [Empty Application] 프로젝트를 생성해 iOS 의 ViewController 를 직접 코딩으로 연결하게 되었을 때 발생하기 쉬운 에러 메세지입니다. 문제 원인은 Root View Controller 가 연결되지 않았기 때문인데요.. AppDelegate.m 에서 아래와 같이 window 의 rootViewController 를 설정해주면 해결 됩니다. self.window.rootViewController = navigationController; 도움이 되셨다면.. 2012. 10. 11.
반응형