Skip to content

Commit

Permalink
add missing methods
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoCold authored and HaoCold committed Jan 4, 2019
1 parent a1b6a41 commit ceeb6c3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions JHFrameLayout/UIView+JHFrameLayout.m
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,18 @@ - (void)jh_centerXIsEqualToView:(UIView *)view{
}
}

- (void)jh_centerXIs:(CGFloat)offsetX fromLeftOfView:(UIView *)view{
[self xx_centerXIs:offsetX fromView:view type:0 updateWidth:NO];
}

- (void)jh_centerXIs:(CGFloat)offsetX fromMiddleOfView:(UIView *)view{
[self xx_centerXIs:offsetX fromView:view type:1 updateWidth:NO];
}

- (void)jh_centerXIs:(CGFloat)offsetX fromRightOfView:(UIView *)view{
[self xx_centerXIs:offsetX fromView:view type:2 updateWidth:NO];
}

- (void)jh_centerXIs:(CGFloat)offsetX fromLeftOfView:(UIView *)view updateWidth:(BOOL)flag{
[self xx_centerXIs:offsetX fromView:view type:0 updateWidth:flag];
}
Expand Down Expand Up @@ -329,6 +341,18 @@ - (void)jh_centerYIsEqualToView:(UIView *)view{
}
}

- (void)jh_centerYIs:(CGFloat)offsetY fromTopOfView:(UIView *)view{
[self xx_centerYIs:offsetY fromView:view type:0 updateHeight:NO];
}

- (void)jh_centerYIs:(CGFloat)offsetY fromMiddleOfView:(UIView *)view{
[self xx_centerYIs:offsetY fromView:view type:1 updateHeight:NO];
}

- (void)jh_centerYIs:(CGFloat)offsetY fromBottomOfView:(UIView *)view{
[self xx_centerYIs:offsetY fromView:view type:2 updateHeight:NO];
}

- (void)jh_centerYIs:(CGFloat)offsetY fromTopOfView:(UIView *)view updateHeight:(BOOL)flag{
[self xx_centerYIs:offsetY fromView:view type:0 updateHeight:flag];
}
Expand Down
Binary file added JHFrameLayoutDemo/.DS_Store
Binary file not shown.
Binary file not shown.

0 comments on commit ceeb6c3

Please sign in to comment.