UIView-Helpers
UIView-Helpers copied to clipboard
Wrong implementation in centerAlignVerticalForView:offset
- (void)centerAlignVerticalForView:(UIView *)view offset:(CGFloat)offset { [self setFrame:CGRectRound(CGRectMake(CGRectGetMinX([self frame]), (CGRectGetHeight([view frame]) / 2.0f) - (CGRectGetHeight([self frame]) / 2.0f) + offset, CGRectGetWidth([self frame]), CGRectGetHeight([self frame])))]; }
Should also add [view frame].origin.y.