I want to use iOS charts for my objective-c project. Since the UI is written in code completely, I don't want to create a nib file for the chart view specifically. However, a simple init or initWithFrame to create the LineChartView is giving me nil
//Declare chartView property in header
@property (nonatomic, weak) LineChartView* chartView;
//Call to init chart
CGRect frame = CGRectMake(0, 0, CGRectGetWidth(self.view.bounds),
CGRectGetHeight(self.view.bounds));
self.chartView = [[LineChartView alloc] initWithFrame: frame];
Here, self.chartView is nil after calling above code.