Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
135 views

how to style segment in SegmentedButton widget

i need segment to have different color for selected & unselected segments SegmentedButton<String>( selected: _selectedSegment, showSelectedIcon: false, ...
Sarah's user avatar
  • 1
0 votes
0 answers
196 views

How to apply the corner radius to selected tab of Segment Picker in SwiftUI

I wanted to add the corner radius to the selected segement of picker. I did apply the cornerRadius modifier to the picker but it does not add radius to the selected tab. import SwiftUI struct ...
Syed Ahmad's user avatar
0 votes
1 answer
38 views

Overlay a UISegmentedControl over a SKSpriteNode

I'm currently using Metal to create a game board with floating balloons; each balloon is a SKSpriteNode with an image of a balloon attached. The user touches and drags the balloon to a second balloon, ...
user14337541's user avatar
0 votes
1 answer
384 views

How to make a swipeable segmented control with custom view in SwiftUI?

I have a segmented control with two segments as shown in the image see image here. I want to enable the user to switch between the two segments by swiping right or left, and display the corresponding ...
Dimpy-iRoid's user avatar
1 vote
0 answers
409 views

swiftui + picker segmented style appearance

I have a picker in segmented style on two views in a custom tab bar and need control over all aspects of color. i have overridden appearance() on each view and i have it looking how it want at first ...
thesuffering's user avatar
0 votes
0 answers
17 views

convert a segmented control order to two separate funcs

In my swift code below It uses a a segmented control to control the rotation of an object. The segmented control sets the direction either clockwise or counter clockwise. Then there is an action ...
John Zalubski's user avatar
3 votes
0 answers
60 views

How to create custom UISegmentedControl?

I want to create my custom UISegmentedControl like in the image below. There should be a gap between the buttons like in the screenshot. I have searched but did not get a complete solution. Here is ...
Naiyer Aghaz's user avatar
4 votes
3 answers
582 views

Xcode 15 beta 3 - Could not instantiate class named _UIRecessedMaterialView

I have an app that loads a xib with a segmented control. If I build it with Xcode 15 beta 3 and launch on a iPad with iPadOS 17 (or on iOS 17 simulator), it crashes with an error: Terminating app due ...
atarasenko's user avatar
  • 1,808
0 votes
0 answers
58 views

Custom shaped UISegmentedView-like Form in UIKit

I recently came across a fascinating design and I am interested in replicating it in UIKit. The design involves a non-rectangular form with a UISegmentedView-like component attached to it. I am aware ...
WebStormer's user avatar
0 votes
0 answers
309 views

Set custom UISegmentedControl height

I am trying to set the height of the segmented control to be higher than the default. I am not too familiar with UIKit so I am having a hard time getting it to work. I am using the picker in SwiftUI ...
John Citrowske's user avatar
0 votes
1 answer
141 views

removing the highlighted selected segment

can u guys tell me how to remove that highlight it has? i cant find a way to do it. this is how it is working:
Fábio Galante's user avatar
0 votes
1 answer
89 views

UI Test on UISegmented Control

GOAL: I want to UI test my SegmentedControl - check that each segment is selected when tapped on it CONTEXT: The shoeType UISegmentedControl has 3 segments [City, Running, Baskets] CODE: Here is my ...
dorianDevTech's user avatar
-1 votes
1 answer
221 views

I need help changing the background image of a segmented control somehow only red works

I'm new to UIKit and I'm developing a shopping cart page for a project and almost everything went great with little trouble but once I got to working with the segmented control to style it I couldn't ...
Fábio Galante's user avatar
-2 votes
1 answer
46 views

SWIFT Segment Controlled UITableView

My code is shown below. It's derived from a YouTube video made 3 years ago. Since the date the video was posted, Swift has updated and the output of the function which is Anchor can no longer be found ...
Shahrooz Kazemi's user avatar
0 votes
1 answer
43 views

How to create a customised segment-like view which can be seen in Google Maps place description in Swift?

I want to create a customised segment-like view which can be seen in Google Maps place description which has sections like Overview, Description, etc. Unlike Google Maps, tapping on any of those ...
Pritesh Kankaria's user avatar
0 votes
0 answers
43 views

UISegmentedControl click not fire when click

I encountered a problem: VC contains UISegmentedControl, I used NavigationController Push this VC. When UISegmentedControl is clicked, the Click event is not fired. let items = ["Photos", &...
MilkBottle's user avatar
  • 4,312
2 votes
1 answer
1k views

Compose: placement of measurables in Layout based on measuredWidth

I am trying to implement a SegmentedControl composable, but allow for segments to be of different sizes if one of them needs more space. So far I've achieved basic implementation, where all segments ...
Calamity's user avatar
  • 940
0 votes
2 answers
41 views

Custom Segment Controlled UITableView

I'm trying to create a UISegmentedControl, in which, when a segment is selected, it changes the table view and the cells change accordingly. But unfortunately an empty table appears, and when you ...
Polyandiy's user avatar
0 votes
1 answer
45 views

How to manage with custom SegmentControllCell to tableview cell?

I tried to manage from custom segment control cell into ViewController's tableview cell. This is My custom segment control class: protocol SegmentControllerCellDelegate: AnyObject { func ...
Bedri Doğan's user avatar
0 votes
1 answer
218 views

Custom Segment Control with UIView, only the first button works

I realized a Custom Segment Control with UIView, only the first button works. When I click on the other buttons, they don't change color, and the first button stays with the active background color. I ...
John Smith's user avatar
0 votes
1 answer
345 views

SwiftUI Segmented Picker not responding to user input

I have a segmented picker control that is dynamically generated from my model's values. I have made a minimal reproducible example, and here is the model: class DataModel: ObservableObject { @...
coco's user avatar
  • 3,104
3 votes
4 answers
646 views

Color unselected segment of UISegmentedControl without hiding selection

I wanted to color each segment in my UISegmentedControl in a different color. I used the following Swift code (there were some changes with segmentedControl in iOS 13): segmentedControl....
Nina's user avatar
  • 63
0 votes
1 answer
41 views

Selecting Different Cells in One TableView with 2 Data sources

On one view controller, I have a single UITableView and a UISegmentedControl at the top of it. The table view is populated from an NSArray that collects the files from one of a couple different ways. ...
user717452's user avatar
1 vote
1 answer
135 views

Move to other Picker View tabs only after the user taps on a button in an alert view - SwiftUI

What I would like to be able to do is that when the user taps on a color tab, first present an alert view asking before actually moving to the other tab and if the user decides to Cancel it will not ...
fs_tigre's user avatar
  • 10.7k
0 votes
2 answers
955 views

SwiftUI Segmented Picker Dynamic Type

I'm trying to get dynamic type to respond with a segmented picker using SwiftUI. I know I have to access the old UIKit stuff and have everything working except for it responding to dynamic type ...
kittonian's user avatar
  • 1,399
0 votes
1 answer
62 views

I'm using reactive_sliding_segmented package. How can I go to next segment on clicking a button on Parent Widget in Flutter?

I want to change the value of segment control when button is clicked in parent widget. If button and segment control are in same widget I can easily change the value of segment control but if they are ...
SR Oli's user avatar
  • 3
0 votes
1 answer
35 views

The logic of the interaction between UISegmentedControl and GUI doesn't work in my app

The functionality I tried to implement in the quiz game is looks like this: Here is the SettingsViewController which contains the settings of an app, where user can choose the difficulity of the game ...
Polina's user avatar
  • 79
0 votes
1 answer
36 views

UIUISegmentedControls overlap inside UITableView cells after scrolling

I have UITableView with some cells (settings). Inside the cell I create a UISegmentedControl programmatically: class SettingsCell: UITableViewCell { var segDist : UISegmentedControl? = nil ... var ...
Dima's user avatar
  • 1,237
0 votes
1 answer
1k views

Display segmented Picker in Form without section background & padding

I want to display a picker with segmented style inside a form. Form { Section { Picker("Picker", selection: $selectedOption) { Text("Option 1") ...
Mischa's user avatar
  • 16.9k
2 votes
1 answer
1k views

Change Segment Controller Tint Color in SwiftUI

I am using a segment picker in my app. I want to change the text color of the unselected to white. I searched for the solutions but didn't get any right for me. Here is my code: struct QuestionView: ...
Taimoor Arif's user avatar
  • 1,092
3 votes
2 answers
505 views

How to manage text size in segment control for different devices?

I am trying to create custom segment control using CollectionViewCell. So i can manage text size of the segment control in different devices. But it is not working properly in all the devices. I have ...
MeetMistry15's user avatar
-3 votes
3 answers
168 views

Is there a way to make the twitter's iOS app's notification tab's navigation bar (pic attached)

I am thinking of implementing a UISegmentControl extension to achieve the twitter's iOS notification tab bar, navigation bar segment style. I tried extending the class like in this post. I want to be ...
Vivek Pattanaik's user avatar
0 votes
1 answer
1k views

Swift Segment control with Table View Cell Data Passing techniques

I want to pass the data from one table view cell to another one table view cell . I want to add those table view cell values to another segment control when user click the add the button . I have two ...
user avatar
1 vote
1 answer
722 views

How to change font size for each segment in UISegmentedControl. Swift

can i change font sizes for each segment in UISegmentedControll? I know i can change for all, but i want each segment to have different font size. Is it possible? For example if I have 3 segments I ...
Michał Michalik's user avatar
0 votes
1 answer
435 views

Passing data to Segment control from Table view Cell

I am using table view cell to display the data . I have a segment control . In first section I am displaying the list of the move with button control . When the user click the check mark button I ...
user avatar
2 votes
1 answer
270 views

Customise font color of each segment in UISegmented Control

I'm, trying to configure segmented control bar. The goal is to make text font of each segment in different colour. So it should look like this: example I have read many topics, including this one: How ...
Sergey_VC's user avatar
  • 103
1 vote
1 answer
238 views

Save button states when we move segmented control

We have for example segmented control, and array of buttons. If we select one of button in one segment - button need to save state, and than we move to another segment and choose another button. but ...
guest143's user avatar
1 vote
1 answer
37 views

How do I determine what font is being used (by default) in the UISegmentedControl?

There are a dozen answers to how to set the font of a UISegmentedControl, but I want to determine what font is being used, without having been manually set. override func viewDidLoad() { super....
bshirley's user avatar
  • 8,347
1 vote
1 answer
1k views

How to change UISegmentedController Background Color

Trying to change UISegmentedController Background color to white. its not reflect on it. if #available(iOS 13.0, *) { self.workDaySegmentedController.backgroundColor = .white self....
kiran's user avatar
  • 4,379
0 votes
1 answer
656 views

Switch between tableViews using segmented Control

I have a tableView showing multiple tasks and i would like to programmatically switch between 2 dataSources. I have created a segmented control that appear at the top but when i click on the buttons ...
dohoudjann's user avatar
2 votes
2 answers
2k views

swift picker not selecting item

I have a short array of items that I want to display in a segmented picker. I'm passing the selected item (0, by default). The picker displays, but no item is selected, and the picker is unresponsive ...
Mitchell Schaff's user avatar
1 vote
0 answers
511 views

App crashes when i run with this error "unrecognized selector sent to instance 0x6000001e1a40"

I'm using a segment controllers for show tableview , I want Underline for selected index, This is my function , I don't know what is wrong with this.` func attributedText(){ guard let font = ...
iFateh's user avatar
  • 587
4 votes
1 answer
165 views

UISegmentedControl accessibility mode styling

I'm setting colors for my segmented control like this: segmentedControl.backgroundColor = .gray segmentedControl.selectedSegmentTintColor = .red let textAttrs: [NSAttributedString.Key : Any] = [ ....
algrid's user avatar
  • 5,897
1 vote
1 answer
87 views

UISegmentedControl and View switching problem

So I've made a code in which I have 3 options in UISegmentedControl which should show you one of 3 Views ( green with 2 text fields, sub-view blue with 2 buttons and sub-view purple with 2 IUImageView)...
Kseniia Piskun's user avatar
0 votes
1 answer
871 views

How to detect event when user click on selected segment Control in swift?

I am using UISegmentControl in swift now I have created @IBAction so the type is ValueChanged but when I click on selected segment @IBAction does not invokes. so I tried withtouchUpInside, .allEvents ...
John's user avatar
  • 1
0 votes
0 answers
122 views

Removing UIImage background from UISegmentedControl [Storyboard]

I have a SegmententedControl that was added using Storyboards and I want to remove the default greyish background. The images are snippets from the View Hierarchy Debugger.
nix.codes's user avatar
  • 388
0 votes
2 answers
626 views

Sending a signal to collection view within tableview cell from a segment outlet in another tableview cell

I have a segment outlet in a tableview cell in a VC. There are two indexes: 1 and 2. When I click on 2, I want to tell the collection view within another tableviewcell to reload another view. And when ...
WhySoSerious33's user avatar
0 votes
3 answers
2k views

accessing segmented control selected index from another viewcontroller

I'm working on an app that currently has 2 view controllers. Within the second viewcontroller, (which I'm using for settings) I use a segement control in order to determine the game's difficulty. The ...
RAS98's user avatar
  • 1
1 vote
1 answer
365 views

Swift How to know if one of my segment items is selected?

I have a segment and am wondering how to know if one of the items in the segment is selected. I do not care which one the user has chosen at this time. EDIT if variations.isSelected == false { ...
user avatar
1 vote
1 answer
69 views

Saving TableView cells data (containing segment controller) using button

I'm tired of searching about what I want, so I will ask here and hope you guys help if possible. I have a tableview contain segments in each cell and I want to save all cells segment using button [...
ihadi's user avatar
  • 31

1
2 3 4 5
37