WKInterfaceTable row objects do not have an opportune time to update their own IBOutlet subviews
| Originator: | jverdi | ||
| Number: | rdar://19696474 | Date Originated: | 03-Feb-2015 01:07 AM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | Xcode-Beta (6C121) |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: As WKInterfaceTable row objects are subclasses of NSObject, they do not have an “awakeFromNib” which would give them an opportunity to update properties of their IBOutlet subviews (as one would with say a UITableViewCell). Attempts to change properties of their IBOutlet subviews inside of init, for example, fail silently. Steps to Reproduce: - In your storyboard, create a WKInterfaceTable with a row object that is a subclass of NSObject - Add a button to the row object as a subview - Inside the init method of the class that represents the row object, attempt to set the button’s title. Expected Results: The button’s title would be shown. Actual Results: Setting the button’s title silently fails. Notes: Perhaps one way to solve this would be to provide an explicit WKInterfaceTableCell class, which had an awakeFromNib-like method in which these changes can be made.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!