ios - Add Images to TableView (Swift) -


hi there stackoverflow.

i want add images tableview. no code found worked far, super-awesome if can me. (yeah, i'm trying since 2 months now. tipps don't work out if insert code… am stupid?)

candy(image:"1.png", giftig:"echium vulgare", category:"chocolate", name:"nadelholz-häubling", beides:"nadelholz-häubling echium vulgare") 

it doesen't work if add

cell.imageview!.image = candy.image 

the error:

**'uitableviewcell' not have member named 'imageview'** 

unlimited 1 can solve issue.

sincerly, tine

delete line cell.imageview!.image = candy.image. try this, [update: change candy.image bluehound]

let xoffset: cgfloat = 10 let contentviewframe = cell.contentview.frame let imageview = uiimageview() imageview.image = uiimage(named: candy.image) imageview.frame = cgrectmake(xoffset, cgfloat(0), cgfloat(30), cgfloat(30))  cell.contentview.addsubview(imageview) 

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -