본문 바로가기

분류 전체보기533

[iOS] addSubView를 할 때 weak, strong 레퍼런스 Is UIView superview property weak or strong? The UIView header states that superview property is strong open var superview: UIView? { get } But it behaves just like a weak property, i.e. if I create view1 and view2 and then call view1.addSu... stackoverflow.com addSubView를 할 때 weak, strong 레퍼런스 코드에서 특정한 UIView를 addSubView를 이용해서 subView로 추가할 때, Memory leak에 대한 걱정으로 해당 subview를 weak로 선언할지 strong으로.. 2022. 2. 19.
[iOS Issue] Core data: Failed to load model Core data: Failed to load model I am new to core data. What I am trying to DO: I am trying to create a cocoatouch framework that has an app to add employee details and display them in a table view. So that i can add this framewo... stackoverflow.com 코어 데이터 사용 도중 다음과 같은 에러가 떴다. Core data: Failed to load model 1. Entity 확인 DataModel에서 Entity들을 클릭해서 Module이 'Current Product Module'로 되어있는지 확인한다. 2. .. 2022. 2. 19.
[iOS Issue] Http URL 사용 시 Error Domain=NSCocoaErrorDomain Code=256 [IOS] XCODE 7, IOS 9, Error Domain=NSCocoaErrorDomain Code=256 XCODE 7 IOS 9 으로 업데이트 했더니 잘 작동 하던 로직에서 에러가 발생 한다. NSError *error = nil; NSString *str_dat = [NSString stringWithContentsOfURL:UpdateChkUrl encoding:NSUTF8StringEncoding err.. blog.daum.net Http URL을 사용해서 네트워킹 시도 시 다음과 같은 에러가 발생한다. Error Domain=NSCocoaErrorDomain Code=256 URL을 Https로 변경해주거나 아니면 아래와 같이 info.plist에 항목을 추가해주고 HTTP 프로토콜을 .. 2022. 2. 19.
[iOS] hitTest Apple Developer Documentation developer.apple.com hitTest func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? 이 메서드는 subview들의 point 메서드를 호출해서 어떤 하위 뷰에서 터치 이벤트를 처리할지를 결정하는 메서드이다. point 지점을 포함하는 뷰 계층에서 가장 멀리 있는 하위 뷰를 반환한다. 즉, 해당 뷰 계층의 subview들 중 가장 앞에 있는 뷰를 반환한다. 만약 해당 뷰 계층 바깥에서 point가 위치한다면 nil을 반환한다. 즉, 해당 뷰보다 더 밑에 있는 뷰로 터치 이벤트를 넘기게 된다. 실제 사용 예시 터치를 입력했을 때, 가장 앞에 있는 뷰가 아닌 그 밑에 있는 뷰가.. 2022. 2. 16.