Creating an image view with other image view tag
In my app i have a condition in which I have to initialize开发者_JS百科 a image view in my class with the same tag as other image view. So can anyone tell me how to create an image view with tag of other image view? I wrote the code like this but not getting the result:
UIImageView *imageView2=[imageView viewWithTag:i];
UIImageView *imageView1 = [view viewWithTag:i];
Create your second image view with the tag of your first image view .
UIImageView * imageView2= [[UIImageView alloc] initWithFrame:CGRectMake(0,20,width,height)];
imageView2.tag = imageView1.tag;
精彩评论