strongself / The-Book-of-VIPER

the one and the only
Other
958 stars 129 forks source link

Add info about connecting modules from objc to swift #21

Open iSevenDays opened 8 years ago

iSevenDays commented 8 years ago

For example we have ImageGalleryStory as a name of our module.

Then

ImageGalleryStoryViewController.swift

class ImageGalleryStoryViewController : UIViewController, ImageGalleryStoryViewInput

var output: ImageGalleryStoryViewOutput!

must be

@objc var output: ImageGalleryStoryViewOutput!

and

protocol ImageGalleryStoryViewOutput

must be

@objc protocol ImageGalleryStoryViewOutput

Or else -moduleInput is not callable from objective c.

etolstoy commented 8 years ago

Hi, @iSevenDays. We'll add this information to one of our planned swift articles!

iSevenDays commented 8 years ago

Thanks!