2

I am trying to integrate a framework/kernel into a simple .h and .m file in ios. 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?

    +(AKViewController*)aurasmaViewControllerWithDelegate: (id)delegate;

How do I present the view controller and where.

Embedding the Aurasma Kernel: The Code

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. The entire Aurasma Kernel is controlled by a single view controller, AKViewController - instantiating and presenting this view controller is all that is needed. An AKViewController can be created using the following convenience creator provided in AKViewController.h: +(AKViewController*)aurasmaViewControllerWithDelegate: (id)delegate; Presenting the returned ViewController modally will run Aurasma. The Aurasma Kernel requires a delegate which implements a single method: - (void)aurasmaViewControllerDidClose:(AKViewController*)aurasmaViewController; This delegate method is called whenever the Aurasma View Controller wishes to return program control to the host application.

OrangeDog
  • 36,653
  • 12
  • 122
  • 207

1 Answers1

1

I believe that the Aurasma Kernel, is distributed with a AKTest application that demonstrates exactly this.

On the button method you need to use code along these lines:

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

navillus
  • 56
  • 6