简体   繁体   中英

UIBubbleTableView issue with iPhone 6 Plus

I have been using UIBubbleTableView for about two years now without much problem.

Today I checked it on iPHone 6 Plus and to my suprise the UIBubbleTableView looks as weird as in the screen shot below.

在此处输入图片说明

Has anyone encountered this issue before? What could be done? I think the author has decided to discontinue the support for the lib. Any alternatives that has the features of UIBubbleTableView? Thanks.

Try replace

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

for

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

in UIBubbleTableView.m . See UIBubbleTableView issue UIBubbleTableView is not working with 64 bit os device
Quote a comment from another issue about issue reason :

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.

Yes, you're right, the author of UIBubbleTableView lib has been stopped support for it. Recently I've to make the similar kind of chat functionality into my app, I was satisfied with 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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