美文网首页
LaunchScreen.storyboard 多语言适配

LaunchScreen.storyboard 多语言适配

作者: woo_5857 | 来源:发表于2022-06-14 10:58 被阅读0次

    1.创建多个  LaunchScreen.storyboard

    如LaunchScreen_zh.storyboard

       LaunchScreen_en.storyboard

    使用在Info.plist 中适配不同的storyboard

    info.plist 字段

    <key>UILaunchStoryboardName</key>

    <string>LaunchScreen_zh.storyboard</string>

    适配方案:

    创建 InfoPlist.strings  

    info.plist 国际化适配文件

    内容如:

    /* 

      InfoPlist.strings

      TextRecognition

      Created by boniu on 2022/5/26.

      Copyright © 2022 tt. All rights reserved.

    */

    "CFBundleDisplayName" = "扫描文件王";

    "NSCameraUsageDescription" = "需要访问您的相机才能文件扫描";

    "NSLocationWhenInUseUsageDescription" = "APP需要访问您的位置才能精准拍照搜题";

    "NSPhotoLibraryAddUsageDescription" = "App需要访问您的相册才能保存扫描结果文件到相册";

    "NSPhotoLibraryUsageDescription" = "App需要访问您的相册才能文件扫描";

    "NSUserTrackingUsageDescription" = "需要获取您设备的广告标识符,用于向您发送个性化广告";

    "UILaunchStoryboardName" = "LaunchScreen_zh.storyboard";

    适配后

    <key>UILaunchStoryboardName</key>

    <string>UILaunchStoryboardName</string>

    相关文章

      网友评论

          本文标题:LaunchScreen.storyboard 多语言适配

          本文链接:https://www.haomeiwen.com/subject/owqxvrtx.html