core plot custom Theme?

前端 未结 4 405
失恋的感觉
失恋的感觉 2021-02-04 12:40

I\'m using Core-Plot for a trend chart in an iPhone app and haven\'t found how to customize the background. I can create a theme using the built-in themes, like kCPPlainWhiteThe

4条回答
  •  清歌不尽
    2021-02-04 13:18

    I tried this & it works for me:

    // Here 'hostingView' is your CPTGraphHostingView to
    // which you add your graph
    UIImageView *backgroundImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"background.png"]];
    [hostingView addSubview:backgorundImage];
    [hostingView sendSubviewToBack:backgroundImage];
    

提交回复
热议问题