TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Menu buttons view difference on iOS and Mac (designed for iPad)

Forums > SwiftUI

@MaxAL  

Dear Community,

Need your help. Building iOS App, trying to solve Menu view differences. By default iOS App is compatable with Mac, if app designed for iPad.

One issue I've encountered is that icons on menu buttons are automatically removed on Mac, resulting in inconsistency between the two platforms.

Menu on iPhone and iPad

Menu on Mac

Is there a way to retain icons on menu buttons on Mac within an iOS app? I would greatly appreciate any advice or solutions you can offer.

Thank you for your help.

Example code:

Menu {
            Button {
                //action here
            } label: {
                Label("first button", systemImage: "lock")
            }
            Button {
                //action here
            } label: {
                Text("second button")
                Spacer()
                Image(systemName: "eraser.fill")
            }
       } label: {
            Label("PDF", systemImage: "doc.fill")
       }

Any suggestion?

   

Hacking with Swift is sponsored by String Catalog.

SPONSORED Get accurate app localizations in minutes using AI. Choose your languages & receive translations for 40+ markets!

Localize My App

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.