iOS 开发实用技术导航
NSHipster 中文版
› http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
› http://www.cocos2d-iphone.org/
CocoaPods
› http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
› http://code.google.com/mobile/analytics/
WWDC
› https://developer.apple.com/wwdc/
Design Guides and Resources
› https://developer.apple.com/design/
Transcripts of WWDC sessions
› http://asciiwwdc.com
Cocoa with Love
› http://cocoawithlove.com/
Cocoa Dev Central
› http://cocoadevcentral.com/
NSHipster
› http://nshipster.com/
Style Guides
› Google Objective-C Style Guide
› NYTimes Objective-C Style Guide
Useful Tools and Services
› Charles Web Debugging Proxy
› Smore
rookiemaster
V2EX  ›  iDev

ios 开发怎么使用低版本的包

  •  
  •   rookiemaster · Mar 8, 2024 · 2662 views
    This topic created in 980 days ago, the information mentioned may be changed or developed.

    比如我现在在使用 MapKit ,但 MapKit 上面存在注释:

    @available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
    

    也就是说只能在 ios17 以上设备使用,但是我想在 ios16 设备上使用,要怎么使用低版本的 MapKit 。 还是说只有在 ios17 的时候才存在 MapKit ,那要在低版本设备上显示地图应该用什么包。

    5 replies  •  2024-03-12 11:22:18 +08:00
    oneyian
    oneyian
    Mar 8, 2024
    1
    if (@available(iOS 17.0, *)) {
    // 17.0 及之后
    }else {
    // 之前 ...
    // code
    }
    oneyian
    oneyian
    Mar 8, 2024
    2
    直接使用原生 MKMapView 显示地图
    rookiemaster
    rookiemaster
    OP
    Mar 9, 2024
    3
    @oneyian MKMapView 好像不能在 swiftui 下用
    iOCZS
    iOCZS
    Mar 9, 2024
    4
    @rookiemaster uikit view 需要封装一下给 SwiftUI 使用
    shawndev
    shawndev
    Mar 12, 2024
    5
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2168 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 14:01 · PVG 22:01 · LAX 06:01 · JFK 09:01
    ♥ Do have faith in what you're doing.