2011-03-21 8 views
21

기본 UIButton 둥근 사각형은 진한 파란색입니다. 테이블의 셀 텍스트가이 파란색 색상과 일치하도록하고 싶습니다. 이 코드하지만 난 찾을 수있는 유일한 파란색을 사용하고텍스트 색상 일치 기본 UIButton 색상 [파란색]

cell.textLabel.textColor = [UIColor blueColor]; 

답변

17

사용이 코드는

cell.textLabel.textColor = [UIColor colorWithRed:.196 green:0.3098 blue:0.52 alpha:1.0]; 
+0

완벽한, 감사합니다! –

3

색상의 RGB 값을 사용하여 색상을 설정할 수 ... 밝은 파란색 아이폰 OS 7

[UIColor colorWithRed:0.22 green:0.33 blue:0.53 alpha:1.0] 
+0

우연히 이것을위한 출처가 있습니까? – toblerpwn

+2

@toblerpwn 그냥 NSLog – VvDPzZ

27

시스템 버튼 텍스트 색상 이상이다 : iOS6의이다

,363,210

스위프트 :

UIColor(red: 0, green: 0.478431, blue: 1, alpha: 1) 

목표 - C :

[UIColor colorWithRed:0 green:0.478431 blue:1 alpha:1] 
+2

이것은 정답입니다. 'UIColor * theColor = _yourButton.currentTitleColor; –

+1

Swift에서 증명 : print (UIButton (type : .System) .currentTitleColor)' – ma11hew28

+0

@arcadybob은 올바른 아이디어를 가지고 있습니다. 그리고 만약에 NSLog (@ "title color : % @", theColor " UIColor * systemTextColor = [[UIButton buttonWithType : UIButtonTypeSystem] titleLabel] textColor]; cell.textLabel.textColor = systemTextColor; '버튼 객체를 아직 가지고 있지 않다. –