Skip to content
Open
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
22 changes: 22 additions & 0 deletions Sources/SnapshotTesting/Common/View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,23 @@
return .init(safeArea: safeArea, size: size, traits: .iPhone13ProMax(orientation))
}

public static let iPhone16ProMax = ViewImageConfig.iPhone16ProMax(.portrait)

public static func iPhone16ProMax(_ orientation: Orientation) -> ViewImageConfig {
let safeArea: UIEdgeInsets
let size: CGSize
switch orientation {
case .landscape:
safeArea = .init(top: 0, left: 62, bottom: 21, right: 62)
size = .init(width: 956, height: 440)
case .portrait:
safeArea = .init(top: 62, left: 0, bottom: 34, right: 0)
size = .init(width: 440, height: 956)
}

return .init(safeArea: safeArea, size: size, traits: .iPhone16ProMax(orientation))
}

public static let iPadMini = ViewImageConfig.iPadMini(.landscape)

public static func iPadMini(_ orientation: Orientation) -> ViewImageConfig {
Expand Down Expand Up @@ -773,6 +790,11 @@
}
}

public static func iPhone16ProMax(_ orientation: ViewImageConfig.Orientation)
-> UITraitCollection {
return Self.iPhone13ProMax(orientation)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return Self.iPhone13ProMax(orientation)
return Self.iPhone16ProMax(orientation)

}

public static let iPadMini = iPad
public static let iPadMini_Compact_SplitView = iPadCompactSplitView
public static let iPad9_7 = iPad
Expand Down