UIBUTTON」カテゴリーアーカイブ

100 Days of SwiftUI(DAY 78(Time for MapKitt))

ヒント:アプリを本当に便利にしたい場合sourceTypeは、イメージピッカーコントローラーのプロパティをに設定して、.cameraユーザーが既存の写真をインポートするのではなく、新しい写真を撮れるようにします。

ピンをドロップする方法とマップビューの中心座標を使用する方法を理解しているため、ユーザーの位置を取得してテキストと画像と共に保存する方法を理解するだけです。


import CoreLocation

class LocationFetcher: NSObject, CLLocationManagerDelegate {
    let manager = CLLocationManager()
    var lastKnownLocation: CLLocationCoordinate2D?

    override init() {
        super.init()
        manager.delegate = self
    }

    func start() {
        manager.requestWhenInUseAuthorization()
        manager.startUpdatingLocation()
    }

    func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
        lastKnownLocation = locations.first?.coordinate
    }
}


struct ContentView: View {
    let locationFetcher = LocationFetcher()

    var body: some View {
        VStack {
            Button("Start Tracking Location") {
                self.locationFetcher.start()
            }

            Button("Read Location") {
                if let location = self.locationFetcher.lastKnownLocation {
                    print("Your location is \(location)")
                } else {
                    print("Your location is unknown")
                }
            }
        }
    }
}

関連↓
How to Use Camera and Library to Take Photos in SwiftUI

再インストール

平成31年2月23日(土曜日)

iphone バッテリー交換につき、再度xcodeよりインストール、以下以外は、そのままOK!!
(予報士+、用語集、)

    1. 屋久島・・動作するものの、砂時計回転止まらず。
    2. N-WORLD・・ld: framework not found GoogleMapsCore
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      pod updateにより、解決。
    3. おでかけ大分・・ld: framework not found GoogleMapsCore
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      pod updateにより、解決。 リコメンド修正!!。更にswift4.2へ自動コンバート 約11箇所のerror.個別にfixしてOK!!
    4. おでかけ山口・・ld: framework not found GoogleMapsCore
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      pod updateにより、解決。 リコメンド修正!!。更にswift4.2へ自動コンバート 約11箇所のerror.個別にfixしてOK!!

iPhone のシムロック解除(別の SIM カード無し)

平成31年2月21日(木曜日)

apple
↑リンク

最終的には、上のリンクの問題がある場合を適用し、以下メッセージ解決!!

キモは、

    1. itunesにバックアップする。
    2. iPhone を工場出荷時の設定に復元する。(itunesの上部(iphoneを復元)を実行する。)
    3. その後、 バックアップから復元でOK!!

My Project(forecasterplus_2018_update)

平成30年5月6日(日曜日)

coredata(経過版 未完成)
forecasterplus_2018_m_detall_with_core_A
forecasterplus_2018_m_detall_with_core_B_CSV

coredata(完成版 基本版 AppDelegate、Predicateまで)
csv2core_AppDelegate

CollectionView版
csv2core_CollectionView_searchBar_ A(経過版 動作可)
csv2core_CollectionView_searchBar_ B(動作)

Table版
csv2core_master_detail(searchbar無し 動作)
csv2core_master_detail_searchBar (search-bar table有り 動作)
csv2core_master_detail_searchBar_A(searchbar navigation 有り 動作)