iOS/이슈32 [iOS Issue] CLLocationManager 사용 시 주의할 점 CLLocationManager 객체를 생성 후 사용 시, manager 인스턴스의 참조를 어딘가에 보관해놓아야 한다. 아니면 local변수로 함수에서 선언하기만 하면 함수 종료 시 인스턴스가 메모리에서 해제되어 버려서 관련 기능들을 사용할 수가 없다(location update, 권한 얻기 등등) 정상 동작 코드 import UIKit import CoreLocation class ViewController: UIViewController { let manager = CLLocationManager() // 프로퍼티로 저장 override func viewDidLoad() { super.viewDidLoad() manager.delegate = self manager.desiredAccuracy = k.. 2022. 5. 30. [iOS Issue] status bar 클릭 시 scrollView가 top으로 이동하는 현상 UIScrollView 클래스 scrollsToTop 속성 UIScrollView 클래스 scrollsToTop속성이 YES 이면 아이폰 상단의 상태바를 터치했을때 UIScro... blog.naver.com Apple Developer Documentation developer.apple.com status bar 클릭 시 scrollView가 top으로 이동하는 현상 iOS 앱에선 status bar를 클릭하면 'scroll-to-top'이라고 불리는 gesture가 실행이 되어서 모든 scrollView들이 top으로 이동하게 된다. (contentOffset.y = 0) 이 현상을 방지하려면 UIScrollViewDelegate의 scrollViewShouldScrollToTop(_:) 메서드를 .. 2022. 5. 25. [iOS Issue] constraint으로 animate 하기 전, layoutIfNeeded를 꼭 호출해야함 How to animate a UIImage constraints in Swift 4 I am making a card app and I need to make an animation so that a card would change its constraints to move to another place. How would I do this for a UIImage. stackoverflow.com UIView.animate에서 constraint을 변경 예전에 글을 올린 적이 있지만 UIView.animate 내부에서 constraint의 constant 값을 수정해서 animation을 실행할 시, layoutIfNeeded를 클로저 내부에 꼭 호출을 해야 UI가 업데이트 되면서 애니메이션이 동작한.. 2022. 5. 21. [iOS Issue] Lottie 리소스 용량 관련 이슈 Json files is taking more time to load(Approximately 1.7 secounds) · Issue #1224 · airbnb/lottie-ios Hi Folks, Here in my current application am using the Lottie json files for animations, json file size is 1.2mb. which is loading quite good in lottie preview website. When i'm integrating the ... github.com 내가 겪은 이슈와 거의 동일한 이슈인 것 같다. 1.2mb의 json파일을 로딩하는데 1개를 로드할 때는 1.7초, 3개를 로드할 때는 2.8초가 걸렸으며 us.. 2022. 4. 16. 이전 1 2 3 4 5 6 ··· 8 다음