简体   繁体   中英

Core Plot CPTGraphHostingView corner radius

可以为CPTGraphHostingView设置拐角半径吗?

Make the HostView background clear color and set the background property and corner radius of the graph. This worked for me:

hostView.backgroundColor=[UIColor clearColor];
graph.backgroundColor=[UIColor brownColor];
graph.cornerRadius=10.0f;

No, but why would you need to? All Core Plot drawing is done by Core Animation layers (CPTGraph and all of it's various pieces). You can set the corner radius on the graph and on many other layers. Any graph part that is a subclass of CPTBorderedLayer can take a corner radius.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM