간단한 iOS 흔들기 테스트 앱을 만들어 봅시다. Xcode 실행 후 File > New > Project App을 선택후 아래쪽 Next버튼을 누릅니다.
Team과 Organization Identifier 부분은 개인에 맞게 작성하고 Next를 누릅니다. 파일 중 ViewContrller을 선택 후 다음처럼 내용을 추가합니다. import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?)
{ if motion == .motionShake { print("shake") let alert = UIAlertController(ti...
#
iOS
#
motionend
#
shake
#
swift
#
swiftshake
#
흔들기
원문 링크 : iOS 흔들기(Shake) Test