Seems like I am using @IBDesignbale
wrong, but why?
I want to use a combination of IBDesignable
and prepareForInterfaceBuilder
to inject some data into my MyTableViewCell
so it can display some dummy data(in this sample project, just set the dummyView.backgroundColor = .red
) in my storyboard.
My current setup:
1, I guess the usual setup for a tableview using storyboard. TableView inside a view and dragged a UITableViewCell
into the tableview.
2, marked my MyTableViewCell
@IBDesignable
3, override prepareForInterfaceBuilder
inside the MyTableViewCell
setting the dummyView
backgroundColor
error:
Main.storyboard: error: IB Designables: Failed to render and update auto layout status for ViewController (BYZ-38-t0r): The agent crashed