Feeds

Spice up your Apple applications

Splash of Aqua

  • alert
  • submit to reddit

Choosing a cloud hosting partner with confidence

Take control

Most of the ProKit controls are designed to work just like their "regular" counterparts, but with enhanced functionality and/or appearance. To try this out, just drop (for example) an NSButton onto your application window from inside Interface Builder.

You can hook it up to an outlet or an action in the usual way, but if you change its class to NSProButton, you will get the "Pro" look.

It's worth noting that Interface Builder is very laid-back about class names. It will happily allow you to specify any class name you like but - obviously - the class must be present at runtime in order for the application to run. This has the advantage that you can easily incorporate the ProKit controls into a project without having to use class-dump to create a corresponding header file for each control class you're interested in.

exploit the ProKit.framework

Take control of Apple's ProKit framework

For your amusement, I've added an assortment of ProKit controls to the demo program including NSProColorWell that brings up a pro-version of the standard color picker. Personally, I think the standard color picker looks far better.

Snap to it

One nice feature of the NSProWindow class is the built-in support for window snapping: that is, making a window "magnetically" snap to the screen edge when it's within a few pixels of that edge. In order to demonstrate this feature, I've added a checkbox to the demo program, which turns snapping on or off. The code is as simple as this:


- (IBAction) setSnap: (NSButton *) sender
{
        [self setSnapsToEdges: [sender state]];
}

This will work just fine even if you've got a multi-monitor setup. Behind the scenes, the code is smart enough to detect movement of the window towards any edge of any monitor.

The pixel distance you are snapping across is called the "snap gravity". By default, this has a value of 5.0. You can alter it to any value you like with the setSnapGravity: method. For me, a value of between 10.0 and 20.0 feels better than the default value. If you use a very high value, you'll effectively force the window to hug the screen edge.

As always, you can download the demo application and source code from here

Intelligent flash storage arrays

More from The Register

next story
Netscape Navigator - the browser that started it all - turns 20
It was 20 years ago today, Marc Andreeesen taught the band to play
Sway: Microsoft's new Office app doesn't have an Undo function
Content aggregation, meet the workplace ... oh
Sign off my IT project or I’ll PHONE your MUM
Honestly, it’s a piece of piss
Return of the Jedi – Apache reclaims web server crown
.london, .hamburg and .公司 - that's .com in Chinese - storm the web server charts
NetWare sales revive in China thanks to that man Snowden
If it ain't Microsoft, it's in fashion behind the Great Firewall
Chrome 38's new HTML tag support makes fatties FIT and SKINNIER
First browser to protect networks' bandwith using official spec
Admins! Never mind POODLE, there're NEW OpenSSL bugs to splat
Four new patches for open-source crypto libraries
prev story

Whitepapers

Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Cloud and hybrid-cloud data protection for VMware
Learn how quick and easy it is to configure backups and perform restores for VMware environments.
Three 1TB solid state scorchers up for grabs
Big SSDs can be expensive but think big and think free because you could be the lucky winner of one of three 1TB Samsung SSD 840 EVO drives that we’re giving away worth over £300 apiece.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.