[iOS] 기기별 스크린 사이즈를 볼 수 있는 사이트
·
iOS
기기별 스크린 사이즈를 볼 수 있는 사이트 Adaptivity and Layout - Visual Design - iOS - Human Interface Guidelines - Apple Developer Adaptivity and Layout People generally want to be able to use their favorite apps on all of their devices and in any context. In an iOS app, you can configure interface elements and layouts to automatically change shape and size on different devices, durin developer.apple.com Screen..
[iOS] ViewController를 직접 호출하여 화면 전환
·
iOS
ViewController를 직접 호출하여 화면 전환 ViewController(A) -> ViewController(B) 의 전환 동작을 수행하고 싶을 경우, 위 와 같이 ViewController(B)에StoryBoardID를 설정해 줍니다. 이후 원하는 곳에서 다음 코드를 사용하면 됩니다. private func goToMain() { print("## goToMain 호출 ##") guard let vc = storyboard?.instantiateViewController(withIdentifier: "mainViewController") else { return } // 풀 스크린 적용 //vc.modalPresentationStyle = .fullScreen present(vc, animat..
[iOS] 일정시간 주기로 작업(함수) 실행하기 (scheduledTimer)
·
iOS
일정시간 주기로 작업(함수) 실행하기 (scheduledTimer) // timeInterval: 반복 주기(단위: 초) // repeats: 반복 여부 Timer.scheduledTimer(timeInterval: 10.0, target: self, selector: #selector(yourFunc), userInfo: nil, repeats: true) . . . @objc func yourFunc() { // your code } 위와 같이 함수를 작성하고 Timer의 scscheduledTimer를 원하는 위치에서 사용하면 됩니다.