こちらを参考にしてUISegmentControlのデザインを変更しようと、
このように書いたところ、エラーが出てしまいました。
エラーのFixを押すと今度は黄色で下記のようなエラーが表示され
最終的に下記のようになり、実機で確認しても文字色が白に変わりません。
原因も解決方法もわからず困っております。
どうぞよろしくお願いいたします。
//UISegmentControlの見た目 @IBAction func Segment(_ sender: UISegmentedControl) { self.Segment.tintColor = UIColor.clear self.Segment.backgroundColor = UIColor(red: 255/255, green: 49/255, blue: 81/255, alpha: 1) let attribute = [kCTForegroundColorAttributeName:UIColor.white] self.Segment.setTitleTextAttributes(attribute, for: .normal) }
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/25 16:46
2018/08/25 17:08
退会済みユーザー
2018/08/25 17:12
2018/08/25 17:15
退会済みユーザー
2018/08/25 17:19
2018/08/25 17:25
退会済みユーザー
2018/08/25 17:33 編集
2018/08/25 17:33
退会済みユーザー
2018/08/25 17:34
退会済みユーザー
2018/08/25 17:39
2018/08/25 17:39
退会済みユーザー
2018/08/25 17:42
退会済みユーザー
2018/08/25 17:45
2018/08/25 17:51
退会済みユーザー
2018/08/25 17:57
退会済みユーザー
2018/08/25 17:59 編集
2018/08/25 18:05