add centerHorizontallyInRect: helper
Add viewTopOffset method to help with iOS 7 view positioning. Also fix deprecation notices when iOS 6 is deployment target.