[英]I am trying to integrate a framework/kernel into a simple .h and .m file in ios?
I am trying to integrate a framework/kernel into a simple .h and .m file in ios. 我正在尝试将框架/内核集成到ios中的简单.h和.m文件中。 The instructions for code are below in full.
下面是完整的代码说明。 I want a button that when pressed launches the view controller
我想要一个可以在按下时启动视图控制器的按钮
Where would I put this under viewdid load for example? 例如,我在哪里将其置于viewdid负载下?
+(AKViewController*)aurasmaViewControllerWithDelegate: (id)delegate; +(AKViewController *)aurasmaViewControllerWithDelegate:(id)代表;
How do I present the view controller and where. 如何呈现视图控制器以及在何处。
Embedding the Aurasma Kernel: The Code 嵌入Aurasma内核:代码
The Aurasma Kernel can easily be embedded into your own app with only a few lines of code and by setting the appropriate build options. 仅需几行代码并设置适当的构建选项,即可轻松将Aurasma内核嵌入到您自己的应用程序中。 The entire Aurasma Kernel is controlled by a single view controller, AKViewController - instantiating and presenting this view controller is all that is needed.
整个Aurasma内核由单个视图控制器AKViewController控制-只需实例化并呈现此视图控制器即可。 An AKViewController can be created using the following convenience creator provided in AKViewController.h: +(AKViewController*)aurasmaViewControllerWithDelegate: (id)delegate;
可以使用AKViewController.h中提供的以下便捷创建器来创建AKViewController:+(AKViewController *)aurasmaViewControllerWithDelegate:(id)delegate; Presenting the returned ViewController modally will run Aurasma.
模态显示返回的ViewController将运行Aurasma。 The Aurasma Kernel requires a delegate which implements a single method: - (void)aurasmaViewControllerDidClose:(AKViewController*)aurasmaViewController;
Aurasma内核需要一个实现单个方法的委托:-(void)aurasmaViewControllerDidClose:(AKViewController *)aurasmaViewController; This delegate method is called whenever the Aurasma View Controller wishes to return program control to the host application.
只要Aurasma View Controller希望将程序控制权返回给主机应用程序,就会调用此委托方法。
I believe that the Aurasma Kernel, is distributed with a AKTest application that demonstrates exactly this. 我相信Aurasma内核随AKTest应用程序一起分发,该应用程序恰好演示了这一点。
On the button method you need to use code along these lines: 在button方法上,您需要使用以下代码:
if( !self.aurasmaController )
{
self.aurasmaController = [AKViewController aurasmaViewControllerWithDelegate:self];
}
self.aurasmaController.showsCloseButton = showCloseButton;
self.aurasmaController.delayGuide = YES;
[self presentModalViewController:self.aurasmaController animated:animated];
also the model will need to make self implement the AKViewControllerDelegate as defined in AKViewController.h 该模型还需要使自己实现AKViewController.h中定义的AKViewControllerDelegate
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.