0

ビューに 4 つのイメージ ビューがあります。 NSlogで確認しました。助けてください。

-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
    UITouch *touch = [[event allTouches] anyObject];
    CGPoint location = [touch locationInView:self.view];
    if ([touch view] == textstyleImage) {
        textstyleImage.center = location; 
        }
    else if ([touch view] == clipartImage){
        clipartImage.center = location;

    }
    else if([touch view] == customMessage){
        customMessage.center = location;
    }
    else if([touch view] == galleryImage){
        galleryImage.center = location;
    }
}
4

1 に答える 1

1

このようにそのイメージビューのユーザー操作を有効にします

[fourthImageView setUserInteractionEnabled:YES];

もう一度テストします。

于 2012-06-19T05:29:43.520 に答える