Feeds

Spice up your Apple applications

Splash of Aqua

  • alert
  • submit to reddit

Beginner's guide to SSL certificates

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

Top 5 reasons to deploy VMware with Tegile

More from The Register

next story
Nexus 7 fandroids tell of salty taste after sucking on Google's Lollipop
Web giant looking into why version 5.0 of Android is crippling older slabs
Be real, Apple: In-app goodie grab games AREN'T FREE – EU
Cupertino stands down after Euro legal threats
Download alert: Nearly ALL top 100 Android, iOS paid apps hacked
Attack of the Clones? Yeah, but much, much scarier – report
Microsoft: Your Linux Docker containers are now OURS to command
New tool lets admins wrangle Linux apps from Windows
Bada-Bing! Mozilla flips Firefox to YAHOO! for search
Microsoft system will be the default for browser in US until 2020
Facebook, working on Facebook at Work, works on Facebook. At Work
You don't want your cat or drunk pics at the office
prev story

Whitepapers

Why cloud backup?
Combining the latest advancements in disk-based backup with secure, integrated, cloud technologies offer organizations fast and assured recovery of their critical enterprise data.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
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?
Managing SSL certificates with ease
The lack of operational efficiencies and compliance pitfalls associated with poor SSL certificate management, and how the right SSL certificate management tool can help.
Saudi Petroleum chooses Tegile storage solution
A storage solution that addresses company growth and performance for business-critical applications of caseware archive and search along with other key operational systems.