fiigo0/signView — pull request #1 by robertmryan (2013-09-25 16:43:12+00:00)
Title: Different technique for creating CGImageRef fixes problem with UIImagePNGRepresentation issue

I've done a few changes. The last commit appears fix the `UIImagePNGRepresentation` alpha-channel issue. Bottom line, I was a big suspicious of the use of `CGImageCreateWithMaskingColors` function, so I eliminated that and fixed the other references so that the routine would create the alpha channel properly from the get go. The only mysterious aspect was the needing to replace

glClearColor(1.0, 1.0, 1.0, 0.0);

with

glClearColor(0.0, 0.0, 0.0, 0.0);

I got this tip from http://stackoverflow.com/a/4456862/1271826 and other related posts that noted that this seems like it should be unnecessary (white with zero alpha _should_ be the same as black with zero alpha), but this makes a difference for some reason.

Unrelated, but I also:

1. Used the view controller containment calls (which you should always do when you add a view controller's view as a subview of another view controller's view);

2. Fixed a few random leaks that leaped out at me.