jessesquires / JSQMessagesViewController

An elegant messages UI library for iOS

Home Page:https://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Size issue of bubble chat on iPad

opened this issue · comments

I use JSQMessagesViewController for my messaging app and recently I made the app universal but I saw an issue with the size of message bubble that not looks great on the iPad but come back to normal If I put the table in landscape mode.

Take a look on the prints and let me know what I should check ? May something need to be adjusted ?

Print 1: https://i.stack.imgur.com/M4sul.png

Print 2 (after turn the table in landscape mode and back to portrait): https://i.stack.imgur.com/qb7x6.png

Similar issue here.
I use split views for iPad and in the portrait mode, message bubbles are truncated, everything's ok in the landscape mode, though.
Portrait mode - https://snag.gy/NlPAdw.jpg
Landscape mode - https://snag.gy/21pHDS.jpg

Hi again,

No one can give us a clue about what can be wrong here ?

I'm having a similar issue. Mine comes up OK when the JSQMessagesViewController is initially loaded in landscape. When I rotate to portrait, the content area appears to stay the right size for landscape (a timestamp label that is "centered" in the VC's frame is actually off-center on the screen). When I rotate to landscape, the content area appears to shrink to a width that would be correct for portrait. Behavior seems to be the same when starting in portrait.

Xcode is also giving me a warning message in the console:

The behavior of the UICollectionViewFlowLayout is not defined because:
the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values.
Please check the values returned by the delegate.
The relevant UICollectionViewFlowLayout instance is ,
and it is attached to:
• JSQMessagesCollectionView:

  • frame = (0 0; 1024 1252)
  • animations = { bounds=<CABasicAnimation: 0x1c502d8e0>; position=<CABasicAnimation: 0x1c502f0a0>; };
  • layer = <CALayer: 0x1c10396e0>;
  • contentOffset: {0, 0};
  • contentSize: {1366, 224};
  • adjustedContentInset: {0, 0, 44, 0}>

My setup is:
• iPad Pro 12.9" (Gen. 2)
• iOS 11 Beta
• Xcode 8.3.2 (8E2002)

The same setup, except swapping in an iPhone 7 Plus running iOS 11 Beta seems to work fine.

@mbm29414 Good Luck to get an answer.

Same issue for me. I'm 99% sure this was working and only broke recently. If I rotate the device it fixes. I've tried a few things including invalidating the collection view layout but it doesn't seem to help. I'm using the latest non-beta Xcode and iOS releases.

This seems like a similar issue to a previously fixed bug. Maybe it's resurfaced with an iOS update?

Solution:

I looked through some old pull requests and came across a closed one (not accepted) which will work as a temporary solution. As it wasn't accepted you will have to modify the source yourself but I had it working with just a couple minutes work.

This is the PR.

We will have to take a look into this. Thanks everyone who has contributed to this. It looks like we will be removing xib files in favor of a more programatic layout solution which should solve this issue in the future.

Hello everyone!

I'm sorry to inform the community that I'm officially deprecating this project. 😢 Please read my blog post for details:

http://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/

Thus, I'm closing all issues and pull requests and making the necessary updates to formally deprecate the library. I'm sorry if this is unexpected or disappointing. Please know that this was an extremely difficult decision to make. I'd like to thank everyone here for contributing and making this project so great. It was a fun 4 years. 😊

Thanks for understanding,
— jsq