전체 글
-
Target-Action앱등이에게 살충제를 뿌린다./iOS 2016. 1. 10. 17:56
Target-ActionTarget-action is a design pattern in which an object holds the information necessary to send a message to another object when an event occurs. The stored information consists of two items of data: an action selector, which identifies the method to be invoked, and a target, which is the object to receive the message. The message sent when the event occurs is called an action message...
-
responder object앱등이에게 살충제를 뿌린다./iOS 2016. 1. 10. 17:37
Responder objectA responder is an object that can respond to events and handle them. All responder objects are instances of classes that ultimately inherit from UIResponder (iOS) or NSResponder (OS X). These classes declare a programmatic interface for event handling and define a default behavior for responders. The visible objects of an app are almost always responders—for example, windows, vie..
-
[책 리뷰 후기] 누워서 읽는 알고리즘코딩은 주댕이로/컴공지식 2016. 1. 7. 23:40
후기1. 책 제목만큼이나 가벼운 내용을 강조하고 있으며, 실제로도 그렇다.2. 시덥잖은 내용만 있는게 아니라, 정렬,자료구조 등 몇 가지 다시 되짚어보는 계기가 되었다. (거부감없이 재미있게 접근시켜준다.)3. 심심할대 읽어도 될 정도로 '재미있다.'4. 저자에게서 오세득 셰프같은 아재향이 풍긴다.(긍정)5. 좋은 개발자가 되기 위한 자세를 종종 강조하는데 꽤나 와닿는다.6. 15,000원은 좀 비싼 감이 있으므로 별 4개 반드립니다.7. 가격외엔 만족만족 꿀잼 한 줄 보기8. 키보드부터 두드리는 사람이 하는 일은(실전 프로그래머들이 흔히 말하는 '노가다'와 같은 의미에서의)'코딩'이고 침착하고 꼼꼼하게 접근하는 사람이 하는 일은'프로그래밍'이다.
-
[iOS/Objective-C] NSCopying과 NSCoding의 차이를 알아보자.앱등이에게 살충제를 뿌린다./Objective-C 2016. 1. 7. 23:20
NSCopying과 NSCoding 이름만 들으면 무언가 Array와 Dictionary마냥 유사한 부분이 있을것 같네요. 하지만 그렇지 않아요. 개념만 짚도록 해볼게요. 1. NSCopying copy메소드 아시죠? NSObject에 구현되어 있기 때문에 모든 객체에서 사용이 가능합니다. //편의상 h파일만 #import @interface Person : NSObject @end 이런 클래스가 있다고 가정합시다. 그리고 copy를 시도합니다. unused variable이라는 경고만 있을 뿐, 에러가 발생하지 않습니다. 당연하죠. Person에는 copy메소드가 구현되어 있을테니까요. 실행해보겠습니다. 음.. 같이 웃으며 망년회하던 HR에서 권고사직을 권하는듯한 통수네요. 하루종일 아무일 없다가 함수..
-
[iOS] -(BOOL)writeToFile:atomically: 메소드가 궁금해?앱등이에게 살충제를 뿌린다./iOS 2016. 1. 3. 21:40
-(BOOL)writeToFile:atomically:라는 메소드에 대해서 알아봅니다. writeToFile: 이름만 들어도 File에 객체를 쓸 것 같네요. 맞습니다.객체를 file에 아카이빙 하는 메소드입니다. atomically: 이름만 들어도 한번에 모든일을 동시에 처리할 것 같습니다. 맞습니다.atomically:에 YES를 전달하면 아카이빙은 임시 백업 파일에 먼저 기록하고 기록이 모두 성공하면 최종 데이터를 지정한 파일에 저장하게 됩니다.원본 파일의 손상을 막을 수 있고 시스템이 크래시를 내는일을 방지합니다. NSDictionary *glossary = @{@"class":@"class is good",@"struct":@"struct is also good"}; if ([glossary w..
-
[Swift] 타입 캐스팅앱등이에게 살충제를 뿌린다./Swift 2015. 12. 22. 23:30
class AAA{ var someVar = 0 } class BBB : AAA{ } let b:AAA = BBB() 타입 캐스팅 특정 타입으로 선언된 값을 다른 타입으로 변환하는 것 일반적으로 상속 관계에 있는 타입들 사이에서 허용됩니다. 매스팅되기 전 타입과 캐스팅되고 난 후 타입의 상위/하위 관계에 따라 업 캐스팅과 다운 캐스팅으로 나뉘어집니다. 업 캐스팅하위 클래스 타입을 상위 클래스 타입으로 캐스팅할 때(캐스팅하기 전 타입이 하위 클래스, 캐스팅한 후 타입이 상위 클래스)캐스팅한 결과, 캐스팅하기 전 타입보다 추상화될 때일반적으로 캐스팅 과정에서 오류가 발생할 가능성이 없음let child = BBB() child as AAA 다운 캐스팅상위 클래스 타입을 하위 클래스 타입으로 캐스팅할 떄(캐스..
-
[iOS/XCode] This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed. 해결앱등이에게 살충제를 뿌린다./iOS 2015. 12. 22. 22:43
This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed. 해결방법 : 깔려있던 기존앱을 삭제하시고 다시 Build/Run 해주세요