Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
74b90dd
Add a UIRefreshControl to be the indicator of load more function.
azurechen Oct 25, 2017
2fd137b
Override the reloadData method of MessageCollectionView.
azurechen Oct 25, 2017
d17b500
Update the example.
azurechen Oct 25, 2017
a675650
Replace reloadData by a new method reloadAndMaintainOffset.
azurechen Oct 26, 2017
85550ab
Remove refreshControl in MessageCollectionView.
azurechen Oct 28, 2017
0832ba3
Update reloadDataAndKeepOffset function.
azurechen Oct 28, 2017
906036b
Fix to scroll to bottom when the height of the keyboard has changed
hellokenta1024 Nov 8, 2017
e272775
Use setContentOffset instead of scrollToBottom
hellokenta1024 Nov 9, 2017
8dbcddf
Add a flag that the user can determine whether scrolls according to …
hellokenta1024 Nov 11, 2017
3cab700
Add Carthage to gitignore
SD10 Dec 2, 2017
c04d50c
Add Quick/Nimble to project
SD10 Dec 2, 2017
5ac13b9
Refactor MessagesViewControllerTests to use Quick/Nimble
SD10 Dec 2, 2017
9b8cad1
Fix failing test
SD10 Dec 2, 2017
8701f58
Update swiftlint conf to exclude unneeded sorces
zhongwuzw Dec 4, 2017
c29cf4c
Remove hack code in tests
zhongwuzw Dec 4, 2017
550a5bc
Merge pull request #373 from zhongwuzw/remove-hack-code
SD10 Dec 4, 2017
0e67aab
Merge pull request #372 from zhongwuzw/update-swiftlint-conf
SD10 Dec 4, 2017
cca2afa
update Example podfile :path value
zhongwuzw Dec 5, 2017
a8e1b08
Merge pull request #377 from zhongwuzw/update-podfile
SD10 Dec 6, 2017
95a32d6
Optimize cell gesture handle logic
zhongwuzw Dec 7, 2017
dd89323
Merge bottomAnchorSize
nathantannar4 Dec 7, 2017
d797df1
transform if-else to switch
zhongwuzw Dec 7, 2017
0b49b35
Fixed Constraints Breaking and Content Size Calculations
nathantannar4 Dec 7, 2017
407ac37
Example Updates to show topStackView example/test
nathantannar4 Dec 7, 2017
e7e716f
Final Fix of bottom constraint issues
nathantannar4 Dec 7, 2017
749b7ef
CHANGELOG
nathantannar4 Dec 7, 2017
a653aa4
InputStackView Modification
nathantannar4 Dec 7, 2017
f058e38
Merge pull request #379 from zhongwuzw/messageLabel-optimize
SD10 Dec 7, 2017
36f7524
Merge pull request #368 from MessageKit/testing/quick
SD10 Dec 7, 2017
eb43204
CHANGELOG Edit
nathantannar4 Dec 7, 2017
c6680bd
Merge pull request #380 from MessageKit/inputBarFixes
nathantannar4 Dec 7, 2017
a5de50a
Add MessageLabel tests around detector attributes
SD10 Dec 7, 2017
3d53c32
Create MessageKitTests scheme
SD10 Dec 7, 2017
8604d34
Typos and Corrections
nathantannar4 Dec 7, 2017
d1141c7
Correct bottomAnchor to Window
nathantannar4 Dec 7, 2017
940be25
layoutStackViews typo
nathantannar4 Dec 7, 2017
c88b2a0
Initial Restructure to a contentView
nathantannar4 Dec 7, 2017
96db36e
Add test stubs for MessageLabelSpec
SD10 Dec 7, 2017
dc6f82c
New contentView to make constraint management easier
nathantannar4 Dec 8, 2017
a166b11
Merge pull request #384 from MessageKit/inputBarFixesContinued
nathantannar4 Dec 8, 2017
8b7efbc
Merge branch 'development' into switchMessageInputBarLayout
nathantannar4 Dec 8, 2017
2d023f0
CHANGELOG Entry
nathantannar4 Dec 8, 2017
86723e9
typo
nathantannar4 Dec 8, 2017
837032a
Fix notification observer bug when change the keyboard style
zhongwuzw Dec 8, 2017
62e1c1c
Add MessagesViewControllerTests stubs and convert some tests
SD10 Dec 8, 2017
4f71d04
Merge pull request #387 from zhongwuzw/notification-bug
SD10 Dec 8, 2017
26ed8ea
Refactor Avatar, Sender, & DetectorType tests
SD10 Dec 8, 2017
6bbb835
Just handle notification we wanted
zhongwuzw Dec 8, 2017
14efba0
FIx example launch screen icon layout
zhongwuzw Dec 8, 2017
ef0f1c2
Merge pull request #389 from zhongwuzw/fix-launch-icon
SD10 Dec 8, 2017
b045427
Merge pull request #388 from zhongwuzw/messageInputBar
nathantannar4 Dec 8, 2017
6666b0f
Removed Unneeded Code
nathantannar4 Dec 8, 2017
eb5621c
Merge pull request #390 from MessageKit/testing/controller
SD10 Dec 8, 2017
09748d9
Adjust messageInputBar's height when traitCollection changed
zhongwuzw Dec 9, 2017
d690f92
Fix constraits when padding changed
zhongwuzw Dec 9, 2017
8618baa
Merge pull request #393 from zhongwuzw/fix-constraints
nathantannar4 Dec 9, 2017
691359c
Remove generic constraint from MessageCollectionViewCell
SD10 Dec 9, 2017
ffd2342
Merge pull request #386 from MessageKit/switchMessageInputBarLayout
nathantannar4 Dec 10, 2017
20ae451
update messageInputBar height adjustment
zhongwuzw Dec 10, 2017
71a1115
remove unnecessary code
zhongwuzw Dec 10, 2017
a7e8bf8
Merge pull request #392 from zhongwuzw/fix-messagebar-rotate
zhongwuzw Dec 10, 2017
d928803
Add CHANGELOG entry for #391`
SD10 Dec 10, 2017
9eff91b
Fix modified reuse identifier
SD10 Dec 10, 2017
b24d8bc
Fix failing tests
SD10 Dec 10, 2017
034a9c1
Merge branch 'development' into testing/message-label
SD10 Dec 10, 2017
982695c
Clean up tests
SD10 Dec 10, 2017
342e567
Merge pull request #385 from MessageKit/testing/message-label
SD10 Dec 10, 2017
97c2401
Fix scrollToBottom && remove scrollsToBottomOnFirstLayout
zhongwuzw Dec 11, 2017
a353168
update space
zhongwuzw Dec 11, 2017
c0943b1
fix tests failure
zhongwuzw Dec 11, 2017
c7a9ad6
update tests code to remove scrollsToBottomOnFirstLayout check
zhongwuzw Dec 11, 2017
43bbe68
Fix MessageLabel font regression
SD10 Dec 11, 2017
8e8ad74
Use default snapshot size
SD10 Dec 11, 2017
0af6454
Merge pull request #391 from MessageKit/enhancement/remove-cells
SD10 Dec 11, 2017
30edae5
fix indexPathForLastItem bug when numberOfSections equal to 1.
zhongwuzw Dec 12, 2017
ad4c5c3
Add changelog
zhongwuzw Dec 12, 2017
769dc74
Merge pull request #395 from zhongwuzw/fix-scroll-to-bottm
SD10 Dec 12, 2017
62612df
Fix messageLabel layout issue
zhongwuzw Dec 13, 2017
cc56423
Fix MediaMessageCell's PlayButtonView layout issue
zhongwuzw Dec 14, 2017
a9f0276
Change messageLabel and playButtonView layout from frame to auto layout
zhongwuzw Dec 14, 2017
6bdbe65
Allow detector attributes to be set outside of the cell
SD10 Dec 14, 2017
82dfa44
Add CHANGELOG entry for #397
SD10 Dec 14, 2017
deb8754
Merge branch 'development' into enhancement/attributes-delegate
SD10 Dec 14, 2017
ad9252d
Resize imageMask instead of reapplying style
SD10 Dec 14, 2017
71c8ab5
Merge pull request #401 from MessageKit/bugfix/text-message-cell-layout
SD10 Dec 15, 2017
75db921
Merge pull request #397 from MessageKit/enhancement/attributes-delegate
SD10 Dec 16, 2017
59ee28e
Merge branch 'master' into development
SD10 Dec 16, 2017
5806e35
Merge pull request #406 from MessageKit/enhancement/resize-mask
SD10 Dec 16, 2017
57a4a25
Fix scroll to bottom instead of scroll to bottom bubble
zhongwuzw Dec 16, 2017
435b053
Revert change that attempts to sync MessageLabel properties
SD10 Dec 17, 2017
b9daeaf
Merge pull request #408 from MessageKit/bugfix/scrollToBottom
SD10 Dec 17, 2017
cc68d23
Merge pull request #410 from MessageKit/fix/label-bugs
SD10 Dec 17, 2017
4aebd58
Merge branch 'development' into fix-338
SD10 Dec 17, 2017
5aecc22
Update`maintainPositionOnKeyboardFrameChange`
SD10 Dec 17, 2017
ed0fcce
Merge pull request #340 from KEN-chan/fix-338
SD10 Dec 17, 2017
471d8b1
Add CHANGELOG entry for #340
SD10 Dec 17, 2017
7ac0324
Merge branch 'development' into enhancement/load-more-messages-and-ma…
SD10 Dec 17, 2017
67e6998
Merge pull request #284 from azurechen/enhancement/load-more-messages…
SD10 Dec 17, 2017
1d4db92
Add CHANGELOG entry for #284
SD10 Dec 17, 2017
7252651
Fix attributedText messageLabelFont bug
SD10 Dec 18, 2017
02149ea
Add changelog entry for #412
SD10 Dec 18, 2017
fb2f55c
Revert to old cell configure API
SD10 Dec 18, 2017
9d8edd1
Add CHANGELOG entry for #414
SD10 Dec 18, 2017
e7baba8
Set contentOffset after bottomInset
SD10 Dec 18, 2017
95199c9
Merge pull request #412 from MessageKit/bugfix/attributed-font
SD10 Dec 18, 2017
ec89a66
Merge branch 'development' into refactor/cell-configure
SD10 Dec 18, 2017
759f5a9
Merge pull request #414 from MessageKit/refactor/cell-configure
SD10 Dec 18, 2017
e1eda61
Update MessageKit.podspec for 0.12.0
SD10 Dec 18, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,4 @@ xcuserdata
Pods/

# Carthage
# Carthage/Checkouts

Carthage/Build
Carthage
13 changes: 8 additions & 5 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@

disabled_rules:
- identifier_name
- trailing_whitespace
- line_length
- type_body_length
- file_length
- identifier_name
- trailing_whitespace
- line_length
- type_body_length
- file_length
custom_rules:
override_func: # rule identifier
name: "override in func" # rule name. optional.
regex: "override (open|public|private|internal|fileprivate)" # matching pattern
message: "Use like open override or public override instead" # violation message. optional.
severity: warning # violation severity. optional.
included:
- Sources
- Tests
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,62 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa

## Upcoming release

## [[Prerelease] 0.12.0](https://github.com/MessageKit/MessageKit/releases/tag/0.12.0)

### Added

- Added `reloadDataAndKeepOffset()` method to `MessagesCollectionView` to maintain the current position
when reloading data.
[#284](https://github.com/MessageKit/MessageKit/pull/284) by [@azurechen](https://github.com/azurechen).

- Added `maintainPositionOnKeyboardFrameChanged: Bool` property to maintain the current position of the
`MessagesCollectionView` when the height of the `MessageInputBar` changes.
[#340](https://github.com/MessageKit/MessageKit/pull/340) by [@KEN-chan](https://github.com/KEN-chan).

- Added `detectorAttributes(for:and:at:)` method to `MessagesDisplayDelegate` allowing `DetectorType`
attributes to be set outside of the cell.
[#397](https://github.com/MessageKit/MessageKit/pull/397) by [@SD10](https://github.com/sd10).

### Fixed

- Fixed `indexPathForLastItem` bug when `numberOfSections` equal to 1.
[#395](https://github.com/MessageKit/MessageKit/issues/395) by [@zhongwuzw](https://github.com/zhongwuzw).

- Fixed `scrollToBottom(animated:)` not work in some situations.
[#395](https://github.com/MessageKit/MessageKit/issues/395) by [@zhongwuzw](https://github.com/zhongwuzw).

- Fixed `.attributedText(NSAttributedString)` messages that were not using the `textColor` from the
`MessagesDisplayDelegate` method.
[#414](https://github.com/MessageKit/MessageKit/issues/414) by [@SD10](https://github.com/sd10).

- Fixed a bug where new messages using `.attributedText(NSAttributedString)` have the incorrect font.
[#412](https://github.com/MessageKit/MessageKit/issues/412) by [@SD10](https://github.com/sd10).


### Changed

- **Breaking Change** The `MessageLabel` properties `addressAttributes`, `dateAttributes`, `phoneNumberAttributes`,
and `urlAttributes` are now read only. Please use `setAttributes(_:detector:)` to set these properties.
[#397](https://github.com/MessageKit/MessageKit/pull/397) by [@SD10](https://github.com/sd10).

- **Breaking Change** Removed the generic constraint `<ContentView: UIView>` from `MessageCollectionViewCell`.
[#391](https://github.com/MessageKit/MessageKit/pull/391) by [@SD10](https://github.com/sd10).

- **Breaking Change** The `contentView` property has been renamed to `imageView` for `LocationMessageCell` and `MediaMessageCell`
and `messageLabel` for `TextMessageCell`.
[#391](https://github.com/MessageKit/MessageKit/pull/391) by [@SD10](https://github.com/sd10).

- **Breaking Change** Changed the name of `MessageInputBar`'s property `maxHeight` to `maxTextViewHeight` as the property is the max height the `InputTextView` can have, not the `MessageInputBar` itself.
[#380](https://github.com/MessageKit/MessageKit/pull/380) by [@nathantannar4](https://github.com/nathantannar4).

- **Breaking Change** Adds a new view `contentView` of type `UIView` to the MessageInputBar to hold the main subviews of the `MessageInputBar`. Reduces complexity of constraints for easier testing/debugging.
[#384](https://github.com/MessageKit/MessageKit/pull/384) by [@nathantannar4](https://github.com/nathantannar4).

### Removed

- **Breaking Change** Removed `scrollsToBottomOnFirstLayout` flag of `MessagesViewController`.
[#395](https://github.com/MessageKit/MessageKit/pull/395) by [@zhongwuzw](https://github.com/zhongwuzw).

## [[Prerelease] 0.11.0](https://github.com/MessageKit/MessageKit/releases/tag/0.11.0)

### Added
Expand Down
2 changes: 2 additions & 0 deletions Cartfile.private
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github "Quick/Quick" ~> 1.2.0
github "Quick/Nimble" ~> 7.0.3
2 changes: 2 additions & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github "Quick/Nimble" "v7.0.3"
github "Quick/Quick" "v1.2.0"
2 changes: 1 addition & 1 deletion Documentation/FAQs.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ then get the `MessageType` for this cell through the `MessagesDataSource` method
`messageForItem(at:IndexPath,in:MessagesCollectionView)`.

```Swift
func didTapMessage<T>(in cell: MessageCollectionViewCell<T>) {
func didTapMessage(in cell: MessageCollectionViewCell) {
guard let indexPath = messagesCollectionView.indexPath(for: cell) else { return }
guard let messagesDataSource = messagesCollectionView.messagesDataSource else { return }
let message = messagesDataSource.messageForItem(at: indexPath, in: messagesCollectionView)
Expand Down
14 changes: 7 additions & 7 deletions Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ platform :ios, '9.0'

target 'ChatExample' do
use_frameworks!
pod 'MessageKit', :path => '../MessageKit.podspec'
pod 'MessageKit', :path => '../'

target 'ChatExampleTests' do
inherit! :search_paths
end
target 'ChatExampleTests' do
inherit! :search_paths
end

target 'ChatExampleUITests' do
inherit! :search_paths
end
target 'ChatExampleUITests' do
inherit! :search_paths
end

end
10 changes: 5 additions & 5 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
PODS:
- MessageKit (0.10.2)
- MessageKit (0.11.0)

DEPENDENCIES:
- MessageKit (from `../MessageKit.podspec`)
- MessageKit (from `../`)

EXTERNAL SOURCES:
MessageKit:
:path: ../MessageKit.podspec
:path: ../

SPEC CHECKSUMS:
MessageKit: a1e8d0f1d7785891e4b37f6252898f23cd8f8b6a
MessageKit: 96caa3ba2c32f9393b406256c5caa29ae9189d71

PODFILE CHECKSUM: 9ac65b8dedf0e1b63fea245b089b6645c4e66309
PODFILE CHECKSUM: cecdb7bc8129cf99f66de9f68eea3256fec30c3d

COCOAPODS: 1.3.1
21 changes: 21 additions & 0 deletions Example/Sources/Assets.xcassets/ic_typing.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icons8-hand_with_pen.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"images" : [
{
"idiom" : "universal",
"filename" : "mklogo.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "mklogo.png",
"scale" : "2x"
},
{
Expand Down
13 changes: 7 additions & 6 deletions Example/Sources/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -23,15 +22,17 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mklogo" translatesAutoresizingMaskIntoConstraints="NO" id="NHX-yN-7Jk">
<rect key="frame" x="32" y="98" width="310" height="171"/>
<rect key="frame" x="76" y="99" width="222" height="127"/>
<constraints>
<constraint firstAttribute="width" constant="222" id="O7O-V2-Dmt"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.24325716495513916" green="0.76319533586502075" blue="0.32751965522766113" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="NHX-yN-7Jk" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leadingMargin" constant="16" id="ak3-MI-1bZ"/>
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" relation="greaterThanOrEqual" secondItem="NHX-yN-7Jk" secondAttribute="bottom" id="1Ce-5w-nEL"/>
<constraint firstItem="NHX-yN-7Jk" firstAttribute="top" secondItem="Llm-lL-Icb" secondAttribute="bottom" priority="750" constant="79" id="ReL-Hv-5uq"/>
<constraint firstItem="NHX-yN-7Jk" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="ebx-nK-jHq"/>
<constraint firstItem="NHX-yN-7Jk" firstAttribute="top" secondItem="Llm-lL-Icb" secondAttribute="bottom" constant="78" id="mKL-l2-81o"/>
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="NHX-yN-7Jk" secondAttribute="bottom" constant="398" id="mjQ-GM-veo"/>
</constraints>
</view>
</viewController>
Expand All @@ -41,6 +42,6 @@
</scene>
</scenes>
<resources>
<image name="mklogo" width="888" height="255"/>
<image name="mklogo" width="444" height="127"/>
</resources>
</document>
Loading