기본 UIButton 둥근 사각형은 진한 파란색입니다. 테이블의 셀 텍스트가이 파란색 색상과 일치하도록하고 싶습니다. 이 코드하지만 난 찾을 수있는 유일한 파란색을 사용하고텍스트 색상 일치 기본 UIButton 색상 [파란색]
는
cell.textLabel.textColor = [UIColor blueColor];
기본 UIButton 둥근 사각형은 진한 파란색입니다. 테이블의 셀 텍스트가이 파란색 색상과 일치하도록하고 싶습니다. 이 코드하지만 난 찾을 수있는 유일한 파란색을 사용하고텍스트 색상 일치 기본 UIButton 색상 [파란색]
는
cell.textLabel.textColor = [UIColor blueColor];
사용이 코드는
cell.textLabel.textColor = [UIColor colorWithRed:.196 green:0.3098 blue:0.52 alpha:1.0];
시스템 버튼 텍스트 색상 이상이다 : iOS6의이다
,363,210스위프트 :
UIColor(red: 0, green: 0.478431, blue: 1, alpha: 1)
목표 - C :
[UIColor colorWithRed:0 green:0.478431 blue:1 alpha:1]
이것은 정답입니다. 'UIColor * theColor = _yourButton.currentTitleColor; –
Swift에서 증명 : print (UIButton (type : .System) .currentTitleColor)' – ma11hew28
@arcadybob은 올바른 아이디어를 가지고 있습니다. 그리고 만약에 NSLog (@ "title color : % @", theColor " UIColor * systemTextColor = [[UIButton buttonWithType : UIButtonTypeSystem] titleLabel] textColor]; cell.textLabel.textColor = systemTextColor; '버튼 객체를 아직 가지고 있지 않다. –
완벽한, 감사합니다! –