diff --git a/Coach Marks/DDCircleView.m b/Coach Marks/DDCircleView.m index b0de0e5..2e5b580 100644 --- a/Coach Marks/DDCircleView.m +++ b/Coach Marks/DDCircleView.m @@ -38,7 +38,7 @@ - (void)userTap:(UITapGestureRecognizer *)recognizer { - (void)swipeInFrame:(CGRect)frame { - [self centerYPositioninView:self inFrame:frame]; + [self centerInView:self inFrame:frame]; [self animateSwipe]; } @@ -101,7 +101,7 @@ - (void)centerYPositioninView:(UIView *)view inFrame:(CGRect)frame - (void)centerXPositioninView:(UIView *)view inFrame:(CGRect)frame { CGFloat centerX = frame.origin.x + CGRectGetWidth(frame)/2; - CGFloat offsetX = CGRectGetWidth(view.frame)/2; + CGFloat offsetX = 260/2; CGFloat newX = centerX - offsetX; view.frame = CGRectMake(newX, view.frame.origin.y, 40, 40); diff --git a/Coach Marks/DDCoachMarksView.m b/Coach Marks/DDCoachMarksView.m index e67ecd8..fa33722 100755 --- a/Coach Marks/DDCoachMarksView.m +++ b/Coach Marks/DDCoachMarksView.m @@ -230,7 +230,7 @@ - (void)showSwipeGesture // create an animating circle and animate it if (shouldAnimateSwipe) { - self.animatingCircle = [[DDCircleView alloc] initWithFrame:CGRectZero]; + self.animatingCircle = [[DDCircleView alloc] initWithFrame:self.frame]; if (![self.subviews containsObject:self.animatingCircle]) { [self addSubview:self.animatingCircle];