大家好我正在研究Google oauthorization2,我遇到“SQL方言未配置”的问题,这就是为什么我的查询没有执行而数据要转到表请帮帮我。
下面我列出了遇到问题的两个查询!
工具: PhpStorm 8+ MySQL的 Localhost
override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(PhotoBrowserCellIdentifier, forIndexPath: indexPath) as! PhotoBrowserCollectionViewCell
let sharedImageCache = FICImageCache.sharedImageCache()
cell.imageView.image = nil
let button = UIButton.buttonWithType(UIButtonType.System) as! UIButton
button.frame = CGRectMake(90, 90, 15, 15)
button.backgroundColor = UIColor.greenColor()
//cell.contentView.addSubview(button)
let photo = photos[indexPath.row] as PhotoInfo
if (cell.photoInfo != photo) {
sharedImageCache.cancelImageRetrievalForEntity(cell.photoInfo, withFormatName: formatName)
cell.photoInfo = photo
// cell.contentView.addSubview(button)
}
sharedImageCache.retrieveImageForEntity(photo, withFormatName: formatName, completionBlock: {
(photoInfo, _, image) -> Void in
if (photoInfo as! PhotoInfo) == cell.photoInfo {
// cell.imageView.image = image
var imgView = UIImageView(image:image!)
imgView.frame = CGRectMake(0,0,cell.frame.size.width, cell.frame.size.height);
cell.contentView.addSubview(imgView)
cell.contentView.addSubview(button)
}
})
return cell
}
override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
let photoInfo = photosVideo[indexPath.row]
var url = photoInfo.sourceImageURL
button.addTarget(self, action: "showNotice", forControlEvents: UIControlEvents.TouchUpInside)
performSegueWithIdentifier("show photo", sender: ["photoInfo": photoInfo])
println("hello")
}