Fix UITabBar icon images as alpha-channel

Apple asks that your UITabBar icons be pure alpha-channel images with added anti-alias. That means that usual RGB channel images will just show as a blue square.

So how to go from a normal RGB channel image to a pure alpha-channel. I use Photoshop and there is probably┬ámore than one way, but what works best for me is creating a “Gradient map” adjustment layer.

To create a gradient map adjustment layer go to the “Layers” tab and click “Create fill or adjustment layer…” like below.

Screen Shot 2016-01-31 at 18.50.15

Afterwards save your image and all should be fine.

Fix putty garbled text after window resize

So you resized your putty window. When going through history, if there are lines which are longer than 80 chars, the default putty window, then just going through the will show the text garbled.

The fix is simple: tell the terminal the new window size. Arguably this should be automatically done by putty, but hey, there’s a workaround. Checkout the stty command.

Pass the cols parameter to specify the new width of the window in columns.

Find your home directory in the iPhone simulator

This is huge.

Start your application, then “Debug/Pause” it.

Then type this magic into your lldb console (the debugging pane should be at the bottom of the Xcode window).

Your debugger console should now show the local directory where your application has its home.