方位磁針のアプリです。
https://apps.apple.com/jp/app/appicon/id552721621?mt=12
このアプリは使わずにやりたいです。
import UIKit
import CoreLocation
class ViewController: UIViewController, CLLocationManagerDelegate {
var locationManager: CLLocationManager! @IBOutlet weak var needleView: UIImageView! override func viewDidLoad() { super.viewDidLoad() locationManager = CLLocationManager() locationManager.delegate = self locationManager.startUpdatingHeading() } func locationManager(_ manager: CLLocationManager, didUpdateHeading newHeading: CLHeading) { needleView.transform = CGAffineTransform.init(rotationAngle: CGFloat(-newHeading.magneticHeading) * CGFloat.pi / 180) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. }
}
参考リンク内容
〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜エラー内容〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜
/Users/Beld/Desktop/(個人名)/swiftぉ~/コンパス/コンパス/Assets.xcassets👎 None of the input catalogs contained a matching stickers icon set or app icon set named "AppIcon".
/ Users / Beld / Desktop /(個人名)/ swiftぉ〜/コンパス/コンパス/Assets.xcassets:-1:どの入力カタログにも、一致するステッカーのアイコンセットまたは "AppIcon"という名前のアプリケーションアイコンセットが含まれていませんでした。
これの対応方お願いします。
Xcode Version 10.0
swift Version 4.2
回答2件
あなたの回答
tips
プレビュー