UIView-Helpers icon indicating copy to clipboard operation
UIView-Helpers copied to clipboard

Wrong implementation in centerAlignHorizontalForView:offset

Open wentingliu opened this issue 11 years ago • 0 comments

  • (void)centerAlignHorizontalForView:(UIView *)view offset:(CGFloat)offset { [self setFrame:CGRectRound(CGRectMake((CGRectGetWidth([view frame]) / 2.0f) - (CGRectGetWidth([self frame]) / 2.0f) + offset, CGRectGetMinY([self frame]), CGRectGetWidth([self frame]), CGRectGetHeight([self frame])))]; }

Should also add [view frame].origin.x.

wentingliu avatar Jan 05 '14 13:01 wentingliu