Mac Application MenuBar

Discussion in 'Mac Programming' started by nightwalker21, Jun 10, 2014.

  1. nightwalker21 macrumors newbie

    nightwalker21

    Joined:
    Jul 27, 2011
    Location:
    USA
    #1
    Already I created a Mac app for my site but I can't find any guide on Google on how to edit the Menu Bar items. All I get is how to make a statusbar application.
    I'd like to add things like Login/LogOut, Share, Sections for users to jump to a different category on the site. I'd also like to add Purchase Pro and try to figure out how to let users upload and download from the app itself. Also I'd like to add a refresh the page option.

    The app works I just can't figure these parts out.

    :confused:
     

    Attached Files:

  2. JohnsonK macrumors regular

    Joined:
    Mar 6, 2014
  3. nightwalker21 thread starter macrumors newbie

    nightwalker21

    Joined:
    Jul 27, 2011
    Location:
    USA
  4. mfram macrumors 65816

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #4
    What tools are you using to create the app? If you're creating an OS X app in Xcode, then you modify the MainMenu.xib file. There you can modify the menubar all you want and connect the Actions to the appropriate Controller object.
     
  5. nightwalker21 thread starter macrumors newbie

    nightwalker21

    Joined:
    Jul 27, 2011
    Location:
    USA
    #5
    Yes I'm using Xcode, I tried making a Object-C Class and connecting a item in the menu like Login to it but it won't connect. I know with iOS UIWebview you can Control+Click and drag to the correct spot in the AppDelegate.h I tried that with this and got nothing.
     
  6. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #6
    Do you have the items that you want in your menu bar yet?
     
  7. mfram macrumors 65816

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #7
    It won't work unless you instantiate your class in IB by dragging an object thing from the selector on the side. Then change the class of the dragged object to whatever class you created.
     
  8. nightwalker21 thread starter macrumors newbie

    nightwalker21

    Joined:
    Jul 27, 2011
    Location:
    USA
    #8
    Yes I do

    ----------

    So where it says Custom Class I change it to the Object-C Class I created for the item? When I change that and that item is clicked in the app does it call out to the class it's assigned to?
     
  9. mfram macrumors 65816

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #9
    Working with IB is visual, of course. So I'm not sure if you understand or not. You have to connect an IBAction to your class like you said you are used to doing. But you can't do that until you instaniate your custom class in IB.

    Look for a Mac App tutorial if you can't figure it out.
     
  10. nightwalker21 thread starter macrumors newbie

    nightwalker21

    Joined:
    Jul 27, 2011
    Location:
    USA
    #10
    In the screenshot below is what I want to edit. Some of the fields for the menu will be linked to a url.
     

    Attached Files:

Share This Page