无法转换类型' UIImage'的值预期参数类型'字符串'

时间:2017-04-03 10:46:23

标签: ios swift

我迷路了,还有其他选择吗?

let swiftCourse = Course(buttonImage: #imageLiteral(resourceName: "cover_developer"), 
                  title: "Become a Developer", 
                  instructor: "Duc Tran", 
                  featureImage: #imageLiteral(resourceName: "developer"), 
                  introductionVideoURL: URL(String: "https://www.youtube.com/watch?v=Inn2K-V3NFI"), 
                  description: "Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.")

2 个答案:

答案 0 :(得分:0)

您的类Course的设置方式,大概是期待一个字符串。

将构造函数中的参数更改为"cover_developer"

答案 1 :(得分:-1)

替换您的代码并尝试:

insert into ps_feature_lang
select  f.id_feature, 1, 'N/A'
from    ps_feature f
left join
        ps_feature_lang fl
on      f.id_feature = fl.id_feature and
        fl.id_lang = 1
where   fl.id_feature is null