开发者

Creating an image view with other image view tag

开发者 https://www.devze.com 2023-03-15 09:27 出处:网络
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 ot

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;
0

精彩评论

暂无评论...
验证码 换一张
取 消