【发布时间】:2013-02-16 21:34:59
【问题描述】:
有人有例子吗?我已经为 Titanium 创建了 iOS 和 Android 模块,但还没有找到人们使用 Storyboard 进行视觉效果的任何示例。
【问题讨论】:
标签: ios module storyboard titanium
有人有例子吗?我已经为 Titanium 创建了 iOS 和 Android 模块,但还没有找到人们使用 Storyboard 进行视觉效果的任何示例。
【问题讨论】:
标签: ios module storyboard titanium
我知道您可以使用 initWithNibName、check this SO answer out. 在模块中加载 nib
特别是对于故事板,我认为这会变得复杂,因为故事板定义了一个完整的导航结构。我认为您有两个选择,将情节提要中的特定窗口分解为 nib 文件,然后根据需要加载它们,或者使用类似以下的代码打开情节提要本身:
// You have to get the resource bundle first
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"YourStoryBoards" bundle:resourceBundle];
UIViewController *vc = [sb instantiateViewControllerWithIdentifier:@"yourViewController"];
vc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentViewController:vc animated:YES completion:NULL];
我还没有尝试过,但我认为关键是提供正确的资源包,然后从模式打开。
【讨论】: