Adding the UIView extensions originally from the Learn project.