मैं tableView समारोह अंदर startAnimation बुला() द्वारा tableViewCell पंक्तियों की ऊंचाई चेतन करने के लिए कोशिश कर रहा हूँ:स्विफ्ट: UITableView की पंक्ति को कैसे एनिमेट करें?
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath: indexPath) as! TableViewCell
tableView.rowHeight = 44.0
startAnimation(tableView)
return cell
}
//MARK: Animation function
func startAnimation(tableView: UITableView) {
UIView.animateWithDuration(0.7, delay: 1.0, options: .CurveEaseOut, animations: {
tableView.rowHeight = 88.0
}, completion: { finished in
print("Row heights changed!")
})
}
परिणाम: पंक्ति की ऊँचाई में बदल जाती है लेकिन होने वाली किसी भी एनीमेशन के बिना। मुझे समझ में नहीं आता कि एनीमेशन क्यों काम नहीं करता है। क्या मुझे शायद कुछ शुरुआत और अंत राज्य को परिभाषित करना चाहिए?