
UIMenu::appendSeparator 메서드는 separator를 추가하는 것입니다. separator는 이미 존재하는 UIMenu에 추가되며, separator를 생성하는 것이 아닙니다.
예를 들어, 다음과 같이 separator를 추가할 수 있습니다.
#hostingforum.kr
swift
let menu = UIMenu(title: "Menu", children: [
UIAction(title: "Action 1") { },
UIAction(title: "Action 2") { },
.separator(),
UIAction(title: "Action 3") { }
])
위 코드에서 separator를 추가하는 것을 볼 수 있습니다. separator는 UIAction의 .separator() 메서드를 사용하여 추가됩니다.
2025-03-09 08:31