Home Features Docs Blog Support GitHub

Generate Actions/Outlets fails for ViewControllers inheriting from UIViewContoller subclasses

In the project I’m currently building, I’d like to define a shared UIViewController subclass that my other ViewControllers all inherit from, so that I can implement shared functionality in a similar pattern to what I already do in my Android code. Essentially the class hierarchy looks like UIViewController > BaseViewController > MyViewController, where the final class is the one that includes @IBOutlet and @IBAction annotated methods.

However when I do this, the annotated methods in the ViewController classes don’t get detected by the “Generate Actions and Outlets for Interface Builder” action, leaving me with no interfaces defined in moe-main-interfaces.m.

Using moe-gradle version 1.3.6, Android studio 2.3 with moe plugin version 1.3.1

Hi Russel,

thanks for the report. Could you provide a test project for us to see where the problem is?

Best Regards,
Gergely

I seem to have figured out my problem. The issue was that my base classes were missing the @Runtime, @ObjCClassName, and @RegisterOnStartup annotations.