We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a graph which is part of my UIView subclass (looks like this):
- (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self setupUI]; } return self; } - (void)awakeFromNib { [super awakeFromNib]; [self setupUI]; } - (void)setupUI { // Create AAChartView instance _aaChartView = [[AAChartView alloc] init]; _aaChartView.scrollEnabled = NO; _aaChartView.translatesAutoresizingMaskIntoConstraints = NO; [self addSubview:_aaChartView]; // Add constraints to position and size _aaChartView within RBGraphView NSLayoutConstraint *topConstraint = [_aaChartView.topAnchor constraintEqualToAnchor:self.topAnchor]; NSLayoutConstraint *bottomConstraint = [_aaChartView.bottomAnchor constraintEqualToAnchor:self.bottomAnchor]; NSLayoutConstraint *leadingConstraint = [_aaChartView.leadingAnchor constraintEqualToAnchor:self.leadingAnchor]; NSLayoutConstraint *trailingConstraint = [_aaChartView.trailingAnchor constraintEqualToAnchor:self.trailingAnchor]; [NSLayoutConstraint activateConstraints:@[topConstraint, bottomConstraint, leadingConstraint, trailingConstraint]]; AAChart *aaChart = AAChart.new .backgroundColorSet(@"#191923"); AATitle *aaTitle = AATitle.new .textSet(@""); AAOptions *aaaOptions = AAOptions.new .chartSet(aaChart) .titleSet(aaTitle) ; [_aaChartView aa_drawChartWithOptions:aaaOptions]; }
It is added to ViewController in viewDidLoad:
public override func viewDidLoad() { super.viewDidLoad() rbGraphView = RBGraphView() guard let rbGraphView = rbGraphView else {return} rbGraphView.translatesAutoresizingMaskIntoConstraints = false graphContentView.addSubview(rbGraphView) // some auto layout constraints }
The problem is that background color change is happening when the screen is shown, so it flashes from white to #191923
I can't add and draw it earlier then viewDidLoad.
Is there any way to make it earlier?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a graph which is part of my UIView subclass (looks like this):
It is added to ViewController in viewDidLoad:
The problem is that background color change is happening when the screen is shown, so it flashes from white to #191923
I can't add and draw it earlier then viewDidLoad.
Is there any way to make it earlier?
The text was updated successfully, but these errors were encountered: