Search code examples
iphoneobjective-ccocoa-touchios4

How to type cast UIView into a CPGraphHostingView?


How to type cast UIView into a CPGraphHostingView?


Solution

  • 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.