我正在尝试使用Eureka添加ImageRow,为什么我一直使用未解析的标识符ImageRow Error,我做的不正确?

时间:2016-10-25 01:38:18

标签: swift3 uiimage eureka-forms

import UIKit
import Eureka
import DigitsKit
//MARK: HiddenRowsExample
class SettingsViewController: FormViewController {

            override func viewDidLoad() {
                super.viewDidLoad()

                let section = Section()
           //line below gives me an error: Use of unresolved Identifier 'ImageRow'     
                    <<< ImageRow() {  
                        $0.title = "Profile Photo"
                        $0.sourceTypes = [.PhotoLibrary, .SavedPhotosAlbum]
                        $0.clearAction = .yes(style: UIAlertActionStyle.destructive)

                        }.cellUpdate({(cell, row) -> () in
                            row.accessoryView?.layer.cornerRadius = 18
                            row.accessoryView?.frame = CGRect(x:0, y:0, width:34, height:34)
                })

                section.append(TextRow() { $0.placeholder = "Username" })
                section.append(PasswordRow() { $0.placeholder = "Password" })
                section.append(EmailRow(){$0.placeholder = "Email"})
                section.append(PhoneRow() {$0.placeholder = "Phone"})
                section.append(
                    ButtonRow() { (row:ButtonRow) ->Void in
                        row.title = "Save"
                        row.onCellSelection(self.save)
                        row.cell.backgroundColor = UIColor(red: 1.0/255, green: 87.0/255, blue: 184.0/255, alpha: 1.0)
                        row.cell.tintColor = UIColor.white

2 个答案:

答案 0 :(得分:4)

ImageRow已在最新版本中从Eureka中删除。

点击链接: https://github.com/xmartlabs/Eureka/issues/759

答案 1 :(得分:0)

将ImageRow添加到您的podfile pod 'ImageRow', '~> 3.0'  并执行导入import ImageRow