10시 이전에 iOS 버전에서 UIDatePicker
의 텍스트 색상을 변경하는 방법이 있었지만 iOS10에서는 더 이상 작동하지 않는 것으로 나타났습니다. UIDatePicker
에 대해 textColor
을 변경하는 기능을 복원하려면 어떻게해야합니까?iOS10에서 UIDatePicker TextColor를 변경하십시오.
if #available(iOS 10.0, *) {
//Not sure of a way to do something similar here.
} else {
//The following lines change the textColor of UIDatePicker to white in iOS9 and older.
self.setValue(UIColor.white, forKey: "textColor")
self.sendAction(Selector("setHighlightsToday:"), to: nil, for: nil)
}
테이블보기를 사용하여 사용자 지정 선택기를 만들 수 있습니다. 조금 복잡하지만 원하는 모든 것을 사용자 정의 할 수 있습니다. – Janmenjaya