我知道这听起来很琐碎,但由于Beta 3/4中缺少iOS应用程序的“空”模板,我感到非常恼火。
我讨厌情节提要(Storyboard)方法(IMO认为它总是最优雅的方法很天真)。
实际上,对于我的大多数用例而言,情节提要板根本无法工作。
谁能在没有SB的情况下建议我如何获取空模板并到达起点(带有窗口的应用程序委托)?-或将其他模板之一迁移到非SB。
为segue方法做准备让我不寒而栗...
提前致谢。
我也不喜欢情节提要。
这是我从SB模板变为简洁的“从代码设计”的方法:
转到您的AppDelegate(.m / .swift)并在中创建一个UIWindow
直通代码application:didFinishLaunchingWithOptions:
:
CGRect screenBounds = [[UIScreen mainScreen] bounds];
UIWindow *window = [[UIWindow alloc] initWithFrame:screenBounds];
UIViewController *viewController = [[UIViewController alloc] init];
[window setRootViewController:viewController];
[window makeKeyAndVisible];
[self setWindow:window];
请记住选择目标并删除“部署信息”下“常规”中的“ MainInterface”条目
从现在开始,您可以开始使用Xcode了,不再用SB烦恼您了:)
不幸的是,到目前为止,我还没有找到一种将项目另存为模板的方法:/
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句