Skip to content

Using Dodo in Objective C project

Evgenii Neumerzhitckii edited this page Apr 2, 2016 · 4 revisions

This is how to show Dodo messages in Objective-C apps.

  1. Add DodoObjCBridge.swift to your project and extend it to suit your needs.
  2. Import swift code in your Objective-C file: #import "YOUR_PRODUCT_MODULE_NAME-Swift.h"
  3. Use Dodo from Objective-C code:
- (void)viewDidLoad {
   [super viewDidLoad];
     
   [DodoObjCBridge style: self.view];
   [DodoObjCBridge topLayoutGuide:self.topLayoutGuide inView:self.view];
   [DodoObjCBridge success: @"Hello from ObjC" inView: self.view];
}
Clone this wiki locally