Skip to content

Release MessageKit 2.0.0-beta1#910

Merged
nathantannar4 merged 69 commits intomasterfrom
version2.0.0
Oct 14, 2018
Merged

Release MessageKit 2.0.0-beta1#910
nathantannar4 merged 69 commits intomasterfrom
version2.0.0

Conversation

@nathantannar4
Copy link
Member

This PR is to run the final checks before merging development into master for the 2.0.0-beta1 release

tinder-sgong and others added 30 commits June 2, 2018 02:10
Add customizable accessoryView besides messageContainer
This change provides better handling of keyboard frames. It copes with different values of UIViewController.edgesForExtendedLayout, UIScrollView.contentInsetAdjumentBehavior, view controller containment scenarios and undocked keyboards, and uses cleaner code.

Improvements and fixes in this change:

1. Translates keyboard frame from screen coordinates into view controller coordinates. They aren’t the same thing when containment is involved, or edgesForExtendedLayout does not include .top.

2. Avoids special casing any iPhone models and avoids dealing with safeAreaInsets manually. In iOS 11, UIScrollView may behave differently depending on contentInsetAdjumentBehavior, and the old code incorrectly assumed that the mode is .always (while it is in fact is .automatic) and that no extra safe area insets have been introduced at the bottom edge. Best part, we don’t have to deal with any of this at all, we can offload the logic to UIScrollView itself by looking at the difference between adjustedContentInset and contentInset.

3. Handles view controller containment and undocked keyboards by taking into account an intersection of the scroll view frame and the keyboard’s frame. I think Apple demoes this in one of the WWDC videos, but I couldn’t find which one (or if I’m misremembering). Regardless, this technique makes sure we compute and use a sensible number.

There’s also a couple of extra renames that make the intention of the modified code clearer.
Adjust contentInset for the keyboard frame properly
nathantannar4 and others added 21 commits September 29, 2018 11:45
fix intrinsic content size for MessageLabel
…eViewController. Moreover, there is an easier method to find the visible section.

It is unnecessary to scroll to the bottom when title view updated.
Example chat screens do not scroll to the bottom on new message insertion.
Add didTapAccessoryView Delegate method and adjust layout
…ayButton Views, MessageContent, MessageCollectionView Cells, MessagesCollectionViewFlow Layout.
Fix: Allow required initializator methods @ Views.
Copy link
Member

@SD10 SD10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks correct to me 👍 Thanks for taking the lead on this

@nathantannar4 nathantannar4 merged commit 1e73aca into master Oct 14, 2018
@nathantannar4 nathantannar4 deleted the version2.0.0 branch October 14, 2018 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants