How to make a simple TableView? - ios

I've been searching and trying stuff for like 4 hours and I can't get to make a simple TableView in iOS. Just like every app does..
Examples:
I want to achieve something like dropbox does, just to have a login..
The last thing I tried and was the closest was to add a TableViewController, then a TableView inside it and then 2 TableViewCells inside it, but then when I add the elements in the Cells they just don't appear in the phone !!
Also I can't get to make a "padding" just like dropbox does, I think that maybe that is not a TableView, is it?
I am just a bit confused.. I watched 3 different videos but they are outdated, also the doc is..

In your storyboard change the content property of your table view from "dynamic prototype" to "Static cells"

Related

TableView with bar to change content on top, how to build it?

I have to build a tableView with a top bar "slider" like the one in the youtube app in the picture below.
I just wanted to ask if it's better to:
Use just one tableView and switch the content by changing some switches in the delegates methods and reloading all the rows
or
Use two tableViews and hide the one that's not displayed
If none of the two methods above is the best one please point me in the right direction, thank you.
Option 1 :
Take a UISegmentView on the top and have a single UITableView. Change the content of UITableView on valueChange event of segment.
Option 2 :
Have look at this awesome library by Yalantis - Segmentio. I have myself used this on couple of occasions. Handy when you have to horizontally scroll the segments (exactly what you need in your case). You can have a single UITableView for this as well.
Option 3 :
Check out another useful library by Yalantis - Persei. Just hard scroll the table to see these options. Again, single UITableView.
In all, the best solution, in my opinion is to have a single UITableView. Working with multiple tableView might seem a clean way for a start, but trust me, maintainability is the key and having a single UITableView would be a better approach.

Upward expanding Accordion TableView in iOS

I want to implement an "accordion" TableView in iOS, something like in this link.
But one small change, I would like the TableView to be at the bottom of the screen, and have the sections expand upwards instead of downwards.
I would like this to be supported in iOS7 and up. Support for iOS6 would be nice to have, but not mandatory.
I've been searching for a solution for the last 3 days and tried many different libraries, but no luck. Any ideas on how to implement something like this? Is this something that's possible to do with any library I use? Or do I need to find something with that specific functionality?
You may try this one library I had Used for something same..https://github.com/vicpenap/VPPDropDown
This is definitely possible.
I don't know whether there is a framework but I can suggest you using simple inserting of table view rows.
Apple doc on table view
But you will definitely need an advanced table row management

IOS table view inside of a table view

I have a table view with expanding cells for each of them. I want to make every expanding cell be a new table inside of the bigger one. Is that possible? I've done the research, someone said that duplicate UITableView cannot put in one file.
For example
dish order1
=================
dish order2
rice
coke
===============
dish order3
which every "dish order #" is a cell of a table, and when you expand one cell, there will be a smaller table appears. I've done all the expanding stuff. But don't know how to put a small table into a bigger one. Thanks
Well if i understand your question correctly, what you search is called nested tableView, here's some examples:
SDNestedTable
ExtensiveCell
CollapseClick
JKExpandTableView
Good luck.
It would likely be impossible to put one table view inside of another table view, and if you did manage to do it, it would be awful. Ask yourself, have you EVER seen this in a commercial app? If not, as a novice iOS developer, you are out of your depth trying to invent new UI paradigms.
Master the existing UI tools first. Don't try to use the UI elements in totally novel ways until you have a strong feel for the standard way to use them. Expect this to take 6 months or more.
Others have suggested a sectioned table view where initially only the first element of a section is visible, but when you tap on it, it expands to add other rows. This works quite well.
Another approach would be to use a master/detail UI, where tapping on one table view cell pushes a new view controller the uses a new table view to display detail information about the previously selected item. There are some use cases where you might have several levels of increasing detail.
I really do not think you want two instance of UITableView, instead what you want is a sectioned UITableView which expands when it's header is tapped. Apple has a good sample code for this here:
UITableView expand/collapse
i have demo for you , just got from github..
https://github.com/mitsBhadeshiya/ExpandingCell
i hope this is helpfull for you...
Have you considered using one UITableView with multiple sections? You can accomplish what you are depicting above with only one tableView.
Since this was a problem for many people in the past, iOS 9 has a thing called Stack View, it does exactly what you are saying.
Check out this article.

iOS static table in a view?

Sorry if this is a really silly question but I'm new to iOS. I'm trying to do this:
The table cells are static as the content shouldn't change (the options are the same all the time). I also need to place the submit and cancel buttons below and replace the red background with an image.
My problem is, I get the error saying:
static table views are only valid when embedded in uitableviewcontroller
So my question is, how would I embed a table inside my view, like any other element?
Thanks in advance for any help :)
There are two relatively simple options to build a screen like that:
Make your controller a `UITableViewController, add two sections to the bottom of your static part, and put custom cells with buttons into these two sections, or
Define the static content of your table in code.
The look of your screen will change slightly for option 1, but it is important only when you have many cells, forcing the sections with buttons off the screen until the user scrolls.
The second option requires writing some code, but not too much to cause you too much inconvenience.

implementing uitabbar to uitableview

I want to put a uitabbar into a section in uitableview, I have hard time looking a way for it, since I just started doing XCODE in less than a month. Anyone there know the solution for it? Any help is appreciated, and if possible, could you share a link for the tutorial or examples as well. Thanx in advance.
You can't do it in this way. They both are different things but you can have UITableView inside the uitabbar view. But vica-versa is not allowed ...this is not feasible and also not proper as per apple's guideline. So, please make sure not to use in this way...rather go for some other alternative :
like put Custom UIToolBar in header of tableView , having look & feels like Tabbar.
You cannot put a tab bar into a tableview.
I you want to use a tab bar, use it as a sub view of a UIView.
The UITabBar is supposed to contain other views. So no, you cannot add it to your table view. To get the look and feel of the Groupon app, there are two things you could do:
1. Create a custom tableviecell as advised above.
2. Since the toolbar (which looks like a tabbar) is outside the actual table, you can have it as a separate view and reduce the size of the table to accommodate it. Or add the toolbar to the footer view of the table.

Resources