ios - How can I set the height of my first UITableViewCell higher than the others? -
i trying in viewdidload():
func tableview(_ tableview: uitableview, heightforrowat indexpath: indexpath) -> cgfloat { if indexpath.row == 0 { return 300.0 } return 100.0 } but has no effect
in swift 3 write code in following way height row tableview delegate method do. not write inside of viewdidload method, can write in outside of viewdidload method
import uikit
class profileviewcontroller: uiviewcontroller,profileviewcontrollerdelegate { //mark: - outlet - @iboutlet weak var tblview: uitableview! //mark: - view life cycle - override func viewdidload() { } //mark: tablview delegate func tableview(_ tableview: uitableview, heightforrowat indexpath: indexpath) -> cgfloat { if indexpath.row == 0 { return 300.0 } return 100.0 }
Comments
Post a Comment