How to make an overlay with round edges (iPhone SDK)?

夙愿已清 提交于 2019-12-03 10:06:48
MrMage

You can use these helper functions and then mask/clip to the resulting CGPath:

http://fabian-kreiser.com/index.php?id=1135350598525812781

Or use view.layer.cornerRadius, as seen in How do I create a round cornered UILabel on the iPhone?.

Use the view.layer's cornerRadius property.

#include <QuartzCore/QuartzCore.h>

...

overlayView.layer.cornerRadius = 5.0;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!