ok I added this btnPhoto to this UIView in Eureka Communities ViewRow but it is unclickable? (ViewControllerEdit.photoClicked(_:) never fires) any notion why this is?

       form.last! <<< ViewRow<UIView>() { (row) in }.cellSetup { (cell, row) in
                    row.title = _title
                    row.tag = _dataname
                    row.value = _default

                    let vwWidth: CGFloat = (self.tableView?.frame.width)!
                    print("vwWidth: \(vwWidth)") //<-- this proves it is not 0 wide
                    cell.view = UIView(frame: CGRect(x: 0, y:  0, width: vwWidth, height: 65))

                    row.cellSetup({ (cell, row) in
                        cell.contentView.backgroundColor = Globals.Color_SlateTextBox()
                        cell.detailTextLabel?.textColor = Globals.Color_Blue()
                        cell.tintColor = Globals.Color_BackgroundSilver()
                        row.cell.height = {
                            return  65
                    }).cellUpdate({ (cell, row) in
                        cell.textLabel?.textColor = Globals.Color_Blue()

                    let btnPhoto = UIButton(frame: CGRect(x:180, y:0, width:180, height:40))
                    btnPhoto.setTitle("Take Photo",for: .normal)
                    btnPhoto.addTarget(self, action: #selector(ViewControllerEdit.photoClicked(_:)), for: .touchUpInside)


i've also tried cell.viewContent.addSubView() it makes no difference

does anyone know why the addTarget fails to fire?

0 Answers