iOS get navigation bar tint color by RGB

CGFloat c[4];
UIColor *color = self.navigationController.navigationBar.tintColor;
[color getRed:&c[0] green:&c[1] blue:&c[2] alpha:&c[3]];
NSLog(@"%f %f %f %f", c[0], c[1], c[2], c[3]);

0 意見: