GCD is the associated technology and provides an abstraction to threading, based on so-called dispatch queues. Blocks can be enqueued on these queues, and GCD handles all scheduling for you. It creates, reuses, and destroys background threads as it sees fit, based on system resources, to process each queue. Moreover, GCD provides easy-to-use solutions to common programming tasks, such as thread-..
Item 29: Understand Reference Counting NSMutableArray *array = [[NSMutableArray alloc] init]; NSNumber *number = [[NSNumber alloc] initWithInt:1337]; [array addObject:number]; [number release]; // do something with 'array' [array release]; As explained previously, this code won’t compile under ARC, owing to the explicit calls to release. In Objective-C, a call to alloc will result in the return ..
Item 23: Use Delegate and Data Source Protocols for Interobject Communication @protocol EOCNetworkFetcherDelegate - (void)networkFetcher:(EOCNetworkFetcher*)fetcher didReceiveData:(NSData*)data; - (void)networkFetcher:(EOCNetworkFetcher*)fetcher didFailWithError:(NSError*)error; @end A delegate protocol is usually named as the class name followed by the word delegate, using camel casing for the ..
prepareForReuse()는 말그대로 테이블뷰에서 셀이 재사용되기 전에 불려서 준비시키는 함수다. 그러나 꼭 써야하는 함수는 아님! 근데 지금까지 계속 delegate 안에 있는 tableView(_:cellForRowAt:)에서 초기화를 계속 해줬는데 왜 굳이 똑같은 행동을 하는 함수를 한 번 더 써야하나? 하는게 나의 궁금증이었음. -> 그럼 공식문서를 보자 Discussion을 읽어보면 If a UITableViewCell object has a reuse identifier, the table view invokes this method just before returning the object from the UITableView method dequeueReusableCell(withId..
Item 15: Use Prefix Names to Avoid Namespace Clashes Item 16: Have a Designated Initializer Item 17: Implement the description Method - (NSString*)description { return [NSString stringWithFormat:@"", [self class], self, _firstName, _lastName]; } If this were to be used, the output for an object of type EOCPerson would now look like the following: EOCPerson *person = [[EOCPerson alloc] initWithFi..
- Total
- Today
- Yesterday
- 데이터
- 전화걸기연결
- 알림대화상자
- 쉐이프드로어블
- 스낵바설정
- 부가데이터
- 인플레이터
- 프래그먼트매니저
- 다이얼연결
- 제스처디텍터
- Objective-C
- 프래그먼트
- 상태드로어블
- 표현패턴
- CaseIterable
- 액션바
- allcases
- objc
- 카카오톡열기
- 페이저타이틀스트립
- swift
- 뷰페이저
- 안드로이드
- prepareforreuse
- 어댑터
- 터치리스너
- 비트맵버튼
- ios
- subscript
- 전화연결하기
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |