我无法加载我的子视图。我将它们定义为弱WKWebKit插座。如果我这样做view = tickerView或view = graphView,它的工作原理,但它只加载其中之一。我想加载两者。我该怎么做?
override func loadView() {
tickerView = WKWebView()
tickerView.navigationDelegate = self
self.view.addSubview(tickerView)
graphView = WKWebView()
graphView.navigationDelegate = self
self.view.addSubview(graphView)
}
Run Code Online (Sandbox Code Playgroud) I have a song class, which holds the attributes to a song, and it is a custom class. I also have a list of songs in a list called track list. When I try to json.dump the list, I get an error that says :
TypeError: Object of type 'Song' is not JSON serializable
Run Code Online (Sandbox Code Playgroud)
How would I go about converting this list of songs to json?
Here is the additional relevant code that returns the error:
class Song:
def __init__(self, …Run Code Online (Sandbox Code Playgroud)