I have a uitableview with multiple sections. I want to let user edit all rows of one section. The text is originally displayed with UILabels in section (Say section B). Is it possible to do something like this?
Add an extra section (Say section C) with UITextView, and the same content as section B, But keep it hidden.
Add an edit button somewhere so when user hits it, Section B hides, Section C shows up with two option buttons (Update, Cancel).
Depending on what they choose, perform the action (say submit to server if Update is clicked, or Cancel and move to step 4 if cancel button is pressed)
Hide the editable section C, Show section B (with new content if edited).
OR is there a better way to do this?
Related
In whatsapp, when we go to any particular user then at right corner there is more option (three dots menu). Then after clicking that menu, one list will come and again at last row there is navigate arrow, then after clicking on that row again new menu will come.
here is the images,
after clicking on more option, following view will appear
I want to implement this feature in my iOS Project. Anyone have any idea how to implement it ?
You can manage it with multiple ways!
First Way : Take two table view for the menu. Initially keep one tableview hidden. Then on more's click of first tableview, show second tableview and hide firt one.
Second Way : Take only one tableview and reload different data. I mean on click of main change your datasource for tableview and reload it.
DropDown menu's are considered bad practice in iOS. Use one UIAlertController to show first options, than on selecting the More show another UIAlertController.
I am making a fitness app using swift 3.
What I am trying to do is to have a text field where the user enters the exercise then under that another three text fields (one for the sets, reps, and weight). When the user clicks the "Add exercise button" underneath it repeats these text fields so the user can fill in the next exercise and so on.
How do I get the four text fields to pop up again after the user presses the "Add exercise button?
Thanks
Make Simple TableList. when hit Submit button just increase Field List Count . TableList has only cell in start .
func addNewField(){
FieldListCount = FieldListCount + 1
tableView.reloadData
}
You can do that with UICollectionView and add footer to collectionView. For example:
Create a collectionView, each cell in collectionView has some textFields. And footer of this collectionView has a button "Add new exercise".
When button is tapped, add new cell to collectionView.
Preferred Solution :
User Custom Text Field view and on the press of submit button, after that add that TextField View into UIScrollView with increment in Y position. If use tableList some textField will not be created(not in memory) until the user will scroll the table list.
I have a custom cell where it displays a table like structure with multiple columns.
Each row has a column that is a button that will perform different tasks.
My issue is trying to get the middle column to communicate its state with the other rows.
Initially everything will be grey (not selected) but, when I tap the middle column button, the state will be green. When I select a different row that button will turn green and the previous row would be grey.
Again, each column in the row is a button that does something different (i.e. the right button loads up a modal view). I have tried to use
didSelectRowAtIndexPath but, with the overlapping custom views it does not seem to read the selection.
Any help would be appreciated
I have two questions:
How can I create a Right to Left form in XLForm (Right label and
Left TextField or other widgets) I tried to get the label or text
field frame but that wasn't helpful.
How can I create a multi valued table with reorder and delete
actions that last button perform a segue and then the result creates
a new row. Assume I want to add multiple pictures and the last row
of table is "Add New" button. but my problem is a delete sign will
appear at the left of that row too. On the other hand I don't want
to add a row like a text filed but I want to set a segue result as
new row.
I have a fairly simple but working app right now; it's my first app and I'm working through the processes.
There are 4 Tab Bars with Table View controllers with a plus button on the top right. The user clicks that button and is presented modally with a Modal View Controller. They are asked to fill in 4 sets of information in text fields and when they click save, it saves it to the Core Data database, dismisses the View and adds that information to the Table Views. Let's call the items that the user fills in:
Name
Title
Date
Amount
The 4 tab bars are just different views of the same information. For example, Tab Bar 1 has Date as the section header and name, Amount and Title in each row. Nice and easy.
Tab Bar 2 has Name in the section title with Date, Amount and Title in the row. Tab Bar 3 has Title in the section title, etc. You get the idea.
Rather than just doing this though, in Tab 2, 3 and 4, I want to actually JUST have the section headers as buttons of some form that when clicked, takes a user to that particular entry. For example, in Tab Bar 2, I have the name as the section - I want to remove the rows associated with that entry and have just sections (or buttons) with the Names; I click on a name and it takes me to another view controller which will contain all of the Title, Amount, Dates, information, etc.
My question is, what's the best way to go about this approach of removing the rows in the sections and somehow making the sections clickable buttons?
My thinking is rather than use tableViews, use buttons, etc, but is there an elegant way to do this with having already implemented NSFetchedResultsController for each of the table views in each of the Tab Bars.
Any assistance would be massively appreciated.
Thanks,
EDIT:
I have just thought of a possible way to achieve this and it would be great if anyone could validate my thoughts. Rather than create a button, have a UICollectionView in the Tab 2, 3 and 4 providing the attributes from Core Data. So the UICollectionView for tab 2 can assign the NAME attribute to the label inside the Cell and then it can act like a cell and be clicked on. This sounds like the most feasible way to achieve this.