본문 바로가기

iOS

(3)
Fatal Exception: NSInvalidArgumentException -[UILabel setLineBreakStrategy:]: unrecognized selector sent to instance iOS 12.x 디바이스에서 발생하는 크래쉬입니다. UILabel 의 lineBreakStrategy 프로퍼티에 .pushOut 을 설정하면 크래쉬가 발생합니다. extension NSParagraphStyle { public struct LineBreakStrategy : OptionSet { public init(rawValue: UInt) @available(iOS 9.0, *) public static var pushOut: NSParagraphStyle.LineBreakStrategy { get } @available(iOS 14.0, *) public static var hangulWordPriority: NSParagraphStyle.LineBreakStrategy { get } @avail..
UIImage(contentsOfFile:), UIImage(named:) 차이 UIImage(contentsOfFile:) 메소드는 초기 데이터가 번들에 없는 이미지 객체를 만듭니다. 데이터를 캐싱하지 않기 때문에 반복적으로 이미지를 로드하는데 적합하지 않습니다. Discussion This method loads the image data into memory and marks it as purgeable. If the data is purged and needs to be reloaded, the image object loads that data again from the specified path. https://developer.apple.com/documentation/uikit/uiimage/1624112-init Apple Developer Documentation ..
[iOS] NSTaggedPointerString Crash Foundation +[NSUserDefaults(NSUserDefaults_NSURLExtras) _web_defaultsDidChange] 현재 회사에서 서비스 중인 앱에서 오랜 기간 동안 리포트되고 있던 크래시가 있습니다. Fatal Exception: NSInvalidArgumentException *** -[NSTaggedPointerString stringByReplacingCharactersInRange:withString:]: nil argument 이름 그대로 예상치 못한 전달 인자로 인한 Exception 이며 NSTaggedPointerString 에 nil 이 인자로 전달되었다는 뜻입니다. 이 크래시의 특징은 iOS 13 운영체제에서만 발생한다는 것이고 기기 상태가 0% 백그라운드인..