Best way to select multiple items in iOS? - ios

I'm writing an iOS app in Swift. I want to display a bunch of items (team names) and want the user to select many of them for a league. What's the best way to do this? I could use a picker view, and take each one out as they are selected. I would like to use checkboxes, but there is nothing built in for that. Maybe a table view with multiple checking? Has anyone already done this and have a good method to use?

I think the best/easiest way to do it is with a UITableView and all you have to do is enable multiple cell selection. Then you can retrieve them by using
table.indexPathsForSelectedRows

Related

How to create a dynamic drop down within a table view?

I need to create a tableview with at least two sections, transportation and hotel. Tapping on either one creates a drop down view showing info on 1 to n examples of the topic selected. You don't know in advance what data is going to be there so it has to be dynamic to present any number of results with some having lengthy descriptions below each example and some not. I've been racking my brain and I can't figure out how to do this. The dynamic nature of this makes it extra difficult. Here is a mock up of what it should look like: click here
Check out this Git-Repo. I am using it inside my app and its working quite well. You can also watch the tutorial for it: https://www.youtube.com/watch?v=22zu-OTS-3M&t=1s
Hope that helps!

Is there a way to delete user specified lines from text view?

Attempting to write a delete function. I am building an app to list courses after a button is clicked. I am using a text view to display this information and appending each course with a new line. Now i want the user to be able to delete a course. I was thinking if i can keep track of which line the user is on right now, then i can also tell which line the user will like to delete. Thoughts? Maybe there is a better way of doing this, perhaps using labels instead of text view?
EDIT: Use table view /s
You should use a UITableView to create a section for "Courses" and create rows in it with your courses.
And you should handle the insert/delete with the UITableView methods.
Check this out, or similiar tutorials out there.
Perhaps you could use a UITableView to achieve this. One benefit to using a UITableView is you can use built in functionality for deleting and creating new items. Here is a guide on UITableView.

making views for quiz type of application

I am working on a project, in this project after login user has to answer 199 question.
there is for kind of questions like true/false, single selection, multiple selection, and short answer
so can you guys tell me what approach i should use to make views, becoz client strictly saying that each question will show on single screen.
Thanks
Yes I have create this type of Application.You just use the One Custom Cell and make design of your view and return your array in Tableview cell. so it is better to use custom cell. Otherwise you use PageView Controller to display Question.Even I have also use this and it works fine.

indexed list with static cells

Newbie here,
A couple of questions:
I must use a static cell type in order to use an indexed list, correct?
I ask this because I've created an app with dynamic prototype cells and have realized
that I want to use an Index List for navigation. It's a dictionary app.
If I must a static cell type, how do I add a search bar?
I want users to be able to search at the top as well as use the Indexed List. Like
Contacts.
How do I go about converting my code for each tab (there are 5 of them) to work with
static cells instead of dynamic prototype cells?
I' feeling fairly lost right now. Would it be better to start from scratch?
thanks
I think that you can use dynamic, but better will be when you show some code from your app.
You can ceck this video for some experience with static, dynamic and custom cells:
http://youtu.be/fnzkcV_XUw8
Sorry for write this as answer but i cant adding comments for now.

ios filter options similar to the apple store (dropdown list)

I'm trying to figure out how to make a filter option similar to the apple store's filter options. The first thing that came to my mind are dropdownlists similar to websites. But it doesn't seem to have it on the objects options in xcode. Was wondering where should I start in order to make that kind of function.
It's similar to this
http://www.insightguides.com/docs/halo-asset-manager/images/apps/berlitz-cruise-2013-ipad-6.jpg
Unless you guys can recommend something else? Looking at this, it seems to me it's just a popover? If this is so, I am in need of 4 - 5 filters, does that mean I should create 4 - 5 viewcontrollers to popover? It seems like a lot of space is being used just for filters, not really sure how to dynamically generate it using just 1 viewcontroller.
Thoughts?
Assuming all your filters look the same but have different data then you could just have one FilterViewController and change its data source depending on the filter type.
And yes, that does look like a simple UIPopoverController.
So when you have to display a new popover create a FilterViewController and assign it the appropriate data source. You can use delegation to inform the parent class which filter was selected and use the data source to tell the filter view controller what data it should display to be filtered.

Resources