1

I have a Customized UITableViewCell and ImageView (& oder customized elements) added over it, on selection i change the image on ImageView but the default selection style color is also seen on my imageView. If i try to set selection style none on UITableViewCell,then the ImageView doesnt change its default image. if set to gray result is same the cell takes blue color and shows in imageview. if their a way out to change the image with allowing user selection on cell?

4

1 に答える 1

0

セル選択スタイルを none に設定し、onTouch イベントで imageview の画像を変更します...

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {

    UITouch *touch = [touches anyObject];

    if ([touch view] == yourImageView)
    {
            //add your code for image touch here 
    }

}

それが役に立てば幸い...

于 2012-07-12T13:40:32.983 に答える