ARCoachingOverlayView and SwiftUI

These last few weeks I’ve been diving into Apple’s RealityKit for iPhone. I’ve chosen to use SwiftUI instead of UIKit as I like the similarities between it and ReactJS. I thought I’d start posting a few things I learn as I find Apple’s documentation is great if you already know what you’re doing. Unfortunately, if…

Subview Rotation on iOS 8 with Swift while keeping static main view

That title is a mouthful.  Basically, I just want to know how to imitate the native iPhone camera app.  The camera button stays locked where the home screen is but the icons rotate with the device as well as the capture area.  Should be pretty simple right? tl;dr:  See the code here on github that…

iOS: ManagedObject doesn’t trigger NSFetchResultsController Reload

One of the problems I have been working on is to update a UITableViewCell with updates after the parent view controller reappears.  In this case the user clicks on a ‘comments’ button which segues to a new view controller where the user enters comments for the post.  Once the user enters these comments, they click…

iOS: bounds vs. frames

I got totally hosed this week trying to add a subview to a UITableViewCell.  The cool thing is that I learned a lot. I created a custom UITableViewCell that called FeedCommentTableViewCell class.  Below is the working code:

A few lessons learned: 1.  initWithStyle is called only when the cell is created and thus will…

iOS icon size generator

One of the things you run into while developing iOS applications is that you need several different icon sizes for the various devices.  For an iOS 8 iPhone application, you need at least 4 different sizes: 58pt, 80pt, 120pt, and 180pt.  Not to mention the main icon size for the app store.  If you develop…

SSH tunnel for Adium Accounts

Sometimes you’ll be at a place where your IRC client can’t connect to something like irc.freenode.net.  This is where ‘behind corporate firewalls’ turns into ‘behind enemy lines’.  IRC is invaluable because there are people who can help you with your problems… but they are on the outside. Here is how I solve that for a…

Ansible: From OSX to AWS

My goal in this post is to go from 0 to Ansible installed on my Mac and then be able to provision AWS instances ready to run Docker containers.  The code for this post is public on my github account. OSX Setup I am running OS X Yosemite.  I use brew to make things easy….

Mac Environment for OS X Yosemite

I updated to OS X Yosemite and as usual a lot of development things stopped working.  I figured it was time to get serious about Python as well, so here’s how I’m setting things up. brew I use brew to put packages on Mac OSX.  I like it.  Its easy.  Unfortunately, with the update brew…

DIY SSD for MacBook Pro migration

I just finished installing an SSD for my MacBook Pro.  The results have been pretty great so far.  Subtle, but when I really start working again I’m hoping to see a huge difference. I’ve really noticed a performance hit lately especially with Spotlight and opening lots of apps so I’m hoping this solves it. The…

iOS NSStreamDelegates, Grand Central Dispatch, & NSNotificationCenter

One of the more difficult design patterns I’ve managed to get working in Objective-C while developing an iOS app is one that requires NSStreamDelegates, Grand Central Dispatch (GCD) and NSNotificationCenter.  This design pattern comes into play in the following situation: Application launches Application does some communication with a server in the background When the server…