Swift Segment Control how to select more than one segment - swift

I have a Segment Control in my app, I want to user to be able to click multiple of the segments. I googled and could not find any about this and there was no checkbox in Xcode for something like 'Allow multiple selection'. I found that in objective-c you weren't able to do this, is this still the same for swift, and if so is there another thing that can do what I want to do.
Any help would be greatly appreciated

From the Apple Documentation
Content for each segment is set individually. Using the Segment field,
you can select a particular segment to modify its content.
So you can not choose multiple segments into Segmented Control.
For more information read that document.

Related

Ag-grid enterprise: possibility to deselect cells in rangeselection via user interaction

I am currently using the Ag-grid enterprise angular version 20.2.0 in a project and we cannot find an option to deselect already selected cells during the range selection. In addition to that, I cannot find any information about that option in the given doc. https://www.ag-grid.com/javascript-grid-range-selection/.
Is there any possibility to deselect cells with ctrl and another key or do I have to create a feature request, so that they may implement that?
Just as further information, we use the api.getRangeSelections() to process and visualize the given values in a custom status bar component. We expect that customers demand to exclude unexpected data instead of deselecting everything and restart from scratch.
Thank you in advance for your assistance :)
Very good question. After a quick research on the doc, I can recommend you to enable advance range selection, and prompt users that they can exclude their selection only if they go around the cells they want not to select.
For example:
Here above, I selected cells with 'advance range select' ( CTRL + selection ) and remained a cell none-selected. Before I start to select with range, I figure it out which one I am not going to select, so it becomes easier to manage cells to be none-selected.
Go and experience yourself with this link: https://www.ag-grid.com/javascript-grid/range-selection/#example-range-selection-advanced

"Segmented Button" with Multi-line Text

I'm not sure exactly what keyword I should be searching, but I wasn't able to find the answer to my problem - I'm new to iOS development so apologies in advanced if I'm not using the correct UI components.
I want to create something like a segmented control (two choices) with multi-line descriptions in them, except I'm not sure if I should be using a segmented control to do so, or to customize a button to create it. The user should be able to select a "choice" and that will switch views and tint the choice not selected depending on the choice the user makes. How exactly would I design this / is this possible?
I've already attempted to modify the segmented control but couldn't get the desired results. I've thought about creating a text box and modifying it to act like a button selector, but wasn't sure if that was the best way. I would love some input, thanks!

Access Forms prevent mouse from selecting values from dropdown, force keyb input

I have a data entry form. Its properly tab indexed etc. and there are three dropdown menus which automatically unfurl with the on enter event.
No matter how much advice i give to users about using the tab key and keboard and checking what they just input.
they still insist on using the mouse to select values from the dropdown menus
the problem is that in their haste they often make mistakes as a result of using the mouse.
I would like to be able to force users to input into these fields using the keyboard.
the drop down is neccessary for users see the appropriate values for the field because the values will vary based on previous selections.
I have already tried experimenting with onclick events but to no avail.
Is there a way I can do this?
i am using access 2007 many of the users have access 2003.
Based on your comments, I would take one of two different approaches.
If your users are really comfortable with the codes AND know which ones they should use based on their previous selections, then just use text boxes instead of combo boxes. You can still put some validation code in either the Form_BeforeUpdate event or the individual control's _BeforeUpdate event.
If the users are not that comfortable, then I would suggest you have the first field in the combo boxes be the description of the code, not the code itself. So instead of choosing from 101, 102, 103 they are instead choosing from "Small", "Medium", "Large" or whatever those codes actually apply to. If you still wanted to display the codes themselves, you could do that with a separate disabled text box.
Now to answer your actual question. For the record, I highly recommend against using this approach. The simplest way I can thing of to prevent your users from using the mouse to select the combo box, would be to add a Transparent button covering the combo box.
To do this, draw a regular command button over the combo. Set Transparent = Yes, Visible = Yes, Enabled = Yes, Tab Stop = No.
When users click on the combo now, they will actually be clicking on the Transparent button and nothing will happen. The ONLY way they will be able to get into the control is by tabbing from a neighboring control or using a hotkey (via '&' in attached label).
Once they enter the control via Tab and your code forces a dropdown, they will still be able to choose an option using the mouse. But by forcing them to use the keyboard initially, it will make it much more likely that they just stick with the keyboard.
Again--I can't stress this enough--I think this is a terrible, horrible, no-good idea. Please don't use this approach. But you asked a technical question and this site is all about giving technical answers, so there you go...

auto complete a search

I have searched the questions so far, and it seems that most auto complete questions are about the console.
How can we auto complete a search and load it like the image below. I am new to xcode, so if you have instructions on what I need to do to get it to look like this, then I will appreciate it.
Basically I have an empty table cell, when i touch it to edit, a search box should come up (at the top), and as soon as I type a, all the values for a show up below in individual cells. I can select a cell when I see the value, and it will take me back to the original table and input that value into that cell.
What is the structure after i click the initial cell to bring up the search box
Auto complete with cells?
After this, I imagine I store the value of the variable, and assign it to the cell it originated from.
Attached is an image for reference.
Thank you in advance.
PS - The list to auto complete from has a few thousand values.
Thanks!
For several thousand entries it's unlikely Core Data will give you good performance. Instead you'll need to load the data as a Directed Acyclic Word Graph (DAWG). See other answers on this for further info.
Directed acyclic graph
Best way to implement address book autocompletion on iPhone?

iOS: Search Options UI

I am building an iPhone app for a library and I want to give few options to the user to search books by. A user can search a book by title, author, topics, or date of publication.
What I want to know what's the best way to display these search options to the user? In terms of HTML, it would be easy - either use a drop down list or radio buttons. I tried using UIPickerView but honestly, that looks terribly ugly and destroys the aesthetics of the view of my app.
The other option I was thnking was using segmented control, but is it possible to have a vertical segment control in stead of horizontal one? The selection texts can be too long.
Any ideas?
If you want a vertical segmented control, you'll have to make it yourself. Create a textured image with dividers. I would export each section as a PNG separately. Then create a picture of each section with the "pressed down" gradient and export each segment as a separate PNG again.
I would then make a new class. If there is a specific number of objects in your segmented control or this is a one time thing, the class may not even be necessary. If not, then in the class constructor pass an array with the titles of the segments in your segmented control. For the first and last objects, use the pictures you made with rounded corners. For the objects in between, use the standard pictures. Then put the titles on top. When a segment is tapped (perhaps use hidden UIButtons), you can use a delegate method to tell the main search class which one was tapped, and then the class can replace the normal picture of that segment with the pressed down one.
Thanks for the options.
I ended up creating a simple table to show my choices.
User clicks on "search by", which opens up the table with options and then when you select any option, you return back to main view with the chosen search option.