开发者

create a uiview object from cgrect

开发者 https://www.devze.com 2023-02-06 22:54 出处:网络
I have a custom table view cell where i create 3 images with: [aUIImage drawInRect:someCGRect]; Is there a way I can create 3 UIView objects from these images, 开发者_Go百科so I can access them in

I have a custom table view cell where i create 3 images with:

[aUIImage drawInRect:someCGRect];

Is there a way I can create 3 UIView objects from these images, 开发者_Go百科so I can access them in my touchesBegan method to find which image was touched? Or is there a better way?

Thanks!


I think the better way would be using the UIButton instead the UIView. You just need to specify the image property and the size you want.


Consider using a UIImageView for each.

0

精彩评论

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