I'm working on my app which uses a graph to visualize some data. I'm using this nice Scrollable-GraphView for that: https://github.com/philackm/Scrollable-GraphView
Because this is only a class which inherits from UIScrollView, it's not possible to use it with Interface Builder (it also doesn't have the init(withCoder:) function implemented).
I now want to add a UIView with Interface Builder, which has all the necessary constraints to be sized properly at runtime. How can I "replace" that UIView with my GraphView at runtime?
This method is used for creating my graph at runtime:
private func createDarkGraph(frame: CGRect) -> ScrollableGraphView {
let graphView = ScrollableGraphView(frame: frame)
// ... some customization
return graphView
}