【发布时间】:2016-11-20 15:44:28
【问题描述】:
我正在尝试在 Swift 项目中使用 SDWebImage。我将 SDWebImage 库文件夹拖放到我的 Swift 项目中,并创建了一个名为 listingApp-Bridging-Header.h 的桥接头
然后我将头文件导入到我的 Swift 文件中;像这样导入
import UIImageView+WebCache.h
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
let cell : TableViewCell = self.tableView.dequeueReusableCellWithIdentifier("Cell") as! TableViewCell
let strTitle : NSString = arrDict[indexPath.row].valueForKey("clip_name") as! NSString
cell.clipName.text = strTitle as String
cell.videoImage sd_setImageWithURL=NSURL URLWithString,[NSString stringWithFormat:@"%@%@",K_Server_imageurl,[record valueForKey:@"clip_image_path"]];
return cell
}
它给了我一个错误提示 add ; before + 我如何将上面的文件正确导入到我的 Swift 项目中?
【问题讨论】:
-
你有use_frameworks吗!在你的 podfile 中取消注释?
-
我没有使用 pod 文件
-
你能显示错误吗
标签: ios objective-c swift bridging-header