Closed zyrondias closed 4 years ago
Hi, @zyrondias this is an example class without static content:
class MacawTextView: MacawView {
required init?(coder aDecoder: NSCoder) {
let text = Text(text: "Hello, World!", place: .move(dx: 145, dy: 100))
super.init(frame: CGRect.zero)
node = text
}
init() {
let rect = CGRect(x: 100, y: 300, width: 100, height: 100)
let text = Text(text: "Hello, World!", fill: Color.red)
super.init(frame: rect)
node = text
}
}
So, for changing any data you can just set node property of your class
Closing this issue. Please reopen it if you have more questions.
Hi Everyone, I am current new Swift and IOS development and I wanted to incorporate a graph that would change dynamically based on the data retrieved from Firebase. From a tutorial online I made my MacawView subclass but I can't seem to find a way to change the graph data once it been created I also made a similar class with no static methods but can't seem to initialise it since it needs an NSCoder decoder which I have no clue about : `import UIKit import Macaw
class MacawChartView: MacawView {
}`
I have a View Controller with a UIView where I would like to display the class but I can'tthe change the data since most of the methods and variables are static
ViewController: `import UIKit import Firebase
class TestPageController: UIViewController {
}`