python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
how can i fix this? it tells me that optional "!" is not needed
var camera = UIImage(named: "1")!
var city = UIImage(named: "2")!
var animals = UIImage(named: "3")!
var flowers = UIImage(named: "4")!
var stand = UIImage(...
Nika Erema
Votes: 0
Answers: 1
Generic decoding json into object with optionals
I wrote an extension to Decodable with the hopes of having a generic constructor for objects from json strings, it looks like this:
extension Decodable {
init?(with dictionary: [String: Any]) {
...
Sebby Fay
Votes: 0
Answers: 1