0
안녕하세요. 잠시 iOS를 배우기 위해 약간의 Meme 생성기 앱을 작성합니다. 개발. 이제 문제가 하나 있습니다. 나는TextField 글자가 투명합니다.
let memeTextAttributes:[String:Any] = [
NSAttributedStringKey.strokeColor.rawValue: UIColor.black,
NSAttributedStringKey.foregroundColor.rawValue: UIColor.white,
NSAttributedStringKey.font.rawValue: UIFont(name: "HelveticaNeue-CondensedBlack", size: 40)!,
NSAttributedStringKey.strokeWidth.rawValue: 4.0,
]
func setUPTextField (textField : UITextField){
textField.delegate = textViewDelegate
textField.defaultTextAttributes = memeTextAttributes
textField.textAlignment = .center
}
뭔가 내 memeTextAttributes 잘못 내 텍스트 필드에 대한 설정합니다. 속성을 설정하지 않으면 내 글자가 투명하지 않습니다. 그림과 같이 보일 것입니다. 그러나 편지는 투명하지 않아야합니다. 검정 테두리가있는 흰색이어야합니다.
누군가 아이디어가 있습니까?
감사합니다. 여기에 설명 된대로