• Home
  • Nchart3D
  • NGrid
  • Customers
  • Live demo
  • Download
  • Purchase
  • Blog
  • Support
  • Login
Contact us Terms of service Privacy policy ©   Anjuta Software
NChartView does not work in storyboard. How to fix this?
by Konstantin at 26 Oct. 2015
  1. NChart3D FAQ
  2. Objective-C API
  3. NChartView does not work in storyboard. How to fix this?

If you use NChartView as IBOutlet, xcode can generate some problems like

  •  'Unknown class NChartView in Interface Builder file'
  •  '-[UIView chart]: unrecognized selector sent to instance'

The problem is that it's not so straightforward to link storyboard with the custom view. The app does not load third-party framework (for example, NChart3D) before creating storyboard, so at the time storyboard is created there are no symbols from NChart3D available. This is how iOS is organized right now.

The workaround is to subclass NChartView with you own class and use this class in storyboard:
 

@interface MyChartView : NChartView
@end

@implementation MyChartView
@end

@interface ViewController : UIViewController
@property (strong, nonatomic) IBOutlet MyChartView *chartView;
@end

Also don't forget that storyboard creates and loads view by itself and you don't need to implement -(void)loadView.

You just need to customize chart in -(void)viewDidLoad method.

Was this article helpful?

Unfortunately, you can't vote for this article. Please log in to be able to vote.

0 out of 0 found this helpful


Comments


No comments yet.

Please log in to place a comment.