ios - Import swift class into objective c storyboard -


im trying integrate implement project https://github.com/ariok/bwwalkthrough objective c project.

i have objc bridging header xcode automatically made me

i translated viewcontroller.swift code such

uistoryboard *sb = [uistoryboard storyboardwithname:@"walkthrough" bundle:nil]; bwwalkthroughviewcontroller *walkthrough = [sb instantiateviewcontrollerwithidentifier:@"walk"]; bwwalkthroughpageviewcontroller *page_zero = [sb instantiateviewcontrollerwithidentifier:@"walk0"]; bwwalkthroughpageviewcontroller *page_one = [sb instantiateviewcontrollerwithidentifier:@"walk1"]; bwwalkthroughpageviewcontroller *page_two = [sb instantiateviewcontrollerwithidentifier:@"walk2"]; bwwalkthroughpageviewcontroller *page_three = [sb instantiateviewcontrollerwithidentifier:@"walk3"];  walkthrough.delegate = self; [walkthrough addviewcontroller:page_zero]; [walkthrough addviewcontroller:page_one]; [walkthrough addviewcontroller:page_two]; [walkthrough addviewcontroller:page_three];  [self presentviewcontroller:walkthrough animated:yes completion:nil]; 

and import swift classes so:

import "skiptheline-swift.h"

my bridging header file's name "skiptheline-bridging-header.h"

now, when run code, this

2015-04-25 16:47:46.740 skiptheline[1631:215786] unknown class bwwalkthroughviewcontroller in interface builder file. 2015-04-25 16:47:46.754 skiptheline[1631:215786] -[uiviewcontroller setdelegate:]: unrecognized selector sent instance 0x12651cf90 2015-04-25 16:47:46.755 skiptheline[1631:215786] * terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[uiviewcontroller setdelegate:]: unrecognized selector sent instance 0x12651cf90' * first throw call stack: (0x1838aa530 0x19482c0e4 0x1838b15f4 0x1838ae3ac 0x1837b2c4c 0x10009c494 0x1880eca14 0x1880d5d08 0x1880ec3b0 0x1880ec03c 0x1880e5590 0x1880b8e60 0x18835846c 0x1880b73d0 0x183862d34 0x183861fd8 0x183860088 0x18378d1f4 0x18cbb76fc 0x18811e10c 0x10009e174 0x194eaaa08) libc++abi.dylib: terminating uncaught exception of type nsexception

any ideas how can use swift code in interface builder?

figured out!

you need edit module in interface builder name of project!!


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -