mirror of
https://github.com/MessageKit/MessageKit.git
synced 2026-02-06 19:03:19 +00:00
Merge branch 'master' into development
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 = "<group>"; };
|
||||
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 = "<group>"; };
|
||||
37F8BCD41F38F3A8003C12C2 /* Avatar.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; name = Avatar.playground; path = Playgrounds/Avatar.playground; sourceTree = "<group>"; 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 */,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 40 KiB |
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<playground version='5.0' target-platform='ios' display-mode='rendered'>
|
||||
<timeline fileName='timeline.xctimeline'/>
|
||||
</playground>
|
||||
Generated
-7
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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**:
|
||||
|
||||
Reference in New Issue
Block a user