I have a table view with one prototype cell where it have an switch and i need when i click on it, it opens a new line for user input a information like de reminder app. See images below
How can i add theses new lines on my table using swift??
https://stackoverflow.com/a/33187198/3882338
Make 2 different cells and reload the table view accordingly.
Related
I am trying to display a table on the home view with 10 potential cells.
I need to press a button, go to the next view and select which cells I want to use via switches.
For example, if the switch is on, the cell is displayed. If the switch is off the cell will not be displayed and there will not be a gap between displayed cells on the previous page.
Uses the switches to control the data source for your UITableView, the best way to do this would be to break out your UITableViewDataSource into a separate class and then you can modify the data source array from your second view controller. I think this tutorial would be a good starting point
I want to build TableView like this.
Click Here to See Table View Mock up Picture
It is not problem for fixed cells.
But problem is cells are variable.
As you can see the picture, if you press "Mould" in 2nd section then 3rd section shows Mould cells only.
These properties are all in every section.
How to build table view like this?
I'm working on a sample iOS app and want to load (in a tableViewController) certain data based on the button the user presses at the top of the view. For example, when the user loads the page it will by default load data from "myPosts" but on the top of the view there will be two buttons "My Posts", "Not My Posts". If they then select the "Not My Posts" button then the tableview cells will be reloaded with the data from "notMyPosts". Anybody know how to do this?
So, the best solution here is to use a Segmented Control. Basically, you will have a controller for each TableView and a controller for the SegmentedControl.
This tutorial and this question gives a basic idea on the segmentedControl and how to set the basic controller for it. You will basically have a Container View with a view for each tableView you want to display and show/hide it based on the selected segment on the SegmentedControl.
This is how your storyboard will look like:
Just use two different datasources for your table, depending on which button the user selects.
So, when the user taps on a button set a variable to keep track of which button they tapped, and then reload your tableview.
I have a table view which contains multiple rows data from service,i want to display a new tableview(t2) with sliding animation over a tableview(t1) when selecting a row of tableview(t1). the tableview(t2) can contain some data from server pass by selecting row value.
Adding TableView inside Other Table view in not possible. Another way to do this is you can use Master-Detail UI.
I have a UITableView that is separated into sections with one row each. Each row contains a horizontally scrolled UICollectionView. I am wanting to add the functionality for editing this list when I tap a general edit button in the top of my Navigation Controller. The issue that I'm thinking of is that all of the content will still move around and be active (tapping on a cell in the CollectionView will open a different page). I am wanting the edit mode to either disable that functionality or slide all of the content over simultaneously and have an edit button next to them all. When this edit button is pressed it will take the user to an edit page specific to that rows content (so no delete functionality here). Another reason why I am having a difficult time is that all of the content in the table will be loaded via data so I don't want to reload any of it.
Bottom line is that I need to select a single row and it must be done via a button that slides in or altering the functionality of the content there to act as a button. I cannot reload the data in the rows, though because it is loaded via internet data.