【问题标题】:How can I disable use of default 'LaunchScreen.storyboard' (Qt 5.15 for iOS)?如何禁用默认的“LaunchScreen.storyboard”(Qt 5.15 for iOS)?
【发布时间】:2021-09-02 03:14:45
【问题描述】:

我使用我的自定义启动屏幕(故事板文件)并且需要禁用由 qmake 生成的默认启动屏幕,以进行捆绑。我该怎么做?

在“mkspecs/features/uikit/default_post.prf”中有一个代码可以完成这项工作。如何停用该代码(不更改 Qt 的源代码)?

【问题讨论】:

    标签: iphone qt qmake


    【解决方案1】:

    如果您想使用自己的 Launch.storyboard 文件,您必须在 .pro 文件中添加类似的内容:

    ios {
        QMAKE_INFO_PLIST = ios/Info.plist
        ios_icon.files = $$files($$PWD/ios/*.png)
        QMAKE_BUNDLE_DATA *= ios_icon
    
        app_launch_images.files = $$files($$PWD/ios/splash_image.png)
        QMAKE_BUNDLE_DATA *= app_launch_images
        app_launch_screen.files = $$files($$PWD/ios/Launch.storyboard)
        QMAKE_BUNDLE_DATA *= app_launch_screen
     }
    

    使用该选项 Qt 应该使用您的自定义文件而不是默认文件。

    【讨论】:

    • 我的自定义启动屏幕(故事板文件)被调用,没有问题。有点问题的是,默认的也是编译捆绑的(qmake生成这样的代码)。我想从应用程序包中删除那些未使用的东西并减少编译时间。我认为您提供的解决方案的作用相同。您不需要在构建输出中看到“CompileStoryboard congregation.xcodeproj/LaunchScreen.storyboard”。
    猜你喜欢
    • 1970-01-01
    • 2021-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-16
    • 2013-05-15
    • 1970-01-01
    相关资源
    最近更新 更多