English 中文(简体)
Iphone sdk, Rounded UIImage View FRAME 角落,而不仅仅是掩盖它
原标题:Iphone sdk, Rounded UIImageView FRAME corners, not just masking it

i am building a app in which if a UIImageView hits another something happens, i am using the CGRectIntersetsRect statement, i would like to make it as accurate as i can, at the moment i have about 8 UIImageViews inside this one UIImageView and i am detecting if something hits them 8 little views, i have decided that this is not a very accurate way to go about it. The problem is that the UIImageView the other UIImageView s are in, Its a Oval, so it is complicated, i have tryed masking it, using the image.layer.radius 10.0 or whatever the code is. but this doesnt actually transform the whole frame, is there any way to actually transform the whole frame so when a UIImageView hits the Oval shape then something happens?

如果有的话,有人可以向我解释。

Thanks Harry

问题回答

这确实很简单。 综观,UIImageView具有一层,一层具有玉米特性:

imageView.layer.cornerRadius = 5.0;
imageView.layer.masksToBounds = YES;

e 文职人员

A UIIage 观点框架是CGRect,CGRect是一条直截了当的,而一条直径没有四舍五入的特性。





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签