How to implement a UITabBar view in Mac OS X applications? - cocoa

In my Mac application I'd like to implement a view that simulates UITabBar from iOS.
What's the preferred way to implement this? Use NSOutlineView , NSTableView, or something else?

For a native Mac app, the equivalent of a UITabBar is an NSTabView. If you want to go for the iOS look, you either have to roll your own with some NSView subclass or take a look at UMEKit.
Chameleon may also be an option, but it currently doesn't implement UITabBar, this might change in the future.

If you want to follow a trend of making your Mac app with the UIKit look-and-feel
you might want to take a look at the Chameleon Project - note the status of the project on the developer's blog. However, the project source is on github now, and people are helping out.

Related

Develop an iPhoto-like cocoa app for mac OSX

I plan to develop a mac OSX app that has a UI similar to that of iPhoto - a panel on the left and a grid view of images on the right. I am thinking of using NSSplitView to create two panels and using NSCollectionView for the grid.
I guess this must be a pretty popular and common UI pattern for mac apps. I am new to cocoa development. Can anyone with previous experience point me to any related cocoa code samples and design document?
Thanks a lot in advance.
N.B.
This missing piece here is an NSOutlineView in source list mode, put that in your left pane. But otherwise seems like a good place to start.
You might also be interested to see what the developer of Sonora approached this problem; although this is a music app the layout is almost the same.

PropertyGrid like control in Mac OS

is there any control in Mac OS like Microsoft PropertyGrid or I need to create it by hand from other simple controls?
No, there's nothing like this in AppKit.
When someone asked this question before, one of the responses mentions a framework called InspectorKit. The original link is broken, but here's a fork: https://github.com/thmghtd/InspectorKit.framework
Or you could create something yourself using components like NSForm and NSTableView.
UIKit for Cocoa Touch does implement something like this in the Settings app.

Safari Web Inspector-esque functionality in Xcode?

Just starting out in Objective-C, so I'm curious as to how some apps that I enjoy function interface-wise. I've cloned a few apps from Github into Xcode, and I'm looking for something similar to Safari's Web Inspector where I can highlight portions of the application and see what piece of code they refer to?
I think it may have something to do with Interface Builder, but I'm not sure where to begin... help?
Thanks!
This doesn't exist AFAIK. Interface Builder doesn't show a representation of your code, it allows to you to lay out (serialized) interface elements to your app graphically.

How can I create an iOS-style toolbar in my Mac Cocoa application?

Several iLife '11 applications on the Mac use iOS-style black toolbars. For instance, the toolbar at the bottom of this screenshot of iPhoto:
(source: pocket-lint.com)
This sort of look is available in the iOS SDK as "UITabBar."
I am wondering if there is an easy way to achieve this in my ordinary, non-iOS Mac application. If not, what would be the best way to go about creating this effect?
There's nothing that will give you this view out of the box. You'll need to build it yourself.
The simplest method would be to create a custom view with a gradient background and place monochrome buttons in it.
Better would be to create a set of classes similar to NSToolBar that handle positioning, highlighting etc. Even better, build it and then open-source it :-)
However, you'll have to build it yourself. Apart from NSButton there's not much that will help in the pre-existing objects.

How to create a cocoa app windows like tweetie

I'm new to cocoa app dev, and I'm searching a solution to create a windows like the tweetie main windows with a left tool bar and a panel that point to the selected icon.
like this screenshot : http://i.stack.imgur.com/qvxWu.jpg
could anyone help me?
It's likely that a lot of the Tweetie UI is implemented using custom controls. You'll want to look into subclassing NSView and how to handle drawing and mouse events. There's nothing built into the Cocoa framework for this.
The NSView documentation has info on view programming, drawing, and event handling. If you're new to Cocoa, you may want to start off with something built in, though, as this will be a lot of work (and requires a pretty good understanding of how the framework works).

Resources