简体   繁体   English

iPhone 6 Plus的UIBubbleTableView问题

[英]UIBubbleTableView issue with iPhone 6 Plus

I have been using UIBubbleTableView for about two years now without much problem. 我已经使用UIBubbleTableView大约两年了,没有太大问题。

Today I checked it on iPHone 6 Plus and to my suprise the UIBubbleTableView looks as weird as in the screen shot below. 今天,我在iPHone 6 Plus上对其进行了检查,并令我惊讶的是, UIBubbleTableView外观与下面的屏幕截图一样奇怪。

在此处输入图片说明

Has anyone encountered this issue before? 有人遇到过这个问题吗? What could be done? 该怎么办? I think the author has decided to discontinue the support for the lib. 我认为作者已决定停止对lib的支持。 Any alternatives that has the features of UIBubbleTableView? 是否具有UIBubbleTableView功能的替代方案? Thanks. 谢谢。

Try replace 尝试更换

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

for 对于

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

in UIBubbleTableView.m . UIBubbleTableView.m See UIBubbleTableView issue UIBubbleTableView is not working with 64 bit os device 请参阅UIBubbleTableView问题UIBubbleTableView不适用于64位操作系统
Quote a comment from another issue about issue reason : 引用另一个问题中有关问题原因的评论:

The problem is indeed the call to - (float)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath. 问题确实是对-(float)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath的调用。 When compiled for 64-bit, CGFloat is 64 bit, whereas float is only 32-bit. 为64位编译时,CGFloat为64位,而float仅为32位。 The method signature doesn't match, so heightForRow is never called. 方法签名不匹配,因此从未调用heightForRow。 Changing it from float to CGFloat is exactly the right solution. 将其从float更改为CGFloat是正确的解决方案。

Yes, you're right, the author of UIBubbleTableView lib has been stopped support for it. 是的,您是对的,UIBubbleTableView lib的作者已停止对其的支持。 Recently I've to make the similar kind of chat functionality into my app, I was satisfied with SOMessaging lib. 最近,我不得不在我的应用程序中加入类似的聊天功能,我对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 . 但是从它们中,我过滤了一些此答案,请在sphchatcollectionviewjsqmessagesviewcontrollernotificationchat中检查其示例代码(根据您的需要选择适合的代码)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM