此代码循环通过将子视图添加到当前子视图(这是一个纸牌游戏)...
//Creates the Card's view and adds it to the cardContainerView
CardView *cardView = [[CardView alloc]initWithFrame:CGRectMake(0, 0, 67,99)];
[cardContainerView addSubview:cardView];
//Assign the UIGesture to the CardView
//For panning and dragging
UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(handlePanGesture:)];
[cardView addGestureRecognizer:panGesture];
...一旦交易完成,我想用触摸手势选择一张卡片并拖动它 - 在这个序列中,我希望这张卡片悬停在所有其他卡片上(比如在纸牌中,你想从一张卡片中添加一张卡片列到另一个)