I have a collectionView in my app that when the user taps one cell of it, the collectionView will reload data, in detail, I have an album that it could contain another album when user choose one of them it shows albums inside of that.
Now I want when user click on backBarButton the past data appears on collectionView (super-albums), but now backbarButton shows the past VC.
I use navigationController and show module segues between VCs.
Q: How should I implement that?
If your changing view on collection cell press. you can reload the collection view on viewWillAppear.
Related
I want to show a ViewController where it has two UIViews, just like finder in Mac.
The left view contains a tableview with items.When user selects an item the right view displays tableView with related data.
So the next requirement is that which ever tableView is shown on the right side is editable for selection of sub items in rows and once the editing is done it should keep its state, so that on selecting the second item and re-selecting the first item, the tableView should show all the selected sub items.
You can refer - https://www.raywenderlich.com/94443/uisplitviewcontroller-tutorial-getting-started
That is called splitviewcontroller or master detail controller
I have an app(my first) that has several view controllers.
VC1 - is an tableView with a name & image. (a list)
VC2 - is a View with name, image and two buttons. (list add/edit view)
Data passing between these two views works fine using protocols
VC3 - is a tableView with another list. (items for first list)
I have a Button on VC2 that segues to VC3.
So a user enters the first TableView and taps on a tableViewCell, it segues to the second View for editing that selected list. While in the second View(not a tableView) the user taps a button which segues to the third TableView to add/edit the items. Then the user taps the done button sending the user back to the second View.
This is my issue - how do I pickup/associate the list name from VC2 to VC3. When the user taps doneButton the items should be associated with that one list that the user was editing.
thank you, newbie
Here is a good tutorial from apple showing you how to do just that. The basic idea is that to add things to a table view. Have an array of objects in the VC1 that contains everything you want to show. Then pass that array to VC2 (which in turn passes it to VC3) using prepareForSegue. Here is a good segue tutorial.
For editing (moving and deleting cells), this had native support so you won't have to roll your own. The bottom of that tutorial link shows how to enable this.
The basic idea for deletion is that you want to remove the element from the array and then redraw the table view (VC1) without that element. Failing to keep the table view and array in sync will result in a crash.
I little confused with configuring detailed view with MMDrawerController and without navigation controller.
I have TableView with custom cells inside ViewController. When users presses cell i want to show another ViewController with details about selected item. For this case i use didSelectRowAtIndexPath method from my tableview.
There are many cells in my table, that is why when user presses "back" button on detailed view i want to navigate to selected cell not to the top of table. What types of segues i should use?
I have a tabbed application with a TableView in the FirstView. I want to be able click on a cell in the TableView and load a new view.
Right now, when the cell is clicked I go to the view I want but it isn't part of the tab bar controller (as in I I don't see the two tabs on the bottom) and I also can't get back to the FirstView where the TableView is located.
I have seen tutorials on this but they are all starting from scratch. I already have a lot of content on my FirstView so I don't want to start over.
I think I have to put in a Navigation Controller but I don't know how to do that without starting over and I also don't know where I would put it.
Here is the StoryBoard for my app:
http://i.imgur.com/2YJMMD5.png
I am not sure if I understood what you are trying to do but try to control click from your cell in the Home Table View Controller to your Friend View Controller, this will create a segue from the cell to the view controller so the view controller will be called once the cell is clicked.
Please let me know if this is what you are going for!
All you need to do is select your table view controller, go to the Editor menu, and choose "Embed in Navigation Controller". This will insert a navigation controller between the tab bar controller and your table view controller. Now when you select a cell, you should use a "show" segue to go (via a push) to your new view controller.
i have a table view filled with landmarks that leads to a detailed view and i want to know how can i add a next and back button on my detailedViewController to navigate between the landmarks that i have on my tableview with out having to go back to the tableview
thanks
Wrap your detailView in a UIPageViewController.
Then the user can swipe left and right to receive the next/previous landmark detail view, or use your buttons for navigation.
When you're instantiating the UIPVC, pass the array if landmarks used by your tableView so the UIPVC's delegate methods know how to select the next landmark.
Basically, every landmark will be a page that the user can navigate to.