简体   繁体   English

我正在尝试将框架/内核集成到ios中的简单.h和.m文件中?

[英]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 我想要一个可以在按下时启动视图控制器的按钮

  1. 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.

相关问题 如何安装iOS框架? 我找不到“ LRResty / LRResty.h”文件 - How do you install an iOS framework? I am getting 'LRResty/LRResty.h' file not found 我正在尝试实现一个可视化触摸的简单库。 我不知道如何将它集成到我的项目中 - I'm trying to implement a simple library that visualizes touches. I'm at a loss on how to integrate it into my project 为什么在尝试运行我的 iOS 应用程序时出现错误“找不到 FirebaseCore/FirebaseCore.h”文件 - Why am I getting the error ''FirebaseCore/FirebaseCore.h' file not found' when trying to run my iOS app 一个.h和.m文件用于多个Xib iOS - one .h and .m file for multiple xib ios 我可以为iOS和OSX使用一个类类别扩展名.h和.m文件吗? - Can I use one class category extension .h and .m file for iOS and OSX? 我正在尝试为iOS使用消息模板 - I'm trying to use message template for iOS 什么是iOS中的filename + util.m / .h文件? - What is filename+util.m/.h file in ios? 动态替换ios项目中的.h和.m文件(捆绑路径) - Dynamically replace .h and .m file in ios project(bundle path) GracenotemusicID.Framework。 在那个.h文件中找不到错误-Xcode 6.4-iOS - GracenotemusicID.Framework. In that .h file not found error - Xcode 6.4 - ios iOS MQTT客户端框架:找不到'SocketRocket / SRWebSocket.h'文件 - iOS MQTT Client Framework : 'SocketRocket/SRWebSocket.h' file not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM