1

I'm creating a table in an Interface Controller that is not the main entry point in my WatchKit App. In the statement below, the EventDescription is a custom class that is bound to the table's row. The compiler does not resolve the EventDescription class.

if let row = EventTable.rowControllerAtIndex(index) as EventDescription{
ptCoder
  • 2,229
  • 3
  • 24
  • 38
abcom
  • 161
  • 2
  • 13
  • Are you including the `EventDescription` class in your file? – bgilham May 08 '15 at 11:24
  • The EventDescription class is defined in an independent file. This is the definition. import UIKit import WatchKit class EventDescription: NSObject { @IBOutlet weak var rowDescription: WKInterfaceLabel! } If I use the class definition in my Interface Controller class, it does not allow me to do connection to the label control. – abcom May 08 '15 at 11:45
  • Check if EventDescription is added to appropriate target or not when created. For more information - http://stackoverflow.com/a/29367453/602997 – Dhaval Panchal May 08 '15 at 12:29
  • EventDescription class is in Watch Extension and in storyboard I am able to register this class for table row controller. So both the suggestions mentioned in your link are satisfied. Allow me to explain this further; if I add the table in the "main entry point", everything works fine. My table is in the second interface controller that is invoked by clicking a button on the first interface controller (the main entry point). In this situation, it does not work giving the error described above. – abcom May 08 '15 at 15:10

1 Answers1

0

I solved it. Just created a new Interface Controller and deleted the old one in the storyboard. I had earlier tried clearing the Derived data and restarting Xcode that did not solve the problem. One thing I shall like to mention here, I had moved the Interface Controller source file to a different folder and this must have caused the said issue. However, clearing the Derived data should have taken care of it. Hope this comment helps others working on WatchKit apps. Thanks everybody for the support!

abcom
  • 161
  • 2
  • 13