The problem:
class ViewController: UIViewController {
...
extension User {
var image:UIImage {
if let image = UIImage(named: login){
return image
}
else{
return UIImage(named:"skype")
}
}
}
...
}
The Solution:
class ViewController: UIViewController {
...
}
extension User {
var image:UIImage {
if let image = UIImage(named: login){
return image
}
else{
return UIImage(named:"skype")
}
}
}
沒有留言:
張貼留言