Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some typos #171

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ final class ComplexDeclarativeViewController: UIViewController {
("Purple", UIColor.systemPurple),
]
let numberOfItems = Int.random(in: 1..<possibleItems.count)
let allIndicies = Array(0...numberOfItems).shuffled()
let allIndices = Array(0...numberOfItems).shuffled()
let textStyles: [UIFont.TextStyle] = [
.title2,
.title3,
.body,
]

return allIndicies.map { index in
return allIndices.map { index in
let color = possibleItems[index]
let textStyle = textStyles.randomElement() ?? .title3
return HGroupItem(
Expand Down
4 changes: 2 additions & 2 deletions Sources/EpoxyBars/BarInstaller/BarWrapperView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public final class BarWrapperView: UIView {

guard let view = view else { return nil }

/// We allow bar views to recieve touches outside of this wrapper,
/// We allow bar views to receive touches outside of this wrapper,
/// so we manually hit test the bar view.
return view.hitTest(view.convert(point, from: self), with: event)
}
Expand Down Expand Up @@ -188,7 +188,7 @@ public final class BarWrapperView: UIView {
if !oldValue.isDiffableItemEqual(to: model) {
model.configureContent(view, traitCollection: traitCollection, animated: animated)
}
// The behavior is configured regardless of content equality sice behavior is not equatable.
// The behavior is configured regardless of content equality since behavior is not equatable.
model.configureBehavior(view, traitCollection: traitCollection)
} else {
let view = makeView(
Expand Down
4 changes: 2 additions & 2 deletions Sources/EpoxyBars/BarModel/BarModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public struct BarModel<View: UIView>: ViewEpoxyModeled {
/// - dataID: An optional ID that uniquely identifies this bar relative to other bars in the
/// same bar stack.
/// - content: The content of the bar view that will be applied to the view in the `setContent`
/// closure whenver it has changed.
/// closure whenever it has changed.
/// - setContent: A closure that's called to configure the view with its content, both
/// immediately following its construction in `makeView` and subsequently whenever a new bar
/// model that replaced an old bar model with the same `dataID` has content that is not equal
Expand Down Expand Up @@ -65,7 +65,7 @@ public struct BarModel<View: UIView>: ViewEpoxyModeled {
/// - params: The parameters used to construct an instance of the view, passed into the
/// `makeView` function and used as a view reuse identifier.
/// - content: The content of the bar view that will be applied to the view in the
/// `setContent` closure whenver it has changed.
/// `setContent` closure whenever it has changed.
/// - makeView: A closure that's called with `params` to construct view instances as required.
/// - setContent: A closure that's called to configure the view with its content, both
/// immediately following its construction in `makeView` and subsequently whenever a new bar
Expand Down
4 changes: 2 additions & 2 deletions Sources/EpoxyCollectionView/Models/ItemModel/ItemModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public struct ItemModel<View: UIView>: ViewEpoxyModeled {
/// - dataID: An ID that uniquely identifies this item relative to other items in the
/// same collection.
/// - content: The content of the item view that will be applied to the view in the
/// `setContent` closure whenver it has changed.
/// `setContent` closure whenever it has changed.
/// - setContent: A closure that's called to configure the view with its content, both
/// immediately following its construction in `makeView` and subsequently whenever a new item
/// model that replaced an old item model with the same `dataID` has content that is not equal
Expand Down Expand Up @@ -60,7 +60,7 @@ public struct ItemModel<View: UIView>: ViewEpoxyModeled {
/// - params: The parameters used to construct an instance of the view, passed into the
/// `makeView` function and used as a view reuse identifier.
/// - content: The content of the item view that will be applied to the view in the
/// `setContent` closure whenver it has changed.
/// `setContent` closure whenever it has changed.
/// - makeView: A closure that's called with `params` to construct view instances as required.
/// - setContent: A closure that's called to configure the view with its content, both
/// immediately following its construction in `makeView` and subsequently whenever a new item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public struct SupplementaryItemModel<View: UIView>: ViewEpoxyModeled {
/// - dataID: An ID that uniquely identifies this item relative to other items in the
/// same collection.
/// - content: The content of the item view that will be applied to the view in the
/// `setContent` closure whenver it has changed.
/// `setContent` closure whenever it has changed.
/// - setContent: A closure that's called to configure the view with its content, both
/// immediately following its construction in `makeView` and subsequently whenever a new item
/// model that replaced an old item model with the same `dataID` has content that is not equal
Expand Down Expand Up @@ -60,7 +60,7 @@ public struct SupplementaryItemModel<View: UIView>: ViewEpoxyModeled {
/// - params: The parameters used to construct an instance of the view, passed into the
/// `makeView` function and used as a view reuse identifier.
/// - content: The content of the item view that will be applied to the view in the
/// `setContent` closure whenver it has changed.
/// `setContent` closure whenever it has changed.
/// - makeView: A closure that's called with `params` to construct view instances as required.
/// - setContent: A closure that's called to configure the view with its content, both
/// immediately following its construction in `makeView` and subsequently whenever a new item
Expand Down
2 changes: 1 addition & 1 deletion Sources/EpoxyCore/Diffing/Collection+Diff.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ extension Collection where Element: DiffableSection, Index == Int {

// MARK: - Entry

/// A bookkeeping refrence type for the diffing algorithm.
/// A bookkeeping reference type for the diffing algorithm.
private final class Entry {

// MARK: Internal
Expand Down
4 changes: 2 additions & 2 deletions Sources/EpoxyCore/Model/Providers/WillDisplayProviding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ extension CallbackContextEpoxyModeled where Self: WillDisplayProviding {
// MARK: Public

/// A closure that's called when a view is about to be displayed, before it has been added to the
/// view hierarcy.
/// view hierarchy.
public typealias WillDisplay = (_ context: CallbackContext) -> Void

/// A closure that's called when the view is about to be displayed, before it has been added to
/// the view hierarcy.
/// the view hierarchy.
public var willDisplay: WillDisplay? {
get { self[willDisplayProperty] }
set { self[willDisplayProperty] = newValue }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import UIKit

// MARK: - Constrainable

/// Defines something that can be constrainted with AutoLayout
/// Defines something that can be constrained with AutoLayout
public protocol Constrainable {
var leadingAnchor: NSLayoutXAxisAnchor { get }
var trailingAnchor: NSLayoutXAxisAnchor { get }
Expand Down
8 changes: 4 additions & 4 deletions Sources/EpoxyLayoutGroups/Groups/HGroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class HGroup: UILayoutGuide, Constrainable, InternalGroup {
/// - alignment: The alignment used within the group. Individual item alignments will
/// take precedence over this value
/// - accessibilityAlignment: The accessibility alignment for the items within a group.
/// these will only be used when `reflowsForAccessibiltyTypeSizes` is `true`
/// these will only be used when `reflowsForAccessibilityTypeSizes` is `true`
/// and when the `preferredContentSizeCategory.isAccessibilityCategory` is `true`.
/// These will also be used if `forceVerticalAccessibilityLayout` is set to `true`.
/// Individual item alignments will take precedence over this value
Expand Down Expand Up @@ -81,7 +81,7 @@ public final class HGroup: UILayoutGuide, Constrainable, InternalGroup {
/// - alignment: The alignment used within the group. Individual item alignments will
/// take precedence over this value
/// - accessibilityAlignment: The accessibility alignment for the items within a group.
/// these will only be used when `reflowsForAccessibiltyTypeSizes` is `true`
/// these will only be used when `reflowsForAccessibilityTypeSizes` is `true`
/// and when the `preferredContentSizeCategory.isAccessibilityCategory` is `true`.
/// These will also be used if `forceVerticalAccessibilityLayout` is set to `true`.
/// Individual item alignments will take precedence over this value
Expand Down Expand Up @@ -118,14 +118,14 @@ public final class HGroup: UILayoutGuide, Constrainable, InternalGroup {
/// - alignment: The alignment used within the group. Individual item alignments will
/// take precedence over this value
/// - accessibilityAlignment: The accessibility alignment for the items within a group.
/// these will only be used when `reflowsForAccessibiltyTypeSizes` is `true`
/// these will only be used when `reflowsForAccessibilityTypeSizes` is `true`
/// and when the `preferredContentSizeCategory.isAccessibilityCategory` is `true`.
/// These will also be used if `forceVerticalAccessibilityLayout` is set to `true`.
/// Individual item alignments will take precedence over this value.
/// The default value of this property is `.leading`
/// - spacing: the spacing between items of the group
/// - reflowsForAccessibilityTypeSizes: whether or not this group should reflow when DynamicType
/// is enabled and is an accessiblity size category.
/// is enabled and is an accessibility size category.
/// The default value is `true`
/// - forceVerticalAccessibilityLayout: force the group to use the the vertical accessibility layout
/// - animation: define style properties for animated group updates, with a default `spring` animation curve.
Expand Down
2 changes: 1 addition & 1 deletion Sources/EpoxyLayoutGroups/Models/GroupItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ extension GroupItem where ItemType: UIView {
/// Set the content compression resistance priority for the underlying UIView.
/// Calling this method on a GroupItem for a non-UIView class will do nothing.
/// - Parameters:
/// - priority: the content compression resitance priority
/// - priority: the content compression resistance priority
/// - axis: the axis this priority should be applied to
/// - Returns: a copy of the model with the priority set
public func contentCompressionResistancePriority(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extension EpoxyModeled where Self: AccessibilityAlignmentProviding {
set { self[accessibilityAlignmentProperty] = newValue }
}

/// Returns a copy of this model replacing the `accessibiltyAlignment` value
/// Returns a copy of this model replacing the `accessibilityAlignment` value
/// with the one provided.
public func accessibilityAlignment(_ value: VGroup.ItemAlignment?) -> Self {
copy(updating: accessibilityAlignmentProperty, to: value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public protocol ReflowsForAccessibilityTypeSizeProviding {
/// Only used in HGroup. Whether or not the HGroup should reflow for accessibility
/// type sizes. When this value is `true` the `HGroup` will reflow when
/// `preferredContentSizeCategory.isAccessibilityCategory` is `true`. The `HGroup` reflows
/// to model a `VGroup` and uses the `accessibiltyAlignment` value to determine item alignments.
/// to model a `VGroup` and uses the `accessibilityAlignment` value to determine item alignments.
var reflowsForAccessibilityTypeSizes: Bool { get }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extension LayoutGroupUpdateAnimation {
/// - duration: a TimeInterval for animation duration, with a default value of `0.5`
/// - delay: a TimeInterval for animation duration, with a default value of `0.0`
/// - dampingRatio: a value for spring damping ratio, with a default value of `1.0`
/// - initialSpringVelocity: a value for initial spring velocity, wiht a default value of `0.0`
/// - initialSpringVelocity: a value for initial spring velocity, with a default value of `0.0`
public static func spring(
duration: TimeInterval = 0.5,
delay: TimeInterval = 0.0,
Expand Down
2 changes: 1 addition & 1 deletion Sources/EpoxyNavigationController/NavigationQueue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import UIKit
/// The interface that's available to a `NavigationQueue` to manage the visible view controllers
/// within a navigation stack.
///
/// Rougly matches the API of `UINavigationController`.
/// Roughly matches the API of `UINavigationController`.
protocol NavigationInterface: AnyObject {
/// The active transition coordinator object.
var transitionCoordinator: UIViewControllerTransitionCoordinator? { get }
Expand Down
4 changes: 2 additions & 2 deletions Tests/EpoxyTests/CoreTests/CollectionDiffSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ final class CollectionDiffSpec: QuickSpec {
]

describe("makeChangeset") {
context("with called on an indentical collection") {
context("with called on an identical collection") {
it("returns an empty changeset") {
let changeset = intArray.makeChangeset(from: intArray)
expect(changeset.inserts).to(beEmpty())
Expand Down Expand Up @@ -550,7 +550,7 @@ final class CollectionDiffSpec: QuickSpec {
}

describe("makeSectionedChangeset") {
context("with called on an indentical collection") {
context("with called on an identical collection") {
it("returns an empty changeset") {
let changeset = testSectionedDiffableArray.makeSectionedChangeset(
from: testSectionedDiffableArray)
Expand Down
2 changes: 1 addition & 1 deletion Tests/EpoxyTests/LayoutGroupsTests/HGroupSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ final class HGroupSpec: QuickSpec {
}
}

// MARK: reflowsForAccessibiltiyTypeSizes = true
// MARK: reflowsForAccessibilityTypeSizes = true

describe("when reflowsForAccessibilityTypeSizes is true") {
describe("when the preferred type size is not an accessibility size") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ extension StubTransitionCoordinator: UIViewControllerTransitionCoordinator {

// swiftlint:disable unavailable_function
func notifyWhenInteractionChanges(_: @escaping (UIViewControllerTransitionCoordinatorContext) -> Void) {
fatalError("Not implmented")
fatalError("Not implemented")
}

func viewController(forKey key: UITransitionContextViewControllerKey) -> UIViewController? {
Expand Down
Loading