1
viewImageView=[[UIImageView alloc] initWithImage:viewImage];
viewImageView.center=self.center;
[[self superview] addSubview:viewImageView];

我已将 imageview 添加到superview.selfUIView类中。但是当我点击或从右到左滚动touchesbegin: withEvent:并被touchesEnded:withEvent:调用时。但是当我点击或从左到右移动时..touchesEnded:withEvent:没有被调用。它正在调用touchesCancelled:withEvent:请帮助我解决这个问题。

4

1 回答 1

0

代替

[[self superview] addSubview:viewImageView];

尝试这个:

[[self view] addSubview:viewImageView];
于 2013-03-25T18:50:59.443 回答