![](/img/trans.png)
[英]Conflicting return type in implementation of 'tableview:canEditRowAtIndexPath:'
[英]conflicting return type in implementation of 'tableView:heightForFooterInSection': 'CGFloat' (aka 'double') vs 'float')
我有以下錯誤代碼,如上面的主題
-(float) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { return 150.0f; }
感謝對此的修復,
謝謝
您應該刪除f
並返回150.0
。
因為當您在最后添加f
時,它會創建一個浮點數,而您想要返回一個雙精度數。 並且因為方法簽名應該是-(CGFloat)
而不是-(float)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.