I am trying to create a simple app that displays a list of items with check boxes next to each item, then give the user to simply check each box. Nothing (aside from the checkbox image switching) needs to happen when the check box is touched.
Each checklist is a seperate NSDictionary contained in a single master NSDictionary. The checklist dictionary contains arrays for different sections of each checklist.
At the top of the view, the user selects which set (dictionary) of checklists they want to open then I want that checklist to display underneath the picker once a "select checklist" button is pressed.
Any ideas on the best way to get this done?
The easiest thing is to use a UITableView with the accessoryType set to UITableViewCellAccessoryCheckmark for the marked cells. You can find lots of tutorials on working with UITableViews, and it'll be very simple to do what you're describing. For changing the data set, a UISegmentedControl is probably the way to go (if you weren't planning on using that already).
Related
Good Afternoon/Evening/Morning Folks,
I recently encountered a discussion with another developer on dismissing a UIPickerView. We work on a legacy enterprise application that had a lot of issues and was written very poorly (among other things). Since then, we revamped and fixed a lot of bugs with this program, strictly adhering to Apple's Human Interface Guidelines as much as possible while keeping to original requirements.
We seem to have a difference in opinion as Human Interface Guidelines do not really go into any detail about picker views. We implemented our new UIPickerView with a "Done," Button to confirm a selected value to be placed in a UITextField. Screen's input would be locked until they selected a value or clicked done.
Legacy application prior to our changes allowed users to utilize a done button but also by way of tapping a value selected in a picker. In addition, legacy application would also show selected UIPickerView value in UITextField prior to selection, wiping out original contents , if any was selected prior to opening a UIPickerView.
So, What is correct way to implement a UIPickerView per common practice or Strict Apple Documentation (if any exists). What is common practice?
Sorry, I cannot post any screen shots or code snippets due to business process reasons. I will do my best to explain if any questions arise.
Thanks,
We can figure this out through apps designed by Apple. Here are two examples
1. Contacts
Find a contact person in the Contacts app and set birthday. The picker shows up. While you are dragging the pickers, it does not set value to the text field. It happens only when you release the wheel. There is no Done button to hide the picker it self. To dismiss it, you can either click on the done button on navigation bar to end editing for the whole page, or click on another text field which pops a different keyboard.
2.Setting - Date&Time
Basically the same as Contacts app. Here you cannot even dismiss the picker.
I have a table on a WKInterfaceController. I'd like to have a set of menu items (WKInterfaceMenu) when the user force-touches on some of the rows, and a different set of items for the other rows. Also, I want to make it so that when the user force-touches on a row and then selects a menu item, I can trigger an action that is specific to the row and menu item selected by the user. Is this possible?
Force Touch menus and other elements of watchOS are currently completely separated, so there isn't a possibility to realize such a thing. Also, Force Touch is not able to locate the position of the touch yet, it only says that the screen was force touched.
Take a cup of coffee, wait one or two years and then you will be able to do it for sure.
I'm creating an app and I need some help with design.
Launch Screen - I want to show 6-8 "category" buttons with labels loaded from an array ("normal" buttons from interface builder - not tab bar buttons or menu bar buttons).
Table Screen - When one of the category buttons is pushed on the launch screen, I want to show a table view with all of the items in that category.
Detail Screen - When one of the items on the table screen is selected, go to a new screen with details for the item. There will be an action button on this screen which will remove the item from the list if pressed.
My questions are as follows:
1) I don't want to show navigation buttons on the first screen. Can I still use a Navigation-Based application and hide the navigation controls on the first screen, or would it be better (easier) to create a view-based application and put a navigation controller "inside" one of the views? I'm totally open to any basic design approach suggestions you may have.
2) I've figured out how to create a sqlite3 file, add it to the project, query it, and generate the table view from the results, but I'm not sure about how to store the sqlite file in a way that will persist on the device when the user upgrades the app later. Any pointers on that?
Thanks for any help/links/documentation you can point me to. I've watched a million tutorials but none of the ones I've seen really address basic app design.
Now for Q1, both ways work fine but if you have buttons from the first screen, having a uinavigationcontroller might make it slightly easier if you plan to have back buttons on the screens after the first screen.
For Q2, to make the database persist when the user updates their app at some stage, simply keep the original database and include a new database (with a different name) with additional content, then modify your original database and import any additional content to it.
You can also do variations of that also, ie import content from old database to new database and etc. But the key is to keep the database file names different, ie add database_v1.sqlite, database_v2.sqlite and etc.
BTW don't forget to clean up any databases you won't use in future.
I've looked everywhere and I can't find it.
I have a UITableView that contain rows of "checkmark" cells.
The user clicks on a row to check/uncheck it.
(It works!!!!)
But I also want to allow the user to EDIT the data on that row.
... so I have an "EDIT" button at the top. The user hits it and is allowed to DELETE any
rows. (That works too!!!!)
But how do I also detect a "tap" on that row.
Where is there some kind of a didSelectRowAtIndexPathWhileInEditMode ????
(Is that really the best way to do this: Allow "selections", and "deletions", and "editing" of each row?)
You should switch on allowsSelectionDuringEditing for UITableView from code or Interface Builder
I'm currently looking for a way to provide the user with being able to select multiple items from a collection of values.
I know this is done in the mail app whereby you can go into the edit mode of a folder and select multiple items by clicking on the circle on the left hand side.
What I'm unsure about is how this is achievable. Is anyone familiar with how to reproduce such functionality?
Thanks,
Matt Delves
The easiest way is this:
Provide a UITableView with all values the user can select.
Keep a mutable array with one object (e.g. an NSNumber) per table row to store each row's selection state.
In tableView:didSelectRowAtIndexPath:, toggle the selection state in your array for the tapped row and set the tapped cell's accessory type to checkmark or none, depending on the selection state.