ios - tableView imageView content mode not working? -


i have image, inside of table row, i'm trying make round doing height/2

cell.imageview.frame.height/2 

so problem when i'm trying insert image cell, image doesn't change size, code looks this

let named = "avatar.png" let imagename = uiimage(named: named) cell.imageview?.image = imagename cell.backgroundcolor = uicolor.clearcolor() if(tablearray[indexpath.row] == "avatar"){     cell.imageview!.frame = cgrectmake(0,0,10,10)     cell.imageview?.layer.borderwidth = 1     cell.imageview?.layer.maskstobounds = true     cell.imageview?.layer.bordercolor = uicolor.blackcolor().cgcolor     cell.imageview?.layer.cornerradius = cell.imageview!.frame.height/2     cell.imageview?.clipstobounds = true     cell.imageview?.contentmode = .scaleaspectfit } 

i've tried lot of suggestions google, stackoverflow couldn't whats problem, can help?

you cannot change size of imageview present in default uitableviewcell , if want change imageview size need take custom uitableviewcell .


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -