UIView category and OS X Compatibility

@DAlOG @AndreyMoskvin  Resolves #20 and #27 . Please check and accept.