Extending the bridge yourself

Extending with your own categories

Creating your own categories is simple.

  • Ensure that the category has a distinct name to distinguish it from any others, in this example we'll call it:
  • Declare and implement a method that uses the category name for it's name and that received an NSDictionary and a KGPagedDocControl object:
    `- (void)playFromMediaLibrary:(NSDictionary *)parameters andPageControl:(KGPagedDocControl *)pageControl;`
  • If you need to store the page control or any of the parameters into properties for use in other methods in the category, then you will need to use associated objects from the runtime.

There is a good reference here and the provided cameraCapture category uses them so reference that code for a working example.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk