Custom NSTabView with lefttab - cocoa

I want to make a NSTabView like CleanMyMac or other application.

Never tried to customize NSOutlineView or NSTableView that heavily but I doubt it would get close enough to the custom (read: non-standard) behaviour you're looking for..
You can check for third party, Open Source controls that implement something similar. There are a couple of controls listed on Cocoa Controls that come pretty close.

Cocoa Controls is good idea.
Maybe this is a nice starting point:
https://github.com/monyschuk/LITabControl

Related

Disable All Interaction with a Cocoa WebView

I'm having difficulty in using a WebView that is being used purely to display a preview of a website - and I want to ignore all/any interactions the user may try to make with it.
I've already tried Cocoa webView - Disable all interaction to no avail; you can still easily spam-click and it will recognise the presses. (at least there's no context menu)
This one seems overkill; Disable a WebKit WebView - there must be an easier way.
In iOS I know exactly how to solve this, but as a Cocoa newcomer I am stumped - does anyone have any suggestions or better ways to achieve this? Or dump a transparent NSView on top and gobble up interactions? (tried this as well by subclassing an NSView, also to no effect)
Whole project is in IB currently, if this makes any difference.
I think you want to implement a WebPolicy Delegate and have it deny navigation events.

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).

Switch Between Views in Cocoa (not Cocoa Touch)

It seems like there is a lot of online information regarding switching between views in Cocoa Touch, but not that many in "desktop" Cocoa. For an app I am creating, I am wondering the pros/cons of the methods (and please list the methods if you could), and which one people personally use/suggest. I don't think that using an invisible border NSTabView will do the trick for this specific app, but I value all your options. I will be changing the view with some buttons at the side as show in iPhoto, iTunes, and generally most Mac apps out there.
Thanks for any help.
EDIT: I have looked into using NSViewController, but am wondering what advice anyone has about how to use this/why not to use this.
Cathy Shive has created a framework called KTUIKit which was designed with single window applications modeled after iPhoto/iTunes/etc. The KTTabViewController class in particular may be of interest, as it provides a way of switching between an arbitrary number of subviews. They provide a formal way of dealing with nesting views, keeping the responder chain intact, and keeping various notifications properly observed/unobserved. There are also a series of blog posts describing some of the reasoning behind the design and how the classes work (the blog posts refer to them with an "XS" prefix instead of "KT", but they're basically the same thing).
Check out Brandon Walkin's excellent BWToolkit
NSViewController will work fine. I've used it for a very similar situation without any problems.

Which GUI element does iCal use for calendar view?

I’m writing a simple iCal-like app in Cocoa that I’d like to resemble the main view of iCal.
Does anyone know which GUI element (i.e. NSWhatever) was used to create the Month-view (this thing: http://skitch.com/edwardog/b38ba/ical)?
Thanks!
PS – A hint at figuring this sort of thing out for myself would also be well appreciated; I’ve got a feeling that the answer lies somewhere in .nib, but after poking around I didn’t have much luck.
CalendarWindow.nib, "Window".
Looks like it's all custom views I'm afraid.
The main calendar view must be a custom subclass of NSView, with custom drawing in the overridden drawRect: method.
If you really feel like poking around in running applications, check out F-Script Anywhere.
I'm not claiming that iCal uses it, but you might try NSDatePicker, which supports a calendar style.

Resources