diff --git a/CHANGELOG.md b/CHANGELOG.md index d29bd50e..56ba5739 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -152,7 +152,7 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa ### Deprecated -- Deprecated `SenderType.id` in favour of `SenderType.senderId`. This change was previously meant for 3.0.0. [#1201](https://github.com/MessageKit/MessageKit/pull/1201) by [@kinoroy](https://github.com/kinoroy) +- Deprecated `SenderType.id` in favor of `SenderType.senderId`. This change was previously meant for 3.0.0. [#1201](https://github.com/MessageKit/MessageKit/pull/1201) by [@kinoroy](https://github.com/kinoroy) ### Removed @@ -261,7 +261,7 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa - Added customizable `accessoryView`, with a new `MessagesDisplayDelegate` function `configureAccessoryView`, and corresponding size & padding properties in `MessageSizeCalculator`. The `accessoryView` is aligned to the center of the `messageContainerView`. [#710](https://github.com/MessageKit/MessageKit/pull/710) by [@hyouuu](https://github.com/hyouuu) -- Added a tap gesture recognition to the `accessoryView` which calls the `MessageCellDelagate` function `didTapAccessoryView(in:)`. +- Added a tap gesture recognition to the `accessoryView` which calls the `MessageCellDelegate` function `didTapAccessoryView(in:)`. [#834](https://github.com/MessageKit/MessageKit/pull/834) by [@nathantannar4](https://github.com/nathantannar4) - Added `additionalBottomInset` property that allows to adjust the bottom content inset automatically set on the messages collection view by the view controller. diff --git a/Sources/Layout/LinkPreviewMessageSizeCalculator.swift b/Sources/Layout/LinkPreviewMessageSizeCalculator.swift index b9af0018..d5a5a2f9 100644 --- a/Sources/Layout/LinkPreviewMessageSizeCalculator.swift +++ b/Sources/Layout/LinkPreviewMessageSizeCalculator.swift @@ -94,9 +94,9 @@ open class LinkPreviewMessageSizeCalculator: TextMessageSizeCalculator { } private extension LinkPreviewMessageSizeCalculator { - private func calculateContainerSize(with attibutedString: NSAttributedString, containerSize: inout CGSize, maxWidth: CGFloat) { - guard !attibutedString.string.isEmpty else { return } - let size = labelSize(for: attibutedString, considering: maxWidth) + private func calculateContainerSize(with attributedString: NSAttributedString, containerSize: inout CGSize, maxWidth: CGFloat) { + guard !attributedString.string.isEmpty else { return } + let size = labelSize(for: attributedString, considering: maxWidth) containerSize.height += size.height } } diff --git a/Sources/Models/AvatarPosition.swift b/Sources/Models/AvatarPosition.swift index f3c11e95..bc758e4b 100644 --- a/Sources/Models/AvatarPosition.swift +++ b/Sources/Models/AvatarPosition.swift @@ -39,12 +39,12 @@ public struct AvatarPosition: Equatable { case cellTrailing /// Positions the `AvatarView` based on whether the message is from the current Sender. - /// The cell is positioned `.cellTrailling` if `isFromCurrentSender` is true + /// The cell is positioned `.cellTrailing` if `isFromCurrentSender` is true /// and `.cellLeading` if false. case natural } - /// An enum representing the verical alignment for an `AvatarView`. + /// An enum representing the vertical alignment for an `AvatarView`. public enum Vertical { /// Aligns the `AvatarView`'s top edge to the cell's top edge. diff --git a/Sources/Models/HorizontalEdgeInsets.swift b/Sources/Models/HorizontalEdgeInsets.swift index 695f4e50..93133df4 100644 --- a/Sources/Models/HorizontalEdgeInsets.swift +++ b/Sources/Models/HorizontalEdgeInsets.swift @@ -25,7 +25,7 @@ import Foundation import UIKit -/// A varient of `UIEdgeInsets` that only has horizontal inset properties +/// A variant of `UIEdgeInsets` that only has horizontal inset properties public struct HorizontalEdgeInsets: Equatable { public var left: CGFloat diff --git a/Sources/Models/Sender.swift b/Sources/Models/Sender.swift index c44b8be1..14ffe379 100644 --- a/Sources/Models/Sender.swift +++ b/Sources/Models/Sender.swift @@ -43,7 +43,7 @@ public struct Sender: SenderType { /// The display name of a sender. public let displayName: String - // MARK: - Intializers + // MARK: - Initializers public init(senderId: String, displayName: String) { self.senderId = senderId diff --git a/Sources/Protocols/LinkItem.swift b/Sources/Protocols/LinkItem.swift index d8b16a38..38ebc380 100644 --- a/Sources/Protocols/LinkItem.swift +++ b/Sources/Protocols/LinkItem.swift @@ -31,7 +31,7 @@ public protocol LinkItem { /// A link item needs a message to present, it can be a simple String or /// a NSAttributedString, but only one will be shown. - /// LinkItem.text has priority over LinkeItem.attributedText. + /// LinkItem.text has priority over LinkItem.attributedText. /// The message text. var text: String? { get } diff --git a/Sources/Protocols/MediaItem.swift b/Sources/Protocols/MediaItem.swift index 86525c3e..6c0fc432 100644 --- a/Sources/Protocols/MediaItem.swift +++ b/Sources/Protocols/MediaItem.swift @@ -34,7 +34,7 @@ public protocol MediaItem { /// The image. var image: UIImage? { get } - /// A placeholder image for when the image is obtained asychronously. + /// A placeholder image for when the image is obtained asynchronously. var placeholderImage: UIImage { get } /// The size of the media item. diff --git a/Sources/Protocols/MessagesDisplayDelegate.swift b/Sources/Protocols/MessagesDisplayDelegate.swift index 1be3798a..32e01c5f 100644 --- a/Sources/Protocols/MessagesDisplayDelegate.swift +++ b/Sources/Protocols/MessagesDisplayDelegate.swift @@ -144,7 +144,7 @@ public protocol MessagesDisplayDelegate: AnyObject { /// - Returns: The LocationMessageSnapshotOptions instance with the options to customize map style. func snapshotOptionsForLocation(message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> LocationMessageSnapshotOptions - /// Used to configure the annoation view of the map image on the given location message. + /// Used to configure the annotation view of the map image on the given location message. /// /// - Parameters: /// - message: A `MessageType` with a `MessageKind` case of `.location`. @@ -178,7 +178,7 @@ public protocol MessagesDisplayDelegate: AnyObject { /// Used to configure the audio cell UI: /// 1. play button selected state; - /// 2. progresssView progress; + /// 2. progressView progress; /// 3. durationLabel text; /// /// - Parameters: @@ -210,7 +210,7 @@ public protocol MessagesDisplayDelegate: AnyObject { /// - Note: /// The default value is computed like fallow: /// 1. return the time as 0:ss if duration is up to 59 seconds (e.g. 0:03 means 0 minutes and 3 seconds) - /// 2. return the time as m:ss if duration is greater than 59 and lower than 3600 (e.g. 12:23 means 12 mintues and 23 seconds) + /// 2. return the time as m:ss if duration is greater than 59 and lower than 3600 (e.g. 12:23 means 12 minutes and 23 seconds) /// 3. return the time as h:mm:ss for anything longer that 3600 seconds (e.g. 1:19:08 means 1 hour 19 minutes and 8 seconds) func audioProgressTextFormat(_ duration: Float, for audioCell: AudioMessageCell, in messageCollectionView: MessagesCollectionView) -> String diff --git a/Sources/Protocols/MessagesLayoutDelegate.swift b/Sources/Protocols/MessagesLayoutDelegate.swift index 800011f6..15dca456 100644 --- a/Sources/Protocols/MessagesLayoutDelegate.swift +++ b/Sources/Protocols/MessagesLayoutDelegate.swift @@ -188,7 +188,7 @@ public protocol MessagesLayoutDelegate: AnyObject { /// The default implementation will return nil. You must override this method if you are using your own cell for messages with MessageType.audio. func audioCellSizeCalculator(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CellSizeCalculator? - /// Constact cell size calculator for messages with MessageType.contact. + /// Contact cell size calculator for messages with MessageType.contact. /// /// - Parameters: /// - message: The contact message diff --git a/Sources/Views/AvatarView.swift b/Sources/Views/AvatarView.swift index 6e5bd206..7e71c9e5 100644 --- a/Sources/Views/AvatarView.swift +++ b/Sources/Views/AvatarView.swift @@ -141,7 +141,7 @@ open class AvatarView: UIImageView { /** Calculates the inner circle's width. - Note: Assumes corner radius cannot be more than width/2 (this creates circle). + - Note: Assumes corner radius cannot be more than width/2 (this creates circle). */ private func calculateTextRect(outerViewWidth: CGFloat, outerViewHeight: CGFloat) -> CGRect { guard outerViewWidth > 0 else { diff --git a/Sources/Views/BubbleCircle.swift b/Sources/Views/BubbleCircle.swift index c0c276ad..c1e1637d 100644 --- a/Sources/Views/BubbleCircle.swift +++ b/Sources/Views/BubbleCircle.swift @@ -27,7 +27,7 @@ import UIKit /// A `UIView` subclass that maintains a mask to keep it fully circular open class BubbleCircle: UIView { - /// Lays out subviews and applys a circular mask to the layer + /// Lays out subviews and applies a circular mask to the layer open override func layoutSubviews() { super.layoutSubviews() layer.mask = roundedMask(corners: .allCorners, radius: bounds.height / 2) diff --git a/VISION.md b/VISION.md index e071591f..b16014c4 100644 --- a/VISION.md +++ b/VISION.md @@ -19,7 +19,7 @@ Instead, MessageKit will provide you with hooks to easily handle these situation We will strive to support the 3 latest versions of iOS. - **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. +We will not sacrifice functionality or an idiomatic Swift API to support Objective-C, but would love to improve Objective-C compatibility where possible. - **Layouts**: We will favor programmatic layouts over `.xib`s where ever possible.