ios - UITableViewController swift different sizes of height with images -


i have uitableviewcontroller has 2 cells , when put photo in it, comes out same size. coding put in viewcontroller.swift is

import uikit  class tableviewcontroller: uitableviewcontroller {     var imagearray = ["1.png","2.png"]      override func viewdidload() {         super.viewdidload()     }      override func didreceivememorywarning() {         super.didreceivememorywarning()         // dispose of resources can recreated.     }      override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell {         let cell = tableview.dequeuereusablecellwithidentifier("cell") uitableviewcell!          let imageview = cell.viewwithtag(2) as! uiimageview         imageview.image = uiimage(named: imagearray[indexpath.row])          return cell     }      override func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int {         return imagearray.count     } } 

screenshot http://i65.tinypic.com/2qcq99w.png

i'm not sure of looking for? if want 2 cells differents height, should try override

override func tableview(_ tableview: uitableview, heightforrowatindexpath indexpath: nsindexpath) -> cgfloat { } 

in delegate.


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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -