UIView从右边到左边,添加动画显示

TDHPSelectPaymentWayView *paymentWayView = [[TDHPSelectPaymentWayView alloc]init];
paymentWayView.selectIndex = self.selectIndex;
paymentWayView.selectBlock = ^(NSInteger selectIndex) {

};
paymentWayView.frame = RM(0,SCREEN_HEIGHT - 419, SCREEN_WIDTH,419);
[self addSubview:paymentWayView];
CGRect temp = paymentWayView.frame;
temp.origin.x = SCREEN_WIDTH;
paymentWayView.frame = temp;
temp.origin.x = 0;
[UIView animateWithDuration:0.3 animations:^{
    paymentWayView.frame = temp;
}];

你可能感兴趣的:(UIView从右边到左边,添加动画显示)