I'm converting the codes to Swift 5 since Xcode 10.2.1 will no longer support Swift 3.
I have an user-defined runtime variables in storyboard. It was worked in Swift 3 but not in Swift 5.
Key Path | Type | Value
type | String | A
class Mains: UITableViewController, XMLParserDelegate {
...
var type = String()
...
func loadBuses(){
let url:String="http://example.com/Main.php?type="+type
let urlToSend: URL = URL(string: url)!
...
}
...
}
In Swift 3, it was functioned and url return "http://example.com/Main.php?type=A". But in Swift 5, actual output of url just return "http://example.com/Main.php?type=".
In there any alternatives which I can still use user-defined runtime attributes in storyboard for the class? Thank you.