iOS/이슈32 [iOS Issue] CustomView에서 sublayer 추가 시 이슈 카메라 프리뷰를 보여주는 Custom View를 만들던 중 AVCaptureVideoPreviewLayer를 superView frame에 맞춰서 sublayer로 넣었으나 superView의 크기 계산이 sublayer를 추가하고 난 이후에 이루어져서 계속 크기가 틀어짐 그래서 기존 custom View의 Main layer 클래스를 AVCaptureVideoPreviewLayer 로 바꾸어서 해결 // // CameraView.swift // MyFoundation // // import UIKit import AVFoundation open class CameraView: UIView { private lazy var captureDevice = AVCaptureDevice.default(for: .. 2021. 6. 4. [iOS Issue] NotificationCenter 사용 NotificationCenter를 사용 시 실행할 observer를 closure로 지정할 경우 deinit에서 remove해줘야 하지만 selector로 함수로 지정해주면 제거할 필요가 없다. If your app targets iOS 9.0 and later or macOS 10.11 and later, and you used addObserver:selector:name:object:, you do not need to unregister the observer. If you forget or are unable to remove the observer, the system cleans up the next time it would have posted to it. 2021. 6. 1. [iOS Issue] iOS 11에서 StackView의 Background Color가 안 보임 iOS 11 환경의 테스트 기기에서 StackView에 지정해놓았던 Background Color가 노출이 안되는 현상이 발견되었다. iOS 14 이전에는 StackView에 Background Color를 지정해도 무시되었고 iOS 14부터 지정이 가능하게 되었다. 2021. 5. 14. [iOS Issue] UIScrollView 한 방향으로만 스크롤 되게 하기 1. 수직 Scroll 다음과 같이 UIScrollView와 그 내부의 contentView에 same width 제약을 추가하면 수직으로만 스크롤이 가능하다. 2. 수평 Scroll 수직 스크롤과 정확히 반대로 ScrollView와 contentView 사이에 Equal Height옵션을 넣어주면 된다. 2021. 5. 4. 이전 1 ··· 3 4 5 6 7 8 다음