convertRect view之间坐标系的转换

UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
CGRect converControlTagRect = [self convertRect:self.controlTagView.frame toView:keyWindow];
[self.controlTagView removeFromSuperview];
self.controlTagView.frame = converControlTagRect;
[keyWindow addSubview:self.controlTagView];

CGRect originalRect = self.frame;
CGRect popUpRect = CGRectMake(0, originalRect.origin.y-hotViewHeight, self.frame.size.width, originalRect.size.height+hotViewHeight);
[UIView animateWithDuration:0.4f delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
self.frame = popUpRect;
} completion:^(BOOL finished) {

}];

posted @ 2017-02-06 14:48  喜狼狼  阅读(334)  评论(0编辑  收藏  举报