Skip to content

Commit 51ba4c9

Browse files
committed
Rename transformMenu -> buildMenu
1 parent e5d3b37 commit 51ba4c9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Sources/SwiftCrossUI/Views/Menu.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// A button that shows a popover menu when clicked.
2-
///
2+
///
33
/// Due to technical limitations, the minimum supported OS's for menu buttons in UIKitBackend
44
/// are iOS 14 and tvOS 17.
55
public struct Menu {

Sources/UIKitBackend/UIKitBackend+Menu.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extension UIKitBackend {
1010
return Menu()
1111
}
1212

13-
static func transformMenu(
13+
static func buildMenu(
1414
content: ResolvedMenu,
1515
label: String,
1616
identifier: UIMenu.Identifier? = nil
@@ -24,7 +24,7 @@ extension UIKitBackend {
2424
UIAction(title: label, attributes: .disabled) { _ in }
2525
}
2626
case let .submenu(submenu):
27-
transformMenu(content: submenu.content, label: submenu.label)
27+
buildMenu(content: submenu.content, label: submenu.label)
2828
}
2929
}
3030

@@ -34,7 +34,7 @@ extension UIKitBackend {
3434
public func updatePopoverMenu(
3535
_ menu: Menu, content: ResolvedMenu, environment _: EnvironmentValues
3636
) {
37-
menu.uiMenu = UIKitBackend.transformMenu(content: content, label: "")
37+
menu.uiMenu = UIKitBackend.buildMenu(content: content, label: "")
3838
}
3939

4040
public func updateButton(

Sources/UIKitBackend/UIKitBackend.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ open class ApplicationDelegate: UIResponder, UIApplicationDelegate {
246246

247247
for submenu in menu {
248248
let menuIdentifier = mapMenuIdentifier(submenu.label)
249-
let menu = UIKitBackend.transformMenu(
249+
let menu = UIKitBackend.buildMenu(
250250
content: submenu.content, label: submenu.label, identifier: menuIdentifier)
251251

252252
if builder.menu(for: menuIdentifier) == nil {

0 commit comments

Comments
 (0)