【问题标题】:How do you support different view for different platforms in TitaniumTitanium 中如何支持不同平台的不同视图
【发布时间】:2015-02-24 09:31:35
【问题描述】:

如果我正在为 iOS 和 android 开发应用程序,钛合金 mvc 框架中是否有可能为 2 个不同平台(iOS 和 android)的同一控制器维护 2 个不同视图?

【问题讨论】:

    标签: android ios titanium titanium-mobile titanium-alloy


    【解决方案1】:

    是的,iOS 和 Android 平台可以有不同的视图。您只需在views目录下创建嵌套目录(即android、ios或mobileweb)

    以下结构目录示例:

    - 应用程序 | --views | | | --ios | | | | | --index.xml //ios相关的xml | - 安卓 | | | --index.xml //android相关的xml --控制器 | | | --index.js //index.xml的通用控制器 --样式 | --index.tss //index.xml的常用样式

    更多信息在Titanium Docs

    【讨论】:

    • 谢谢...我只是在文档中没有看到 :)
    猜你喜欢
    • 2023-03-03
    • 2023-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-20
    • 1970-01-01
    • 2010-09-11
    相关资源
    最近更新 更多