Commit Graph

98 Commits

Author SHA1 Message Date
martinpucik 1f2f7336c3 refactor: deprecated scrollToBottom() in favor of scrollToLastItem 2020-12-03 18:53:48 +01:00
Kino 2362616326 remove keyboard observers in viewWillDisappear 2020-09-30 22:42:10 -07:00
amir pirzad f08cdad1f4 Fix some issues 2020-09-02 22:28:24 +04:30
amir pirzad c0a659daa3 Change to better check 2020-08-30 02:14:47 +04:30
amir pirzad f04a89c764 Add removePanGesture method 2020-08-30 02:06:06 +04:30
amir pirzad 404f3ad332 Add boolean for enable/disable display time 2020-08-28 17:21:00 +04:30
amir pirzad 216d26baec Add message time label 2020-08-28 16:27:50 +04:30
amir pirzad 57e77b0b3d Check pan gesture direction 2020-08-28 15:56:33 +04:30
amir pirzad ddfce2e724 Add pan gesture 2020-08-28 15:16:01 +04:30
Kino Roy 02b03f3c26 Merge branch 'development' into link-preview-support 2020-06-30 10:42:28 -07:00
Kino Roy 1918e55a48 Convert internal, static colors into color assets. (#1386)
* Add Assets.xcassets to MessageKitAssets.bundle

* Replace incomingGray, outgoingGreen, inputBarGray

* Replace playButtonLightGray, with UIVisualEffectView to mimic iMessage (Fixes #1321 , Fixes #1335)

* Fixes an issue where the triangle in the play button is not centered

* remove sendButtonBlue, add incoming/outgoingAudioMessageTint

Matches audio tint more closely to iMessage by tinting white on outgoing and tinting blue on incoming

* Remove backgroundColor, add collectionViewBackground

* remove unused labelColor

* Remove unused placeholderTextColor

* Remove grayColor

* remove darkTextColor, add typingIndicatorDot

Matches dot color more closely to iMessage

* Remove unused lightGrayColor

* Adds high contrast appearances to the color assets

* Add MessageKitError string for case when color asset could not be loaded

Also removes redundant internal access level modifier on MessageKitError (internal is default), and changes MessageKitError from enum -> struct as its members were not enum cases

* Fix swiftlint issues

* Add label color asset and use in ContactMessageCell

* Fix tests
2020-06-23 13:42:00 -07:00
Bruno Guidolim 99d0719224 Add LinkPreview support to MessageKit 2020-04-04 16:55:50 +02:00
Jakub Kaspar bc7ba72a52 Drop iOS 9 and iOS 10 2020-02-28 15:13:14 +01:00
Jakub Kaspar a2e06a396a Fix comments 2020-02-24 19:35:19 +01:00
hyouuu 3dfd26e934 typo 2020-02-18 14:06:57 -08:00
hyouuu a3cb5aeaa6 Add scrollsToLastItemOnKeyboardBeginsEditing flag 2020-02-17 00:32:46 -08:00
Vlada Radchenko db27093302 dark mode support 2019-10-01 18:30:48 +03:00
Marc Etcheverry fbc427f7a3 Lazily initialize the messageInputBar for those that don't want to use it. 2019-06-12 01:10:50 -07:00
Nathan Tannar bdb11d25fc Cleanup / Add warnings / Prep for beta release 2019-04-05 00:35:21 -07:00
Nathan Tannar 8cc96d71a2 Merge remote-tracking branch 'origin/3.0.0-beta' into typingIndicatorView 2019-04-05 00:11:14 -07:00
Nathan Tannar d19e7df997 Go back to using a reserved section method 2019-04-02 22:43:09 -07:00
Iosif Moldovan de6a57645f Merge branch '3.0.0-beta' of github.com:MessageKit/MessageKit into share_contact
# Conflicts:
#	Example/Sources/Data Generation/SampleData.swift
#	Sources/Views/Cells/AudioMessageCell.swift
2019-03-12 16:42:05 +02:00
Iosif Moldovan 08451fbde0 Add contact share message support 2019-03-12 16:02:52 +02:00
Nathan Tannar fa06818e74 Typing Indicator as a Supplementary View 2019-02-28 22:40:36 -08:00
Nathan Tannar ede22c30bc Swap MessageInputBar for InputBarAccessoryView 2019-02-24 14:06:58 -08:00
Nathan Tannar f95d5e1647 Update inset on safe area change 2019-02-21 20:55:11 -08:00
Nathan Tannar 00f9f6e4c3 Expose selectedIndexPathForMenu 2019-02-21 20:54:09 -08:00
Nathan Tannar 2f1c0e53ce Bump copyright year 2019-02-21 20:53:23 -08:00
Iosif Moldovan 7f855d20a3 pull out BasicAudioController from MessageKit framework 2018-12-15 12:44:33 +02:00
Iosif Moldovan ce6ebb0f0b Merge branch 'development' of https://github.com/MessageKit/MessageKit into tagonsoft_development
# Conflicts:
#	Example/Sources/Data Generation/SampleData.swift
2018-10-26 09:33:45 +03:00
Nathan Tannar 3b3db11032 Merge pull request #879 from RealBonus/enhancement/customMessageKind
MessagesDataSource & MessagesLayoutDelegate methods for MessageType.custom
2018-10-25 18:02:46 -07:00
Pavel Anokhov eb848be3f0 Changelog and some comments 2018-10-19 16:32:46 +03:00
Iosif Moldovan 2e6c76f061 rename AudioControllerDelegate method 2018-10-17 10:19:19 +03:00
Iosif Moldovan ea4c123707 apply second review changes 2018-10-08 13:46:37 +03:00
Iosif Moldovan 84de5586c4 apply review changes 2018-10-05 13:00:46 +03:00
Iosif Moldovan a493493e0e Revert "fix configure audio cell"
This reverts commit da872d6d0a, reversing
changes made to cda9cfa470.
2018-10-04 10:09:55 +03:00
Iosif Moldovan da872d6d0a fix configure audio cell 2018-10-04 09:53:47 +03:00
Iosif Moldovan cda9cfa470 implement support for audio message 2018-10-03 17:20:01 +03:00
Iosif Moldovan 515b98ce45 partial development in add audio message support 2018-10-03 12:19:33 +03:00
Nathan Tannar 9a2affcd6f Update to Swift 4.2 2018-09-29 11:45:50 -07:00
Nathan Tannar 230e067009 Integrate MessageInputBar as a dependency (#732)
* Remove MessageInputBar files and change build settings

* Conditional imports to allow for builds without MessageInputBar

* Update Cardfile

* Specify Version in Cartfile for MessageInputBar

* Remove conditional imports in favor of Carthage for local development

* Additional `import MessageInputBar`

* Remove `MessageInputBar` from Cartfile.private

* Bump MessageInputBar version

* Add Cartfile

* Tweak build settings

* Specify import of MessageInputBar for Carthage
2018-09-17 12:22:21 -05:00
Polina Petrenko 3bfeccd080 Fix a typo in scrollsToBottomOnKeybordBeginsEditing 2018-09-11 23:10:20 +03:00
Pavel Anokhov fe0a000fc5 MessagesDataSource & MessagesLayoutDelegate methods for MessageType.custom handling. 2018-09-08 11:16:42 +03:00
zhongwuzw 540f203f6a Fix insets calculation when present and dismiss vc && remove precision when compare double 2018-08-07 14:44:27 +08: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 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 d2fee1851f Fixed MessagesCollectionView's bottom inset when hardware keyboard is connected 2018-05-31 16:34:45 +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