How to type cast UIView into a CPGraphHostingView?
How to t开发者_StackOverflow中文版ype cast UIView into a CPGraphHostingView?
Unless your UIView was not created as a real UIView object ([[UIView alloc]initWithFrame:]) try, but as a CPGraphHostingView object ([[CPGraphHostingView alloc]initWithFrame:]) try
(CPGraphHostingView*)view
as a normal type cast is written.
精彩评论