Swift Shadow Examples

Why hello

I recently came across an interesting article online where the original developer offered a Github repository of examples of various shadows.

I cannot now remember the website that I visited, but I remember the code offered and one needed to uncomment/comment methods in the source and build each time to see differing effects of each one. While that did indeed work, it didn’t allow for someone to easily browse the effects, the developer included.

I saw the good utility in what was ultimately being offered, but the presentation was something I found lacking and something that needed some attention. If I find the original stuff, I’ll offer up my changes to the original developer’s codebase. I’m feeling a little too lazy at the moment. You might understand that.

I have created a new Github repository of my own which includes all of my adjustments and also a line of Swift 2.2 code. Which is a new selector implementation, all shiny and new! This selector will indeed survive the ravages of a Swift 3.0 migration. The older string-based selectors will break.


A quick note about the new selectors (which I love for obvious reasons)… a project I am working on, when opened, gives 282 warnings. Most of them in regards to selectors or __function__ calls. So… when the rest of the team upgrades their Xcode and Swift, I can safely fix all those warnings. Secretly I am hoping when Apple offers up Swift 3.0, a little dialog will come up and magically fix all those warnings correctly.

Oh. Before I forget, here is that new selector implementation.

pageControl.addtarget(self, action: #selector(changePage(_:)), forControlEvents: .ValueChanged)

If you are fascinated by the very idea of integrating drop shadows into your work and you’d like a headstart, you might find respite in the repository that I offer which is available here. Enjoy if you can, play if you must.


Near Lock is really nice.

nearlockThe idea of having a BLE-enabled proximity lock & unlock for a work computer is a really good one. I generally have quite confidential information displaying on my monitors at any given time throughout the day. If I run to a meeting, the cafeteria, or down the hall to refill a water tumbler, my screens lay exposed for wandering eyes both internal employee and the rare external visiting guest.

Continue reading “Near Lock is really nice.”

Tagged :

iPhone 6 Plus in the house

After playing with an iPhone 6 Plus for a day at work and not liking it, I was set on not picking one up. I visited my local Apple Store a few times and tried to like the iP6+ and I wasn’t able to convince myself to get one. The day I finally went in to pull the trigger, I picked up an iP6+ 64GB variant.

What? Yup.

The iPhone 6 alone is slightly larger than my previous model iPhone 5. It has the Touch ID. It has Apple Pay capabilities. It didn’t have the better battery or better image stabilization. I use my phone mostly for data consumption, not actually making calls. Probably like a majority of people using smart phones of any type. So I decided to go big or go home. I went big.

Initial impressions. It’s taken about a day getting used to the larger form factor. It really hasn’t slowed me down at this point. The screen is glorious. Touch ID to bypass my PIN is a joy. The split-screen capabilities for apps that currently support it is wonderful. I wonder if I’ll use my iPad Mini as much now. The iP6+ is indeed a lot snappier than my previous model (so would the iP6), the photos are really superb.

I have a case coming. I am super happy with this new phone. My kids will love gaming on it from time to time too.

SwiftKey rocks

This post is from iOS using SwiftKey. Swype is awesome too for entering text on an iOS device. Overall I am extremely happy with iOS 8. My iPad mini has been trying to update for several hours though, stuck in a download queue. That’s not so cool. I am now using Swype. I like the themes I can apply to the keyboard. I might end up using it more. Happy days.

Update on the iPad mini. I had to download the restore bundle to update.

Apple’s Automatic Station Tuning Patent

It’s not here, but Apple was awarded a patent for it.

I’ve been personally waiting for something like this for a while. Apple knows enough about our behaviors at this point to be able to pull together some content it predicts we’d like. But this is the kicker… it will pull radio, music, television, movies, onboard media, etc. For a media player or mobile device… so iPhones to iPod Touches to Apple TVs to … ?

Continue reading “Apple’s Automatic Station Tuning Patent”

iBeacons development… speed

So now that iOS 7 is finally out – it took me a little while to get used to the aesthetics and I only have nits with default button hit-area designation (there is none) & the appearance of UIPickers (really?!) – I’ve been playing with CoreLocation / CoreBluetooth and the beacon functionality. It works pretty well 99% of the time.

However I find that the averaging of the beacon accuracy doesn’t match with the typical speed of someone walking with an iOS 7 device in their hand/pocket. The ranging trip events (immediate, near, far) or straight accuracy numbers have a lot of averaging built into them. The polling of signal(s) is easily quick enough, but walking up to my iPhone 5 takes a few seconds before correctly reporting the accuracy… accurately. Sometimes it can take a little longer than a few seconds.

This translates into a feeling of lag. The technology isn’t laggy… the averaging (however it’s accomplished) seems to be the bottleneck. No one wants flaky or intermittent reporting. But there is a fine balance here. You want UIs to be snappy and responsive.

If a user walks close to a beacon, you want that UI to fire right away. Otherwise you’re standing in front of one for a while before the UI can trigger. You may lose that user for that item as they have moved on – or you might pop a UI for something they are no longer standing in front of. A case of musical UIs gone astray.

Perhaps it’s a lot snappier on a 5S or even 5C (doubt it), but as it stands now it’s borderline production ready unless I am doing something wrong in my code.

Tagged : / / /

Every morning an Apple commercial

Lucky enough to attend WWDC13 this year, when iRadio was announced and released to developers, one of the cooler parts of the at conference iRadio offering was a station called “Music Heard at WWDC”.

Apple culled together a lot of music into a playlist that would play during intermissions between developer sessions. All that music was put together into a iRadio station. I think since the conference ended it was removed from a station to access. However I saved it to my stations right away – and I have access to it still.

Every morning in the shower is an Apple commercial – complete with soundtrack. Using a wireless Bose BT speaker and my iPad mini, I am filling the upstairs with sweet Apple camp. A pretty nice way to help set the day right.

Tagged :

Apple TV Sunday… all smiles

Knowing someone who manages engineers working on Apple TV is a pleasant bonus in the back of my mind. Sundays with Apple TV devices scattered around our home hooked up to our Wi-Fi and widescreen television panels produces such a pleasant experience.

The kids are reading proper books. Our new rule is to read the pressed pulp version of books, not to read them on devices. It allows for a break with technology and it’s experience, and allows them to enjoy a time-honored tradition of ink and paper. You can’t remember the texture, the slight smell of the pages and cover adhesive, the elegant binding, etc. in a digital format.

We have radio classical music wafting through the large pockets of air, reaching their ears, calming them and allowing them to concentrate a bit more. It really does work. The Bose systems involved further enhance the experience.

Sorry Dad for having made a bit of fun at your expense growing up. When you put your LPs on the stereo and play those rare recordings of classical genius, I’d laugh and proceed to listen to a cassette of Megadeth or something else. That type of music still rings through me – but classical has truly grown on me and now I can see where you were coming from.

Classical was meant as music for the people, not for the elite as it’s often portrayed. I am happy that my children embrace classical at times too. It’s helping with their reading as well, so I can only be happy. The Apple TV allows for this in our home… be it directly connecting to radio services, or connecting from our multitude of iOS and OS X devices. I don’t need to mention video media – because it shines there for other reasons as well.

Tagged : /

Xcode 4 Cookbook

Xcode 4 Cookbook at PACKT Publishing

Steven F. Daniel has a book out called Xcode 4 Cookbook. It’s available in paperback and e-formats.


  • Learn how to go about developing some simple, yet powerful applications with ease using recipes and example code
  • Teaches how to use the features of iOS 6 to integrate Facebook, Twitter, iCloud, and Airplay into your applications
  • Lots of step-by-step recipe examples with ample screenshots right through to application deployment to the Apple App Store to get you up to speed in no time, with helpful hints along the way

Steven was kind enough to grant me access to the book for me to review. In general if you are new to the exciting world of Cocoa Touch then you may enjoy this book. Despite the title, it’s a bit more about code snippets than it is getting around inside the Xcode IDE – although there is some of that.

If you’re new you may want to check it out the Table of Contents to see if it’s a good match for you. Read a chapter and see if it fits your style.

Available at PACKT Publishing.

Tagged : / /

Mophie customer service

I’m a little confused by Mophie and their customer service right now. My current Mophie case that I use with my iPhone 5 has really come into play as I have been using it to extend the battery life of the phone throughout the day. I am currently using something that isn’t battery optimized and I basically need to use the case. I normally don’t use one at all.

Anyway, the little charging on/off switch on the bottom back has become a bit loose recently. Which means sometimes I’ll heard the charging chirp in my pocket and I don’t want the phone to charge – I’d like it to get down to about 15% and then I’ll charge it up – draining the Mophie completely. Since the switch is loose, I sent an email to Mophie about the problem.

Since it’s under warranty, Mophie told me that they would replace it, they just needed a copy of the receipt or a photograph of the serial number. So I emailed them the serial number photo and waited a bit.

They replied with a shipping label PDF and some instructions. They want me to send the entire unit back to them where they can evaluate whether or not they will repair, replace, or simply return the unit back to me. This is the curious part.

I am glad they told me they would take steps to make me a happy customer, but I have to forgo the use of the hardware until they decide what to do. I was hoping they would send me the replacement bottom straight away and then I could return the unit with the touchy switch – allowing me continued use of the battery charger while waiting for the replacement.

I know the units aren’t cheap but it’s as if they don’t trust me. I find that bit curious. Since the problem isn’t awful at the moment (it does still work – I just need to keep a more careful watch of it), I’ll probably delay sending it to them. Hmm. Perhaps that’s part of the plan?

Tagged :

Some takeaways from WWDC 2013

I had a great time at WWDC this year, and I felt the content had a lot more meat on it this time around, especially some of the APIs for things that weren’t directly announced to the public. Lots to chew on for a while.

Here are some takeaways

  • For touting it’s green-leaning policies, San Francisco is one filthy, garbage-swirling city. Maybe it’s all the homeless, maybe it’s the amount of constant visitation by those who don’t live there, but it’s mighty dirty most of the time.
  • Good food can be had nearly everywhere – except served in Moscone West. 🙂 If you have time to run out somewhere for a quick lunch instead of picking up the usual free stuff, you’ll be better off. Even some dive joints will serve up better.
  • Odwalla galore – drink it up.
  • Right before the band at the Bash ends, go to the edge of the stage near the bathrooms. I have the past two years & met Scott Forstall and Phil Schiller. It’s easy – and I even made the WWDC photo feed this year 🙂
  • Stop taking notes during sessions. You won’t be able to keep up and you’ll have videos to watch again later. Some sessions were flinging API around and I was missing stuff just to try to keep up.
  • Get your sleep. Making it through some sessions, especially towards the end of the day can be brutal.
  • Get in line for the keynote before 4AM day of. We got there around that time and we were still probably 600th. Don’t buy a cheap chair from Walgreens like I did, a company will be out pouring coffee and handing out little fold-up chairs (with no back support). Mine was a little better, but free beats $9.99 – when you’re going to leave it next to a trash bin anyway.
  • Tad’s on Powell serves a really decent breakfast. Coffee is good too.
  • Hotel Abri is WAY better than Hotel Union Square. Way.

Good thing I checked

I hadn’t received my activation email yet, but I had an order ID number, so I figured everything was cool. I waited a few days and then without the email I started to worry a little bit.

I emailed WWDC support and inquired. They had no record of the ticket being paid for, check my bank statement or try again. WTF? How did I get the ID on the thank you page? Anyway, I purchased again.

This time I got an email with a receipt, etc. Now I know everything is going to be set. I’m not sure what happened but I’m relieved its been sorted out.

Everything is sorted out – I just activated my ticket tonight. Thank goodness as I had already booked my flight and put a deposit down on my room. So everything is now all set.

See you at WWDC if you made it.

Tagged :

OMG. Apple ROCKS!!!

Just two minutes ago after playing with the kids out in the yard the phone (landline) rings. I checked the callerID after a few rings – not intending to answer. Usually it’s some private number or some telemarketer.

I see that it’s Apple Computer on the callerID.

I pick up and a nice guy tells me he’s from Apple Developer Support and that they noticed that I tried to purchase a ticket today and that the transaction didn’t go through. I told him that was true. I thought the next thing out of his mouth would be an apology or something – just to be nice.

He then proceeds to tell me that he’s got good news – a ticket has been reserved for me in my name and that I’ll be receiving an email from Developer Support within 12 hours with instructions on how to purchase the pass. He thanked me for supporting the platform, etc.

Five seconds of silence from me. I was dumbfounded. I said thank you at least eight times – it took me a few moments to realize what had just happened. I asked him how this happened – how was I given another shot – and he had no idea. I assume some tickets were cancelled or Apple decided to open up the number of available tickets to avoid the backlash that started today (because of the super-quick sellout).

Wow. I… I… wow.

Thank you Apple. Thank you. That was so unbelievably cool.

WWDC Sells out under two minutes?!?

I was on the last step for purchase – placed my order… and got a store error. Sold out. I’ve heard it only took 60 seconds.

We are unable to process your request.


I must have just missed out… I tried to purchase as quickly as possible.

Okay. Now that some time has passed I can fall back on the semi-live session videos. And I saved $1,599 plus hotel (that I was going to be re-imbursed for anyway), and I’ll be able to sleep in my own bed. But I am still not happy.

Apple is going to have to go to Las Vegas or something – although that would make engineer attendance nearly impossible. Sorry, I am just typing away here to myself. 🙁

WWDC 2013 Announced

Apple has announced the dates and price for WWDC 2013 a day early – allowing developers to prepare a bit before the tickets officially go on sale.

Apple Worldwide Developers Conference
June 10-14, San Francisco
Tickets go on sale worldwide on April 25 at 10 a.m. PDT.

Last year all 5,000 tickets sold out in two hours. I can only see that number dwindle to possible minutes now with developers all sitting at their machines ready to buy a pass as soon as possible. While this approach is fair to the rest of the world and especially the west coast – it’s going to be a nightmare if those Apple Store servers aren’t bullet-proof.

I got an email from Apple just before I got my text message from a WWDC watching service (WWDC Blast). So while the service did indeed work great, Apple was on the ball – possibly sending the email just before pushing the updates to the WWDC area on it’s website live.

A few important notes: Apple is requiring that those buying a pass must have been part of the developer program prior to today – preventing those wanting to sign up day of the tickets going on sale and picking one up. Also – Apple plans to publish WWDC session videos while the conference is still going on – no more wait for them to become available after the conference. That’s huge! If I don’t end up getting a pass in time at least I won’t feel so left out.

While iOS 7 might be running behind schedule, at least those bits are most likely going to hit attending developers – I’d hope. I kind of feel sorry for the engineers on iOS as I’m willing to bet that they are working like madmen getting things completed.

Sign up for WWDC Blast

If you’ve missed out on getting tickets at face value in the past for WWDC – sign up for WWDC Blast.

Sign Up for WWDC Blast

You’ll get an SMS delivered to your phone as soon as Apple updates it’s WWDC page – which is assumed to be the announcement hint for the dates and the ability to purchase tickets. If you buck up a little you can also receive a phone call. You can also pay to move up the queue – yes, there is a notification queue.

I’ve seen plenty of local tools and ways people have come up with to determine and alert them of a change in status of the WWDC page Apple hosts. This is a service and will save you some time and energy on your own to get notified as soon as possible. I’m going to try it this year.

Last year I was able to get tickets, but only because Apple announced early in the morning on the east coast – and thus I didn’t need to compete with those on the west coast. I am hoping for some luck this year as well.

Tagged :

Panic Status Board

I know. I know. I did what I said that I would not do. I purchased Panic’s Status Board for my iPad mini. Did I buck up for the Airplay capability? Heavens no. While it might be pretty cool for a minute or two – I don’t have a set up where that would make sense.

Even while working from home I can’t see myself looking up at the television every so often to check the status of things when they are within easy viewing on a laptop or desktop screen.

After some use update: I am getting bad response from weather server errors, random protocol errors from Gmail, bad renderings in charting, weird Twitter rendering outages, etc. Hopefully a lot of this will be addressed in an upcoming update – because it does have a lot of stuff that needs work.

Wait a minute… I thought of something like this back in 2010. Check it out.


I called it Glimpster… and it is a small take on what Panic has done. You couldn’t customize widgets and it didn’t have feeds, but the intention of it matches Panic’s… to provide a status view into one’s world stuff.

Check out Glimster on the App Store if you want to.

NSString “three” to “3”, etc.

I posted a question to the apple developer list which received a wonderful answer. My question was basically how can I transform a string with a spelled-out number as the numeric equivalent. “Three” becomes “3”, “twelve” becomes “12”, etc. without writing an enormous string replacement method. Well… check this out… this won’t localize (I don’t think) but it’s remarkable.

NSNumberFormatter * nf = [NSNumberFormatter new];
[nf setNumberStyle: NSNumberFormatterSpellOutStyle];
NSLog(@"Survey Says...%@", [nf numberFromString:string]);
//Yields "Survey Says...3"
//Works with "seventy-three" and "thirteen point five" too!

Check that out… it’s meant to go from “3” to “three” – but if you feed it the opposite way it works too! nil is returned for things it can’t convert, like “dozen”. This an incredible discovery.

Pull to refresh UITableView

Those of us using iPhones and who are on iOS 6.x have seen Apple’s implementation of pull to refresh. Apple has made this control available to iOS developers – starting with iOS 6.0. We’ve all seen various implementations by other developers that fit their design paradigm, but I think Apple’s implementation is quite nice and could potentially fit many designs. If you’d like to implement this control read on. A current caveat is that this control works with UITableView only at the moment.

Continue reading “Pull to refresh UITableView”

Tagged : /