본문 바로가기 메뉴 바로가기

다정한 강아지

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

다정한 강아지

검색하기 폼
  • 분류 전체보기 (39)
    • iOS (8)
    • Objective-C 2.0 (8)
    • Android (21)
    • etc. (1)
  • 방명록

ios (8)
5. Memory Management

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 ..

Objective-C 2.0 2022. 5. 10. 16:15
4. Protocols and Categories

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 ..

Objective-C 2.0 2022. 3. 4. 15:26
prepareForReuse() 의 사용법 / 쓰는 이유

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..

iOS 2022. 2. 22. 17:24
3. Interface and API Design

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..

Objective-C 2.0 2022. 1. 25. 15:40
2. Objects, Messaging, and the Runtime

Item 6: Understand Properties 프로퍼티 속성 중 Memory-Management 관련된 속성인데 - assign : The setter is a simple assign operation used for scalar types, such as CGFloat or NSInteger. - strong : This designates that the property defines an owning relationship. When a new value is set, it is first retained, the old value is released, and then the value is set. - weak : This designates that the property define..

Objective-C 2.0 2022. 1. 19. 16:17
1. Accustoming Yourself to Objective-C

Item 1: Familiarize Yourself with Objective-C's Roots Item 2: Minimize Importing Headers in Headers When writing an import into a header file, always ask yourself whether it’s really necessary. If the import can be forward declared, prefer that. If the import is for something used in a property, instance variable, or protocol conformance and can be moved to the class-continuation category, prefe..

Objective-C 2.0 2022. 1. 17. 14:43
[Objective-C 2.0] Pointer with Objects

Objective-C 문법에서 왜 항상 변수 앞에 *로 선언하나 궁금했었는데.. NSString *someString = @"The string"; This syntax, mostly lifted straight from C, declares a variable called someString whose type is NSString*. This means that it is a pointer to an NSString. All Objective-C objects must be declared in this way because the memory for objects is always allocated in heap space and never on the stack. It is illegal to d..

Objective-C 2.0 2022. 1. 14. 16:31
iOS에 한해 내가 지금까지 이해한 MVVM 패턴

우선 본 글은 - MVC(Model-View-Controller)와 MVVM(Model-View-ViewModel)에 대해 .. 언뜻이라도 들어본 분들 - 그치만 잘 이해가 가지 않은 분들 - 무엇보다 iOS 개발을 (공부)하시는 분들 이 읽었을 때 가장 효과가 나타날 것 같은 글입니다 제가 잘못 알고 있는게 있다면 꼭 지적해주세요 ㅠㅠ!! 참고자료/출처이자 먼저 읽으면 좋은 글들 (전반적인 이해에 가장 큰 도움이 되었음) [Introduction to MVVM] www.objc.io/issues/13-architecture/mvvm/ Introduction to MVVM · objc.io I got my first iOS job at 500px in 2011. I had been doing iOS co..

iOS 2021. 3. 22. 10:31
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • 전화연결하기
  • objc
  • 어댑터
  • 상태드로어블
  • CaseIterable
  • 액션바
  • 페이저타이틀스트립
  • ios
  • 알림대화상자
  • Objective-C
  • 인플레이터
  • allcases
  • 카카오톡열기
  • 안드로이드
  • 비트맵버튼
  • 뷰페이저
  • 제스처디텍터
  • subscript
  • 쉐이프드로어블
  • prepareforreuse
  • 전화걸기연결
  • 프래그먼트매니저
  • 터치리스너
  • 표현패턴
  • 프래그먼트
  • 다이얼연결
  • 데이터
  • swift
  • 부가데이터
  • 스낵바설정
more
«   2025/06   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바