小编Ahm*_*san的帖子

展开和折叠tableview单元格

我能够扩展和折叠单元格,但我想在UITableViewCell中调用函数(展开和折叠)来更改按钮标题.

iphone 5

import UIKit

class MyTicketsTableViewController: UITableViewController {

    var selectedIndexPath: NSIndexPath?
    var extraHeight: CGFloat = 100

    override func viewDidLoad() {
        super.viewDidLoad()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 5
    }

    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! MyTicketsTableViewCell
        return cell
    }

    override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { …

uitableview ios swift

23
推荐指数
2
解决办法
2万
查看次数

标签 统计

ios ×1

swift ×1

uitableview ×1