Nathan Tannar
d9f8856d63
Add back parseForAttachedImages
2018-08-01 12:24:52 -07:00
Nathan Tannar
34dcda013a
Fix #569 and #789
2018-08-01 11:55:21 -07:00
Andrey Tarantsov
8f7c4077c0
Fix: make extraBottomInset work when set before showing
2018-08-01 13:27:41 +03:00
Andrey Tarantsov
a0b0749231
Introduce extraBottomInset property
2018-08-01 13:14:41 +03:00
Andrey Tarantsov
79b1ff02cd
Rename computeXxx to requiredXxx
2018-08-01 13:14:21 +03:00
Andrey Tarantsov
2ca89ec9cd
Better document the rationale behind keyboard code
2018-08-01 12:57:10 +03:00
Andrey Tarantsov
b49a0e0827
A tiny optimisation in keyboard handling
2018-08-01 12:22:21 +03:00
Andrey Tarantsov
39d4b6c032
Add a link to WWDC video about keyboard insets
2018-08-01 10:55:18 +03:00
Andrey Tarantsov
9eed4d8182
Adjust contentInset for the keyboard frame properly
...
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.
2018-07-30 16:47:28 +03:00
zhongwuzw
ab59a6d67b
Make initializer of CellSizeCalculator open
2018-07-16 11:13:03 +08:00
hyouuu and GitHub
ee08f3c88f
Merge pull request #1 from MessageKit/development
...
Merge from upstream
2018-06-26 19:07:41 -07:00
Steven Deutsch
ca117642b0
Relax protocol requirements for get/set
2018-06-13 18:06:25 -05:00
Wu Zhong and GitHub
528ed1aae6
Fixed MessageContentCell's subviews frame when size equal to .zero ( #716 )
...
* Fixed MessageContentCell's subviews frame when size equal to .zero
* Remove .zero check
* Fix test failure
2018-06-07 11:45:32 +08:00
Shawn Gong
2aa83ee984
Revert "keyboard frame done more correctly"
...
This reverts commit 081ca7ab1e .
2018-06-05 13:23:51 -07:00
Shawn Gong
081ca7ab1e
keyboard frame done more correctly
2018-06-04 23:26:07 -07:00
Shawn Gong
4dabb02d2e
Fix broken test (not related to this PR), and formatting
2018-06-04 16:55:31 -07:00
Shawn Gong
9c3032d8f7
Don’t ignore size calculation on zero size, and consider accessoryView height
2018-06-02 22:15:19 -07:00
Shawn Gong
7fde2fdc26
mimic avatar
2018-06-02 19:11:19 -07:00
Shawn Gong
3554e3fd24
Fix configCell stub cell type
2018-06-02 14:27:51 -07:00
Shawn Gong
b36924e3d2
consider accessoryViewPadding vertical attributes
2018-06-02 14:18:34 -07:00
Shawn Gong
9c23282d07
Add customizable accessoryView besides messageContainer
2018-06-02 02:10:51 -07:00
Steven Deutsch and GitHub
95f3921986
Merge branch 'development' into fix-bottom-inset
2018-06-01 14:59:54 -05:00
zhongwuzw
d2fee1851f
Fixed MessagesCollectionView's bottom inset when hardware keyboard is connected
2018-05-31 16:34:45 +08:00
zhongwuzw
74bb329c66
Make LabelAlignment initializer public
2018-05-29 22:09:59 +08:00
zhongwuzw
386ab8027f
Change helper method from open to public
2018-05-23 10:36:40 +08:00
zhongwuzw
6d667fcaca
Replace comments
2018-05-22 20:17:00 +08:00
zhongwuzw
4dbf9ccdda
Added convenience method to set properties for all MessageSizeCalculators
2018-05-22 18:19:33 +08:00
Wu Zhong and GitHub
a9a68f6476
Fixed separator line height ( #667 )
...
* Fixed separator line height
* Update CHANGELOG.md
2018-05-01 00:30:55 +08:00
Steven Deutsch
9b2e785cdc
Merge branch 'master' of https://github.com/MessageKit/MessageKit into development
2018-04-29 13:12:27 -05:00
Steven Deutsch
a6a5908276
Revert .bottom change and remove arg
2018-04-26 03:22:53 -05:00
Steven Deutsch
3786989988
Add CHANGELOG entry
2018-04-26 03:11:45 -05:00
Steven Deutsch
a6473c673e
Rename cellBottomLabel
2018-04-26 02:51:41 -05:00
Austin Wright
95de21cbeb
https://github.com/MessageKit/MessageKit/issues/663
...
- Removed textOffset CGPoint
- Adjusted touch location offset calculation to use textInsets .left/.top directly
2018-04-25 21:20:59 -04:00
Steven Deutsch
02805c748a
Fix cellContentHeight calculations
2018-04-20 03:40:37 -05:00
zhongwuzw
edd79fb3ae
Add cellTop/messageLabelTop/cellBottom case for avatar vertical position
2018-04-18 17:24:53 +08:00
zhongwuzw
56418d2c70
Add cellTopLabel and rename topLabel to messageTopLabel
2018-04-16 18:40:58 +08:00
zhongwuzw
39986f0458
Renamed MessageData to MessageKind
2018-04-16 11:57:50 +08:00
zhongwuzw
44e6e9848d
Remove NSAttributedString height(considering) extention method
2018-04-14 12:30:02 +08:00
zhongwuzw
99bb911c03
Reduce the number of calculation for label size
2018-04-12 23:32:16 +08:00
Steven Deutsch
4422020347
Merge branch 'master' of https://github.com/MessageKit/MessageKit into development
2018-04-11 16:11:35 -05:00
Steven Deutsch
c52d6e42fd
Remove annoying flatMap
2018-04-11 15:12:06 -05:00
zhongwuzw
0740574b87
boundingRect would return wrong size in some fonts, so add usesFontLeading option to use font leading for calculating line heights.
2018-04-11 21:54:05 +08:00
Corey Walo
b646060bc5
Updated access control from review
2018-04-07 18:23:43 -05:00
Corey Walo
1e206218c1
Merge remote-tracking branch 'upstream/refactor/move-open' into refactor/move-open
...
# Conflicts:
# Sources/Views/Cells/TextMessageCell.swift
2018-04-06 16:27:06 -05:00
Corey Walo
1038b96d01
Update access control
...
These are necessary to create custom cells that rely on the existing layout mechanisms.
2018-04-06 16:15:52 -05:00
zhongwuzw
ffa21fdb67
Fixed bubbleTailOutline of message bubble
2018-04-06 21:45:26 +08:00
zhongwuzw
bdfb988590
Fixed font invalidation of attributedString in MessageLabel
2018-04-06 11:00:42 +08:00
zhongwuzw
f202228c60
Add CHANGELOG
2018-04-06 10:43:11 +08:00
Corey Walo and Wu Zhong
6fcd2d6aa2
Only apply textColor for .text case of MessageData ( #625 )
...
* Only apply textColor for .text case of MessageData
* Update CHANGELOG
* Add name and PR #
2018-04-06 10:27:01 +08:00
Corey Walo
f48cd56851
Only apply textColor for .text case of MessageData
2018-04-05 13:00:25 -05:00