diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a8d9444..bc95c3c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa - Fixed `messageInputBar` sendButton not disabled in some situations. [#475](https://github.com/MessageKit/MessageKit/pull/475) by [@zhongwuzw](https://github.com/zhongwuzw). +- Fixed message bubble tail orientation invalidation in `iOS9`. +[#469](https://github.com/MessageKit/MessageKit/pull/469) by [@zhongwuzw](https://github.com/zhongwuzw). + ## [[Prerelease] 0.13.0](https://github.com/MessageKit/MessageKit/releases/tag/0.13.0) ### Fixed diff --git a/Example/ChatExample.xcodeproj/project.pbxproj b/Example/ChatExample.xcodeproj/project.pbxproj index 863a18e6..56d35379 100644 --- a/Example/ChatExample.xcodeproj/project.pbxproj +++ b/Example/ChatExample.xcodeproj/project.pbxproj @@ -58,7 +58,6 @@ 0364943D08CDBE656E6F6DF8 /* Pods-ChatExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChatExampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ChatExampleTests/Pods-ChatExampleTests.debug.xcconfig"; sourceTree = ""; }; 2AC6E3F5C11E39F57598DBE6 /* Pods_ChatExampleUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ChatExampleUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 37D3EAC31F390E5F00DD6A55 /* SampleData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SampleData.swift; sourceTree = ""; }; - 37F8BCD41F38F3A8003C12C2 /* Avatar.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; name = Avatar.playground; path = Playgrounds/Avatar.playground; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 3B316705C4717C3B4C916D62 /* Pods_ChatExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ChatExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 56F0AC85B38034EC92CCBC7D /* Pods_ChatExampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ChatExampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 882B5E331CF7D4B900B6E160 /* ChatExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChatExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -155,7 +154,6 @@ B0655A321F23E90800542A83 /* ConversationViewController.swift */, 37D3EAC31F390E5F00DD6A55 /* SampleData.swift */, 882B5E7E1CF7D53600B6E160 /* InboxViewController.swift */, - 37F8BCD41F38F3A8003C12C2 /* Avatar.playground */, B096438A1F288D47004D0129 /* MockMessage.swift */, 882B5E801CF7D53600B6E160 /* SettingsViewController.swift */, 882B5E791CF7D53600B6E160 /* Assets.xcassets */, diff --git a/Example/Sources/InboxViewController.swift b/Example/Sources/InboxViewController.swift index f6fae520..37f478bc 100644 --- a/Example/Sources/InboxViewController.swift +++ b/Example/Sources/InboxViewController.swift @@ -28,7 +28,7 @@ import SafariServices final class InboxViewController: UITableViewController { - let cells = ["Example", "Settings", "Source Code", "Contributers"] + let cells = ["Example", "Settings", "Source Code", "Contributors"] // MARK: - View Life Cycle @@ -83,7 +83,7 @@ final class InboxViewController: UITableViewController { guard let url = URL(string: "https://github.com/MessageKit/MessageKit") else { return } let webViewController = SFSafariViewController(url: url) present(webViewController, animated: true, completion: nil) - case "Contributers": + case "Contributors": guard let url = URL(string: "https://github.com/orgs/MessageKit/teams/contributors/members") else { return } let webViewController = SFSafariViewController(url: url) present(webViewController, animated: true, completion: nil) diff --git a/Example/Sources/Playgrounds/Avatar.playground/Contents.swift b/Example/Sources/Playgrounds/Avatar.playground/Contents.swift deleted file mode 100644 index 2a44d96f..00000000 --- a/Example/Sources/Playgrounds/Avatar.playground/Contents.swift +++ /dev/null @@ -1,29 +0,0 @@ -import UIKit -import MessageKit -import PlaygroundSupport - -//: Discover what is possible with the Avatar Class -//Get an image -let testImage = #imageLiteral(resourceName: "NiceSelfi.jpg") - -var avatarView = AvatarView() - -//: Uncomment any line to see how it changes the `Avatar`. Change the parameters and see the effects. - -//: By default its a circlular avatar with a gray background and initals of "?" - -//: Create an avatar object and set it for the view. -var avatarObject = Avatar(image: testImage) -avatarView.set(avatar: avatarObject) - -//: If you don't have a picture for the user you can pass in there initals instead. -avatarObject = Avatar(initals: "DL") -avatarView.set(avatar: avatarObject) - -//: Want rounded squares instead of circles just adjust the radius with the method .setCorner(radius: CGFLoat)`. -//avatarView.setCorner(radius: 5) - -//: Everything has a default so if you dont want to set it then you dont have to. - -//Helper method. -PlaygroundPage.current.liveView = avatarView diff --git a/Example/Sources/Playgrounds/Avatar.playground/Resources/NiceSelfi.jpg b/Example/Sources/Playgrounds/Avatar.playground/Resources/NiceSelfi.jpg deleted file mode 100644 index bec3cfec..00000000 Binary files a/Example/Sources/Playgrounds/Avatar.playground/Resources/NiceSelfi.jpg and /dev/null differ diff --git a/Example/Sources/Playgrounds/Avatar.playground/contents.xcplayground b/Example/Sources/Playgrounds/Avatar.playground/contents.xcplayground deleted file mode 100644 index 89da2d47..00000000 --- a/Example/Sources/Playgrounds/Avatar.playground/contents.xcplayground +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Example/Sources/Playgrounds/Avatar.playground/playground.xcworkspace/contents.xcworkspacedata b/Example/Sources/Playgrounds/Avatar.playground/playground.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/Example/Sources/Playgrounds/Avatar.playground/playground.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Sources/Layout/MessagesCollectionViewFlowLayout.swift b/Sources/Layout/MessagesCollectionViewFlowLayout.swift index f7c0aa97..bddeefb8 100644 --- a/Sources/Layout/MessagesCollectionViewFlowLayout.swift +++ b/Sources/Layout/MessagesCollectionViewFlowLayout.swift @@ -26,7 +26,7 @@ import UIKit import AVFoundation /// The layout object used by `MessagesCollectionView` to determine the size of all -/// framework provided `MessagesCollectionViewCell` subclasses. +/// framework provided `MessageCollectionViewCell` subclasses. open class MessagesCollectionViewFlowLayout: UICollectionViewFlowLayout { // MARK: - Properties [Public] @@ -87,7 +87,7 @@ open class MessagesCollectionViewFlowLayout: UICollectionViewFlowLayout { return messagesLayoutDelegate } - /// The width of an item in the `MessagesCollectionViewCell`. + /// The width of an item in the `MessageCollectionViewCell`. fileprivate var itemWidth: CGFloat { guard let collectionView = collectionView else { return 0 } return collectionView.frame.width - sectionInset.left - sectionInset.right diff --git a/Sources/Layout/MessagesCollectionViewLayoutAttributes.swift b/Sources/Layout/MessagesCollectionViewLayoutAttributes.swift index 0b842b82..f3b2dc4f 100644 --- a/Sources/Layout/MessagesCollectionViewLayoutAttributes.swift +++ b/Sources/Layout/MessagesCollectionViewLayoutAttributes.swift @@ -24,7 +24,7 @@ import UIKit -/// The layout attributes used by a `MessagesCollectionViewCell` to layout its subviews. +/// The layout attributes used by a `MessageCollectionViewCell` to layout its subviews. final class MessagesCollectionViewLayoutAttributes: UICollectionViewLayoutAttributes { // MARK: - Properties diff --git a/Sources/Models/AvatarPosition.swift b/Sources/Models/AvatarPosition.swift index 24c3005a..35ea380c 100644 --- a/Sources/Models/AvatarPosition.swift +++ b/Sources/Models/AvatarPosition.swift @@ -25,7 +25,7 @@ import Foundation /// Used to determine the `Horizontal` and `Vertical` position of -// an `AvatarView` in a `MessagesCollectionViewCell`. +// an `AvatarView` in a `MessageCollectionViewCell`. public struct AvatarPosition { /// An enum representing the horizontal alignment of an `AvatarView`. diff --git a/Sources/Models/MessageStyle.swift b/Sources/Models/MessageStyle.swift index 7ec4fd13..591e0ce8 100644 --- a/Sources/Models/MessageStyle.swift +++ b/Sources/Models/MessageStyle.swift @@ -89,7 +89,7 @@ public enum MessageStyle { image = UIImage(cgImage: cgImage, scale: image.scale, orientation: corner.imageOrientation) } - return stretch(image).withRenderingMode(.alwaysTemplate) + return stretch(image) } // MARK: - Private diff --git a/Sources/Protocols/MessagesDataSource.swift b/Sources/Protocols/MessagesDataSource.swift index 4d0f12f2..486510eb 100644 --- a/Sources/Protocols/MessagesDataSource.swift +++ b/Sources/Protocols/MessagesDataSource.swift @@ -38,7 +38,7 @@ public protocol MessagesDataSource: AnyObject { /// and the current Sender. func isFromCurrentSender(message: MessageType) -> Bool - /// The message to be used for a `MessagesCollectionViewCell` at the given `IndexPath`. + /// The message to be used for a `MessageCollectionViewCell` at the given `IndexPath`. /// /// - Parameters: /// - indexPath: The `IndexPath` of the cell. diff --git a/Sources/Protocols/MessagesDisplayDelegate.swift b/Sources/Protocols/MessagesDisplayDelegate.swift index e5620dc0..75d3e72c 100644 --- a/Sources/Protocols/MessagesDisplayDelegate.swift +++ b/Sources/Protocols/MessagesDisplayDelegate.swift @@ -25,7 +25,7 @@ import Foundation import MapKit -/// A protocol used by the `MessagesViewController` to customize the appearance of a `MessagesCollectionViewCell`. +/// A protocol used by the `MessagesViewController` to customize the appearance of a `MessageCollectionViewCell`. public protocol MessagesDisplayDelegate: AnyObject { // MARK: - All Messages diff --git a/VISION.md b/VISION.md index 0e0826c0..7d51d5cb 100644 --- a/VISION.md +++ b/VISION.md @@ -18,7 +18,7 @@ Instead, MessageKit will provide you with hooks to easily handle your different - **iOS version**: We will strive to support the 3 latest versions of iOS. -- **Objective-C Compatability**: +- **Objective-C Compatibility**: We will not sacrifice functionality or an idiomatic Swift API to support Objective-C, but would love to improve Objective-C compatability where possible. - **Layouts**: