본문 바로가기
[ios] GCD ( Grand Central Dispatch ) Tutorial [ios] GCD( Grand Central Dispatch) Tutorial 참조 : http://www.letmecompile.com/gcd-%ED%8A%9C%ED%86%A0%EB%A6%AC%EC%96%BC/ 디스패치 큐의 종류 -Custom Serial & Concurrent Dispatch Queuedispatch_queue_t serialQueue = dispatch_queue_create(“queueSerial”, DISPATCH_QUEUE_SERIAL);dispatch_queue_t concurrentQueue = dispatch_queue_create(“queueConcurrent”, DISPATCH_QUEUE_CONCURRENT); -System Dispatch Queuedispatch_.. 2017. 10. 24.
[Effective Objective-C] #45 스레드 안전한 단일 시간 코드 실행은 dispatch_once 를 이용하라 [Effective Objective-C] #45 스레드 안전한 단일 시간 코드 실행은 dispatch_once 를 이용하라 출처 : Effective Objective-C -싱글턴 디자인 패턴은 보통 shared instance 라는 클래스 메서드를 통해 구현된다.이는 매번 새로운 인스턴스를 할당하는 대신 클래스의 싱글턴 인스턴스를 반환한다.@implementation EOCClass + (id)sharedInstance{ static EOCClass *sharedInstance = nil; @synchronized(self){ if ( !sharedInstance){ sharedInstance = [[self alloc] init]; } }} @end -싱글턴의 화재는 스레드 안전에 대한 것이다.싱글.. 2017. 10. 10.
[iOS Study] 자동 회전, 팝오버 컨트롤러, 모달 뷰 컨트롤러 [iOS Study] 자동 회전, 팝오버 컨트롤러, 모달 뷰 컨트롤러 출처 : 아론 힐리가스의 iOS 프로그래밍 -이 장에서는 아래의 주제를 다룬다. 장치 의존적인 코드를 작성하는 방법과 장치의 종류에 따라 테스트하는 방법 회전, 팝오버 컨트롤러, 모달 뷰 컨트롤러 -iOS 에서는 방향을 장치방향 (device orientation) 과 인터페이스 방향(interface orientation) 두 가지로 구분한다. -장치 방향은 장치 표면이나 후면에서 정방향, 뒤집힌 상태, 왼쪽 회전, 오른쪽 회전인지에 따른 물리적 방향을 나타낸다.UIDevice 클래스의 orientation 프로퍼티를 통해 장치의 방향에 접근할 수 있다. -인터페이스 방향은 실행 중인 프로그램의 프로퍼티이다. UIInterfaceOr.. 2016. 3. 5.
반응형