Created
November 18, 2016 08:56
-
-
Save alvareztech/2f5b94b2b12e59bf24a83c7e750a1809 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
if indexPath.section == 0 { | |
self.textFieldTableViewCell = tableView.dequeueReusableCellWithIdentifier("\(self.idFilterTextFieldTableViewCell)", forIndexPath: indexPath) as! FilterTextFieldTableViewCell | |
self.textFieldTableViewCell.textField.delegate = self | |
return self.textFieldTableViewCell | |
} else if indexPath.section == 1 { | |
if indexPath.row == 0 { | |
let cell = tableView.dequeueReusableCellWithIdentifier("\(self.idImageTableViewCell)", forIndexPath: indexPath) as! ImageTableViewCell | |
if let variableName = self.object { | |
let auxValue = self.object.fields[indexPath.row].value | |
let urlImage = Util.extractPhotoUrl(auxValue) | |
print(" URL>>> " + urlImage) | |
//cell.imageViewCell.af_setImageWithURL(NSURL(string: urlImage)!) | |
cell.imageViewCell.sd_setImageWithURL(NSURL(string:urlImage)) | |
return cell | |
} else { | |
print("print null") | |
return nil | |
} | |
//return cell | |
} else { | |
let cell = tableView.dequeueReusableCellWithIdentifier("\(self.idWorkflowSelectFilterTableViewCell)", forIndexPath: indexPath) as! WorkflowSelectFilterTableViewCell | |
let field : FieldDataModel = self.object.fieldsCleanOrdered[indexPath.row - 1] | |
cell.titleLabel.text = field.name | |
if String(field.type) == Constants.DATE || String(field.type) == Constants.TIMESTAMP { | |
cell.selectLabel.text = Util.convertTimestampToStringLong(field.value) | |
} else { | |
cell.selectLabel.text = field.value | |
} | |
return cell | |
} | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment