iPhone 6 Plus 的 UIBubbleTableView 问题

UIBubbleTableView issue with iPhone 6 Plus

我已经使用 UIBubbleTableView 大约两年了,没有太大问题。

今天我在 iPHone 6 Plus 上查看了它,令我惊讶的是 UIBubbleTableView 看起来和下面的屏幕截图一样奇怪。

有没有人遇到过这个问题?可以做什么?我认为作者已经决定停止对 lib 的支持。任何具有 UIBubbleTableView 功能的替代品? 谢谢

是的,你是对的,UIBubbleTableView 库的作者已经停止支持它。最近我要在我的应用程序中加入类似的聊天功能,我很满意 SOMessaging lib. Check it out. Its easy to customize and use. And yes, you can check out many other libs available here. But out of them, I filtered some for this answer, kindly check its sample code (whichever fits as per your needs) here's sphchatcollectionview, jsqmessagesviewcontroller and notificationchat

尝试替换

(float)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

UIBubbleTableView.m 中。请参阅 UIBubbleTableView 问题 UIBubbleTableView is not working with 64 bit os device
引用 another issue 关于问题原因的评论:

The problem is indeed the call to - (float)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath. When compiled for 64-bit, CGFloat is 64 bit, whereas float is only 32-bit. The method signature doesn't match, so heightForRow is never called. Changing it from float to CGFloat is exactly the right solution.