Replaced UIView animation method that didn't exist in iOS 6 and fixed layout issues with iOS 6