Subscribe

  • Disable layer backing to work with NSVisualEffectViews in IB

    Found yourself unable to move around (or even freakin’ select) elements on a layer backed NSVisualEffectView?

    Just toggle the Core Animation Layer checkbox in Interface Builder and voilà, all fixed. Oh and everything turns red obviously, because NSVisualEffectViews need layer backing.. 👍

    Interface Builder showing a red NSVisualEffectView

  • You can bulk-edit which app opens a file on OS X

    Just fire up the Terminal and issue the following command:

    $ open ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist
    

    You might need to reboot your Mac afterwards.

    I needed this after deciding I no longer needed Keka to open every compressed file format known to man and got tired of seeing its file type icon on every .zip on my Mac.

    The launchservices plist shown in Xcode

  • Tinted NSVisualEffectView

    I’m trying to change the tint of the NSVisualEffectView. This is what I’ve come up with. You can clone the project over at GitHub. Send me a pull request if you know a better way.

    Tintend visual effect view

    Tinting

    1. Add a new NSVisualEffectView to your main window.
    2. Enable layer backing.
    3. Loop through the layers and change the backgroundColor of the layer called ‘ClearCopyLayer’.

    No science behind this method.

    import Cocoa
    
    @NSApplicationMain
    class AppDelegate: NSObject, NSApplicationDelegate {
    
      @IBOutlet weak var window: NSWindow!
      @IBOutlet weak var vibrancyView: NSVisualEffectView!
    
      var tintColor: NSColor?
    
      func applicationDidFinishLaunching(aNotification: NSNotification) {
        // Insert code here to initialize your application
    
        self.vibrancyView.material = .Dark
      }
    
      func applicationWillTerminate(aNotification: NSNotification) {
        // Insert code here to tear down your application
      }
    
      func applyTint() {
    
        if let color = self.tintColor {
          print("Applying tint: \(self.tintColor)")
          // Tint the visual effect view
          for sublayer: CALayer in self.vibrancyView.layer!.sublayers! {
            if sublayer.name == "ClearCopyLayer" {
              sublayer.backgroundColor = color.CGColor
              break
            }
          }
        }
      }
    
      @IBAction func tintDark(sender: NSButton) {
        self.vibrancyView.material = .Dark
        applyTint()
      }
      @IBAction func tintLight(sender: NSButton) {
        self.vibrancyView.material = .Light
        applyTint()
      }
    
      @IBAction func tintRed(sender: NSButton) {
        self.tintColor = NSColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 0.1)
        applyTint()
      }
      @IBAction func tintBlue(sender: NSButton) {
        self.tintColor = NSColor(red: 0.0, green: 0.0, blue: 1.0, alpha: 0.1)
        applyTint()
      }
    
    }
    

    Known Issues

    Changing the materialfrom light to dark or vice versa removes the custom backgroundColor. Even if it’s applied after changing the material.

  • Jekyll

    Briefly considered using Realmac’s Typed blogging platform, before ditching the idea and just switching back to a plain Jekyll site.

    It’s so clean. So good

  • Recommended Podcasts (2)

    It’s been a little over a year since the last time I posted a list of podcasts that I tune to.

    This is an update. Some shows have stayed, some have gone and there are numerous new ones.

    Most of my subscriptions remain Apple oriented, but in comparison to last year, I listen to a few extra video game oriented shows.

    New Shows

    Apple & Tech

    Release Notes

    Release Notes is a weekly podcast about the business of Mac and iOS indie software development. We discuss inspiration, design, trends, and tools — everything but the code.

    I love listening to Charles Perry and Joe Cieplinski talking about much of the things I go through as well, as a software indie. Probably my favorite show at the moment.

    Build Phase

    Build Phase is a weekly technical podcast discussing iOS development and design. Hosted by iOS developers Mark Adams and Gordon Fontenot; they discuss code, design, and creating great iOS apps.

    A bit more technically in-depth than most shows, which I like a lot. My only critique is that they focus primarily on iOS, while I spend most of my time on OS X apps.

    Accidental Tech

    Three nerds discussing tech and loosely related matters. An offshoot from Neutral, our car show.

    General Apple and tech stuff, hosted by Marco Arment, Casey Liss and John Siracusa.

    Games

    All Gen Gamers

    We take pride in ourselves as video game enthusiasts and collectors of the hobby.

    Very enjoyable show about being a gamer, hosted by Pete Dorr, Gamester81, Jason Heine and MetalJesusRocks. I love the conversations about retro games and consoles.

    Video Game Hangover

    Video Game Hangover is podcast by three guys who love–and occasionally overindulge in–gaming.

    Randy Dickinson, D.J. Ross and Paul Sandhu discuss the games they play and games that come out.

    Player One Podcast

    Join ex-game journalists Chris Johnston, Phil Theobald, Greg Sewart and their buddy Mike Phillips as they talk about console/portable/PC games, babies, and the meaning of life.

    Old Favorites

    Core Intuition

    A podcast about indie software development for the Mac, iOS and other Apple technologies

    Daniel Jalkut and Manton Reece have both been working in the Apple ecosystem for years and use the experience to comment on new developments and being an indie.

    Developing Perspective

    A podcast discussing news of note in iOS Development, Apple and the like.

    David Smith) talks about his experiences as a independent iOS and Mac developer. I like how it covers the things he comes across in his daily activities. It’s always around 15 minutes, making it super convenient to listen to when you have a moment to spare. David actually did a show about his favorite podcasts a little while ago. Definitely worth listening to. Links to the shows are in the show notes.

    Skipping Episodes

    I try to stay up to date with the podcasts above, generally skipping more episodes on the game related shows.

    I tend to skip Apple and tech episodes if they solely cover recent news. Unless I’m very curious about someone’s point of view, written news has usually informed me well enough before the podcast comes out.

    Remarkable Episodes

    Steve Gaynor hosts a pretty cool show called Tone Control in which he “sits down with noteworthy video game developers for an in-depth conversation about their career and creative process”.

    I’m a subscriber, but ended up especially enjoying the episode with Tim Shafer. Highly recommended if you’re into Tim’s work.

    Listening Environment

    Apart from listening while working, I’ve also made a habit of tuning into a show during chores, like doing the dishes. It allows me to pay much more attention and generally makes me enjoy the episodes even more.