Skip to content

Commit

Permalink
修改判断当前view的位置是否在屏幕左侧的方法
Browse files Browse the repository at this point in the history
  • Loading branch information
HeFeiKing committed Mar 28, 2017
1 parent 88ac80f commit e9fd663
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FloatView/FloatView/FloatView.m
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ - (bool)judgeLocationIsLeft
// 手机屏幕中间位置x值
CGFloat middleX = [UIScreen mainScreen].bounds.size.width / 2.0;
// 当前view的x值
CGFloat curX = self.frame.origin.x;
CGFloat curX = self.frame.origin.x + self.bounds.size.width/2;
if (curX <= middleX) {
return YES;
} else {
Expand Down

0 comments on commit e9fd663

Please sign in to comment.