Feeds

Spice up your Apple applications

Splash of Aqua

  • alert
  • submit to reddit

Security and trust: The backbone of doing business over the internet

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

Providing a secure and efficient Helpdesk

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
'People have forgotten just how late the first iPhone arrived ...'
Plus: 'Google's IDEALISM is an injudicious justification for inappropriate biz practices'
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
prev story

Whitepapers

Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
The next step in data security
With recent increased privacy concerns and computers becoming more powerful, the chance of hackers being able to crack smaller-sized RSA keys increases.