I am trying to configure an instance of the UISegmentedController class so that I can set the color of the text in the unselected segment from the default of black to white for a two-segment segmented controller. But I can't find any way of doing it. I have tried using the setTitleTextAttributes(_,for:)method but I cannot find a suitable NSAttributedString.Key attribute to change the text color.
How do I change the color of the unselected/normal segment text in an iOS 13 segmented controller?
60 Views Asked by AudioBubble At
1
There are 1 best solutions below
Related Questions in UISEGMENTEDCONTROL
- How to apply the corner radius to selected tab of Segment Picker in SwiftUI
- Overlay a UISegmentedControl over a SKSpriteNode
- How to make a swipeable segmented control with custom view in SwiftUI?
- swiftui + picker segmented style appearance
- convert a segmented control order to two separate funcs
- How to create custom UISegmentedControl?
- Create UISegmentedControl with some segments working like buttons
- Xcode 15 beta 3 - Could not instantiate class named _UIRecessedMaterialView
- iOS taptic selectionChanged not firing for UISegmentedControl
- Custom shaped UISegmentedView-like Form in UIKit
- Set custom UISegmentedControl height
- removing the highlighted selected segment
- UI Test on UISegmented Control
- I need help changing the background image of a segmented control somehow only red works
- SWIFT Segment Controlled UITableView
Related Questions in NSATTRIBUTEDSTRINGKEY
- How do I change the appearance of Markdown-styled text in an AttributedString?
- Swift NSAttributedString.Key.foregroundColor not working in some older iOS versions
- Objective C - Change font of attributed string from HTML text with it's own style
- How to set NSAttributedString text color?
- Trigger event when hovering over a particular word in NSTextView
- Change UILabel attributed String color multiple times
- How do I change the color of the unselected/normal segment text in an iOS 13 segmented controller?
- TTTAttributedLabel, change of color works only the first time controller launches in Swift
- Add attributes to an already attributed string in textView
- Strikethrough horizontal line with words in the middle Swift iOS
- Cannot convert value of type 'NSAttributedString.Key' to expected dictionary key type 'String' error(swift4.2)
- How to have selected words in UITableView footer in bold typeface in Swift?
- HTML Text (with Table) in UILabel using NSAttributedString
- How to store and access an 'array' of NSAttributedString.Key.foregroundColor values
- How to check two NSAttributedString.key of a NSAttributed string for equality?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This works for me in a playground: