Skip to content

Commit 8532621

Browse files
committed
Fix spellchecking errors
1 parent 22b92d5 commit 8532621

19 files changed

+46
-47
lines changed

Example/Examples/Header/HeaderViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class HeaderViewController: UIViewController {
100100
insets: .zero
101101
)
102102

103-
// Contrain the paging view to all edges.
103+
// Constrain the paging view to all edges.
104104
pagingViewController.view.translatesAutoresizingMaskIntoConstraints = false
105105
NSLayoutConstraint.activate([
106106
pagingViewController.view.topAnchor.constraint(equalTo: view.topAnchor),

Example/Examples/Icons/IconPagingCell.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class IconPagingCell: PagingCell {
7272
private func setupConstraints() {
7373
imageView.translatesAutoresizingMaskIntoConstraints = false
7474

75-
let topContraint = NSLayoutConstraint(
75+
let topConstraint = NSLayoutConstraint(
7676
item: imageView,
7777
attribute: .top,
7878
relatedBy: .equal,
@@ -92,7 +92,7 @@ class IconPagingCell: PagingCell {
9292
constant: -15
9393
)
9494

95-
let leadingContraint = NSLayoutConstraint(
95+
let leadingConstraint = NSLayoutConstraint(
9696
item: imageView,
9797
attribute: .leading,
9898
relatedBy: .equal,
@@ -102,7 +102,7 @@ class IconPagingCell: PagingCell {
102102
constant: 0
103103
)
104104

105-
let trailingContraint = NSLayoutConstraint(
105+
let trailingConstraint = NSLayoutConstraint(
106106
item: imageView,
107107
attribute: .trailing,
108108
relatedBy: .equal,
@@ -113,10 +113,10 @@ class IconPagingCell: PagingCell {
113113
)
114114

115115
contentView.addConstraints([
116-
topContraint,
116+
topConstraint,
117117
bottomConstraint,
118-
leadingContraint,
119-
trailingContraint,
118+
leadingConstraint,
119+
trailingConstraint,
120120
])
121121
}
122122
}

Example/Examples/Images/UnsplashViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class UnsplashViewController: UIViewController {
163163
)
164164

165165
// Add the paging view controller as a child view controller and
166-
// contrain it to all edges.
166+
// constrain it to all edges.
167167
addChild(pagingViewController)
168168
view.addSubview(pagingViewController.view)
169169
view.constrainToEdges(pagingViewController.view)
@@ -236,7 +236,7 @@ extension UnsplashViewController: PagingViewControllerDataSource {
236236
extension UnsplashViewController: ImagesViewControllerDelegate {
237237
func imagesViewControllerDidScroll(_ imagesViewController: ImagesViewController) {
238238
// Calculate the menu height based on the content offset of the
239-
// currenly selected view controller and update the menu.
239+
// currently selected view controller and update the menu.
240240
let height = calculateMenuHeight(for: imagesViewController.collectionView)
241241
updateMenu(height: height)
242242
}

Example/Examples/LargeTitles/LargeTitlesViewController.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Parchment
22
import UIKit
33

4-
// This example shows how to use Parchment togehter with
4+
// This example shows how to use Parchment together with
55
// "prefersLargeTitles" on UINavigationBar. It works by creating a
66
// "hidden" scroll view that is added as a subview to the view
77
// controller. Apparently, UIKit will look for a scroll view that is
@@ -116,7 +116,7 @@ class LargeTitlesViewController: UIViewController {
116116
hiddenScrollView.contentInset = viewController.tableView.contentInset
117117
hiddenScrollView.contentOffset = viewController.tableView.contentOffset
118118

119-
// Set the UITableViewDelegate to the currenly visible table view.
119+
// Set the UITableViewDelegate to the currently visible table view.
120120
viewController.tableView.delegate = self
121121
}
122122
}
@@ -154,7 +154,7 @@ extension LargeTitlesViewController: PagingViewControllerDelegate {
154154
guard let destinationViewController = destinationViewController as? TableViewController else { return }
155155
guard let startingViewController = startingViewController as? TableViewController else { return }
156156

157-
// Set the UITableViewDelegate back to the currenly selected
157+
// Set the UITableViewDelegate back to the currently selected
158158
// view controller when the page scroll ended.
159159
if transitionSuccessful {
160160
destinationViewController.tableView.delegate = self

Example/Examples/MultipleCells/MultipleCellsViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class MultipleCellsViewController: UIViewController {
2121
pagingViewController.select(index: 0)
2222

2323
// Add the paging view controller as a child view controller
24-
// and contrain it to all edges.
24+
// and constrain it to all edges.
2525
addChild(pagingViewController)
2626
view.addSubview(pagingViewController.view)
2727

Example/Examples/SizeDelegate/SizeDelegateViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Parchment
22
import UIKit
33

44
final class SizeDelegateViewController: UIViewController {
5-
// Let's start by creating an array of citites that we
5+
// Let's start by creating an array of cities that we
66
// will use to generate some view controllers.
77
fileprivate let cities = [
88
"Oslo",
@@ -30,7 +30,7 @@ final class SizeDelegateViewController: UIViewController {
3030
pagingViewController.sizeDelegate = self
3131

3232
// Add the paging view controller as a child view controller and
33-
// contrain it to all edges.
33+
// constrain it to all edges.
3434
addChild(pagingViewController)
3535
view.addSubview(pagingViewController.view)
3636
view.constrainToEdges(pagingViewController.view)

Example/Examples/Storyboard/StoryboardViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class StoryboardViewController: UIViewController {
1919
])
2020

2121
// Make sure you add the PagingViewController as a child view
22-
// controller and contrain it to the edges of the view.
22+
// controller and constrain it to the edges of the view.
2323
addChild(pagingViewController)
2424
view.addSubview(pagingViewController.view)
2525
view.constrainToEdges(pagingViewController.view)

Example/Resources/UIView+constraints.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ extension UIView {
44
func constrainCentered(_ subview: UIView) {
55
subview.translatesAutoresizingMaskIntoConstraints = false
66

7-
let verticalContraint = NSLayoutConstraint(
7+
let verticalConstraint = NSLayoutConstraint(
88
item: subview,
99
attribute: .centerY,
1010
relatedBy: .equal,
@@ -14,7 +14,7 @@ extension UIView {
1414
constant: 0
1515
)
1616

17-
let horizontalContraint = NSLayoutConstraint(
17+
let horizontalConstraint = NSLayoutConstraint(
1818
item: subview,
1919
attribute: .centerX,
2020
relatedBy: .equal,
@@ -24,7 +24,7 @@ extension UIView {
2424
constant: 0
2525
)
2626

27-
let heightContraint = NSLayoutConstraint(
27+
let heightConstraint = NSLayoutConstraint(
2828
item: subview,
2929
attribute: .height,
3030
relatedBy: .equal,
@@ -34,7 +34,7 @@ extension UIView {
3434
constant: subview.frame.height
3535
)
3636

37-
let widthContraint = NSLayoutConstraint(
37+
let widthConstraint = NSLayoutConstraint(
3838
item: subview,
3939
attribute: .width,
4040
relatedBy: .equal,
@@ -45,10 +45,10 @@ extension UIView {
4545
)
4646

4747
addConstraints([
48-
horizontalContraint,
49-
verticalContraint,
50-
heightContraint,
51-
widthContraint,
48+
horizontalConstraint,
49+
verticalConstraint,
50+
heightConstraint,
51+
widthConstraint,
5252
])
5353
}
5454

Parchment/Classes/PageViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public final class PageViewController: UIViewController {
3131

3232
/// The underlying scroll view where the page view controllers are
3333
/// added. Changing the properties on this scroll view might cause
34-
/// undefined behaviour.
34+
/// undefined behavior.
3535
public private(set) lazy var scrollView: UIScrollView = {
3636
let scrollView = UIScrollView()
3737
scrollView.isPagingEnabled = true

Parchment/Classes/PagingMenuView.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ open class PagingMenuView: UIView {
3636
set { options.menuHorizontalAlignment = newValue }
3737
}
3838

39-
/// Determine the transition behaviour of menu items while scrolling
39+
/// Determine the transition behavior of menu items while scrolling
4040
/// the content. _Default: .scrollAlongside_
4141
public var menuTransition: PagingMenuTransition {
4242
get { return options.menuTransition }
@@ -61,7 +61,7 @@ open class PagingMenuView: UIView {
6161
}
6262

6363
/// Determine how the selected menu item should be aligned when it
64-
/// is selected. Effectivly the same as the
64+
/// is selected. Effectively the same as the
6565
/// `UICollectionViewScrollPosition`. _Default: .preferCentered_
6666
public var selectedScrollPosition: PagingSelectedScrollPosition {
6767
get { return options.selectedScrollPosition }
@@ -270,14 +270,14 @@ open class PagingMenuView: UIView {
270270
}
271271

272272
/// Selects a given paging item. This need to be called after you
273-
/// initilize the `PagingViewController` to set the initial
273+
/// initialize the `PagingViewController` to set the initial
274274
/// `PagingItem`. This can be called both before and after the view
275275
/// has been loaded. You can also use this to programmatically
276276
/// navigate to another `PagingItem`.
277277
///
278278
/// - Parameter pagingItem: The `PagingItem` to be displayed.
279279
/// - Parameter animated: A boolean value that indicates whether
280-
/// the transtion should be animated. Default is false.
280+
/// the transition should be animated. Default is false.
281281
open func select(pagingItem: PagingItem, animated: Bool = false) {
282282
pagingController.select(pagingItem: pagingItem, animated: animated)
283283
}

Parchment/Classes/PagingOptions.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public struct PagingOptions {
2323
/// _Default: .top_
2424
public var menuPosition: PagingMenuPosition
2525

26-
/// Determine the transition behaviour of menu items while scrolling
26+
/// Determine the transition behavior of menu items while scrolling
2727
/// the content. _Default: .scrollAlongside_
2828
public var menuTransition: PagingMenuTransition
2929

@@ -43,7 +43,7 @@ public struct PagingOptions {
4343
public var menuLayoutClass: PagingCollectionViewLayout.Type
4444

4545
/// Determine how the selected menu item should be aligned when it
46-
/// is selected. Effectivly the same as the
46+
/// is selected. Effectively the same as the
4747
/// `UICollectionViewScrollPosition`. _Default: .preferCentered_
4848
public var selectedScrollPosition: PagingSelectedScrollPosition
4949

Parchment/Classes/PagingView.swift

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ open class PagingView: UIView {
4141
}
4242

4343
// MARK: Public Methods
44-
4544
/// Configures the view hierarchy, sets up the layout constraints
4645
/// and does any other customization based on the `PagingOptions`.
4746
/// Override this if you need any custom behavior.

Parchment/Classes/PagingViewController.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ open class PagingViewController:
5858
set { options.menuPosition = newValue }
5959
}
6060

61-
/// Determine the transition behaviour of menu items while scrolling
61+
/// Determine the transition behavior of menu items while scrolling
6262
/// the content. _Default: .scrollAlongside_
6363
public var menuTransition: PagingMenuTransition {
6464
get { return options.menuTransition }
@@ -83,7 +83,7 @@ open class PagingViewController:
8383
}
8484

8585
/// Determine how the selected menu item should be aligned when it
86-
/// is selected. Effectivly the same as the
86+
/// is selected. Effectively the same as the
8787
/// `UICollectionViewScrollPosition`. _Default: .preferCentered_
8888
public var selectedScrollPosition: PagingSelectedScrollPosition {
8989
get { return options.selectedScrollPosition }
@@ -438,14 +438,14 @@ open class PagingViewController:
438438
}
439439

440440
/// Selects a given paging item. This need to be called after you
441-
/// initilize the `PagingViewController` to set the initial
441+
/// initialize the `PagingViewController` to set the initial
442442
/// `PagingItem`. This can be called both before and after the view
443443
/// has been loaded. You can also use this to programmatically
444444
/// navigate to another `PagingItem`.
445445
///
446446
/// - Parameter pagingItem: The `PagingItem` to be displayed.
447447
/// - Parameter animated: A boolean value that indicates whether
448-
/// the transtion should be animated. Default is false.
448+
/// the transition should be animated. Default is false.
449449
open func select(pagingItem: PagingItem, animated: Bool = false) {
450450
pagingController.select(pagingItem: pagingItem, animated: animated)
451451
}

Parchment/Enums/PagingSelectedScrollPosition.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public enum PagingSelectedScrollPosition {
77

88
/// Centers the selected menu item where possible. If the item is
99
/// to the far left or right, it will not update the scroll
10-
/// position. Effectivly the same as .centeredHorizontally on
10+
/// position. Effectively the same as .centeredHorizontally on
1111
/// UICollectionViewScrollPosition.
1212
case preferCentered
1313
}

Parchment/Extensions/UIView+constraints.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ extension UIView {
44
func constrainToEdges(_ subview: UIView) {
55
subview.translatesAutoresizingMaskIntoConstraints = false
66

7-
let topContraint = NSLayoutConstraint(
7+
let topConstraint = NSLayoutConstraint(
88
item: subview,
99
attribute: .top,
1010
relatedBy: .equal,
@@ -24,7 +24,7 @@ extension UIView {
2424
constant: 0
2525
)
2626

27-
let leadingContraint = NSLayoutConstraint(
27+
let leadingConstraint = NSLayoutConstraint(
2828
item: subview,
2929
attribute: .leading,
3030
relatedBy: .equal,
@@ -34,7 +34,7 @@ extension UIView {
3434
constant: 0
3535
)
3636

37-
let trailingContraint = NSLayoutConstraint(
37+
let trailingConstraint = NSLayoutConstraint(
3838
item: subview,
3939
attribute: .trailing,
4040
relatedBy: .equal,
@@ -45,10 +45,10 @@ extension UIView {
4545
)
4646

4747
addConstraints([
48-
topContraint,
48+
topConstraint,
4949
bottomConstraint,
50-
leadingContraint,
51-
trailingContraint,
50+
leadingConstraint,
51+
trailingConstraint,
5252
])
5353
}
5454
}

Parchment/Protocols/PagingViewControllerDataSource.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public protocol PagingViewControllerDataSource: AnyObject {
1717
@MainActor
1818
func numberOfViewControllers(in pagingViewController: PagingViewController) -> Int
1919

20-
/// Return the view controller accociated with a given index. This
20+
/// Return the view controller associated with a given index. This
2121
/// method is only called for the currently selected `PagingItem`,
2222
/// and its two possible siblings.
2323
///

Parchment/Protocols/PagingViewControllerInfiniteDataSource.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import UIKit
88
/// the initial `PagingItem` by calling `select(pagingItem:)` on
99
/// `PagingViewController`.
1010
public protocol PagingViewControllerInfiniteDataSource: AnyObject {
11-
/// Return the view controller accociated with a `PagingItem`. This
11+
/// Return the view controller associated with a `PagingItem`. This
1212
/// method is only called for the currently selected `PagingItem`,
1313
/// and its two possible siblings.
1414
///

Parchment/Structs/PageView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ extension PageView {
339339
return view
340340
}
341341

342-
/// Determine the transition behaviour of menu items while
342+
/// Determine the transition behavior of menu items while
343343
/// scrolling the content.
344344
public func menuTransition(_ transition: PagingMenuTransition) -> Self {
345345
var view = self

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ Read more: [Using the infinite data source](/Documentation/infinite-data-source.
240240

241241
### Selecting items
242242

243-
You can select items programatically using:
243+
You can select items programmatically using:
244244

245245
```Swift
246246
func select(pagingItem: PagingItem, animated: Bool = false)

0 commit comments

Comments
 (0)