55 Commits

Author SHA1 Message Date
Raúl Olmedo 944b0c828e Wait for the inputView to be laid out 2024-05-27 19:01:04 +02:00
Raúl Olmedo 29beea1868 Added listener for keyboard input mode changes (e.g. emoji keyboard) 2024-05-24 17:08:47 +02:00
Artem Trubacheev 5166b9b23c Added ability to specify additionalBottomSpace for keyboardManager 2023-11-14 14:56:21 +04:00
Roman Podymov 99b71d0e84 Collection View Height 2022-08-22 09:44:43 +02:00
Martin Púčik bff35fda61 Added Swiftlint and Swiftformat plugins (#1729)
* build: Swiftlint plugin

* build: Swiftformat plugin

* build: Swiftformat plugin

* build: Swiftformat bash command

* style: Swiftformat rules

* style: Swiftformat applied to codebase

* style: Ignore Tests for Swiftlint

* Update bundler

* Update changelog and migration guide

* style: Ignore Example for Swiftlint

* chore: Changelog

* Update Xcode version for ci_pr_tests.yml

* Update ci_pr_framework.yml

* Update ci_pr_example.yml

* chore: Changelog

Co-authored-by: Jakub Kaspar <kaspikk@gmail.com>
2022-07-25 08:46:14 +00:00
Martin Púčik 6244308bff Observe inputBar frame change to update collectionView bottom inset (#1726)
* feat: Update bottom inset on InputBar frame  change

* feat: Update bottom inset on InputBar frame  change

Delay textview did begin editing notification for scroll to bottom to work

* feat: Update bottom inset on InputBar frame  change

Remove unnecessary presentedController check

* feat: Update bottom inset on InputBar frame  change

Docu

* feat: Update bottom inset on InputBar frame  change

Changelog
2022-07-20 16:26:54 +02:00
Martin Púčik fe1c415b20 Update chat bottom inset after input bar size change (#1725)
* fix: Update chat bottom inset after input bar size change

* fix: Update chat bottom inset after input bar size change

Changelog update
2022-07-19 13:54:05 +02:00
Martin Púčik 7d66a982ad Updating messagesCollectionView's bottom inset and content position on inpuBar height change (#1705)
* refactor: InpuBar height change behavior

* refactor: InpuBar height change behavior

Changelog
2022-05-05 14:03:22 +00:00
martinpucik 4ab430c7b1 refactor: InpuBar as subview instead of accessoryView
Cleanup of commented and not used code
Moved some internal properties to state object
Removed iOS 13 available checks
2022-05-04 16:44:27 +02:00
martinpucik dbbf45d2ee refactor: InpuBar as subview instead of accessoryView
Using KeyboardManager to handle input container view position on keyboard change
2022-05-03 14:47:13 +02:00
martinpucik 0709350393 refactor: InpuBar as subview instead of accessoryView
Basic keyboard observing from accessory view's observing view
2022-04-29 12:30:19 +02:00
Anton Karpechenkov ba61f6e74f updated target bottom offset of collection view despite the contentSize is smaller than viewport 2021-03-13 20:52:15 +01:00
Jakub Kaspar 6aa9b664b2 Fix warning in example project 2020-12-20 22:12:33 +01:00
martinpucik ee372e321c fix: maintainPositionOnKeyboardFrameChanged for small contentSize 2020-12-04 07:40:09 +01:00
martinpucik 1f2f7336c3 refactor: deprecated scrollToBottom() in favor of scrollToLastItem 2020-12-03 18:53:48 +01:00
Kino f3769005b9 Fixes incorrect animation of cells during keyboard drag-dismiss 2020-08-10 21:49:29 -07:00
Martin Púčik 81395b6575 Swift Package Manager support without RxSwift dependency (#1341)
* feat: SPM support

Using InputAccessoryView dependency without Rx

* feat: SPM support

Add missing imports

* feat: Swift Package Manager support

Added Package description with Assets support for Swift 5.3

* feat: Swift Package Manager support

Remove .swiftpm temp files

* feat: Swift Package Manager support

Ignore .swiftpm temp files

* feat: Swift Package Manager support

Remove Package.resolved

* feat: Swift Package Manager support

Ignore Package.resolved

* feat: Swift Package Manager support

Assets in framework project

* feat: Swift Package Manager support

Fix tests

* feat: Swift Package Manager support

Fix tests

* feat: Swift Package Manager support

Fix tests

* feat: Swift Package Manager support

Try Bundle.module to get MessageKit bundle

* feat: Swift Package Manager support

SPM condition in bundle

* feat: Swift Package Manager support

Remove previous Swift 5.2 version Package.swift

* feat: Swift Package Manager support

Update Readme with SPM installation
2020-06-30 17:24:07 +02:00
martinpucik 176c6cdd28 documentation: Loading remote image messages in Example project 2020-03-20 13:56:20 +01:00
Jakub Kaspar 26c38d512a Update example project 2020-02-28 15:17:23 +01:00
Jakub Kaspar bc7ba72a52 Drop iOS 9 and iOS 10 2020-02-28 15:13:14 +01:00
Shawn Gong 8c76d5af4c Merge branch 'development' of https://github.com/hyouuu/MessageKit into development 2020-02-17 18:45:24 -08:00
Shawn Gong f6160fce22 Merge branch 'development' of https://github.com/MessageKit/MessageKit into development 2020-02-17 18:44:08 -08:00
Andrew Abosh 53afe4b04d Merge branch 'development' into master 2020-02-17 15:34:29 -05:00
Andrew Abosh fa0b2c3e44 Revert "Merge remote-tracking branch 'origin/development'"
This reverts commit 2e5479032e, reversing
changes made to fb4d9cc0e5.
2020-02-17 15:26:25 -05:00
Andrew Abosh 2e5479032e Merge remote-tracking branch 'origin/development' 2020-02-17 15:23:03 -05:00
hyouuu 4d0350e96c Check scrollsToLastItemOnKeyboardBeginsEditing and scroll on begin editing 2020-02-17 00:33:27 -08:00
hyouuu 07d9c7788a Apply https://github.com/MessageKit/MessageKit/pull/1217 to dev 2020-02-16 22:05:43 -08:00
Andrew Abosh fb4d9cc0e5 Fixed requiredInitialScrollViewBottomInset not returning the correct value when inputAccessoryView is nil 2019-11-20 11:39:22 -05:00
Gwynant Jones d887d8541b [Hotfix] - Fix notifications being received from child modal view controllers.
We are receiving keyboard notifications from child modal view controllers, this
is a fix to ensure that this doesn't happen.
2019-11-20 14:00:53 +00:00
Nathan Tannar bf421465b5 Fix lint violations 2019-04-11 11:59:24 -07:00
Nathan Tannar e679f7c0e8 Merge branch '3.0.0-beta' into development 2019-04-05 09:58:19 -07:00
Nathan Tannar 7a942711a6 Convert to Swift 5 / Fix Linting 2019-04-05 09:37:57 -07:00
xxjldh 31220c91a3 fix #1020 the inputbar overlaps the last message 2019-04-01 21:12:27 +09:00
Marc Schultz 1aa4310a7e Fix issues with SwiftLint rules explicit_acl and explicit_top_level_acl 2019-03-30 20:57:46 +01:00
Nathan Tannar e9b3a7065f Quick fix for #993 2019-02-28 22:33:27 -08:00
Nathan Tannar ede22c30bc Swap MessageInputBar for InputBarAccessoryView 2019-02-24 14:06:58 -08:00
Nathan Tannar 2f1c0e53ce Bump copyright year 2019-02-21 20:53:23 -08: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
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 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 d2fee1851f Fixed MessagesCollectionView's bottom inset when hardware keyboard is connected 2018-05-31 16:34:45 +08:00
zhongwuzw c82a7c0d1e update access control 2018-03-30 12:49:31 +08:00