Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nightwalker21

macrumors newbie
Original poster
Jul 27, 2011
18
0
USA
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:
 

Attachments

  • Screen Shot 2014-06-10 at 7.40.42 PM.png
    Screen Shot 2014-06-10 at 7.40.42 PM.png
    498.6 KB · Views: 145

mfram

Contributor
Jan 23, 2010
1,307
343
San Diego, CA USA
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.
 

nightwalker21

macrumors newbie
Original poster
Jul 27, 2011
18
0
USA
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.
 

mfram

Contributor
Jan 23, 2010
1,307
343
San Diego, CA USA
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.
 

nightwalker21

macrumors newbie
Original poster
Jul 27, 2011
18
0
USA
Do you have the items that you want in your menu bar yet?

Yes I do

----------

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.

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?
 

mfram

Contributor
Jan 23, 2010
1,307
343
San Diego, CA USA
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?

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.
 

nightwalker21

macrumors newbie
Original poster
Jul 27, 2011
18
0
USA
In the screenshot below is what I want to edit. Some of the fields for the menu will be linked to a url.
 

Attachments

  • Screen Shot 2014-06-12 at 8.04.56 PM.png
    Screen Shot 2014-06-12 at 8.04.56 PM.png
    177.4 KB · Views: 112
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.