Hey Guys i am trying to figure out how to build grouped textfields inside storyboards ? Any Ideas ?
Use a containerView in your main view and populate two rows as necessary. You'll need to add a Cell template to the tableView to avoid the static cell error message.
Related
I need to know how I add a collectionview within the header of the collectionview 'father', I have tried it in several ways but it does not work for me.
something like the following image:
You can achieve this using a separate xib file that will represente your header and than adding the new collectionView in it.
Go through below steps:-
Take two nib one for normal cell and one for header cell.
In Header cell take collection view
Decide which nib you have to load in cellForRow method using boolean flag or something else.
You need to define your own logic.
As in title, I don't know where to start with creating a view like this. Do I hard code it or use XCode editor? Is a table view what I need?
Yes, a UITableView is what you needed.
You need to create a TableView Controller.
Follow by creating a TableViewCell
Then you need to start coding. Hook up the delegate and data source methods.
For more information, check this tutorial by Apple:
https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift/
Here you have a tableView with section header indicating the date of the matches, the tableView has a custom designed cell, each cell contains the names of the two competing team.
start by adding the tableView to your viewController using storyboards, with the delegate and datasource connected.
the sub class from UITableViewCell and create your custom cell with an xib file.
I'm pretty new to Xcode and I'm learning. I'm trying to make a test app. I can't get it to show up in the app like I set it in my storyboard?
Add a UITableViewController and assign it to your tableView. And FYI in Xcode you design one cell only if you are using dynamic cells and the population of the cells will all happen inside your UITableViewController (hence the name PrototypeCell)
I have 2 viewcontrollers on my storyboard, which both have a tableview. Now I would like to implement the same cells in both tableviews. Is there a way to easily reuse these cells across multiple viewcontrollers?
Yes you can use it by using custom table view cell
Example for custom table view cell
You should reuse full UITableView for this case. There is no open API for sharing cells between multiple UITableViews, but you still can reuse UITableView in case there is no moment when two controllers are shown simultaneously.
Yes, It's possible you need to create .nib file with subclassing UITableviewCell
take a look on https://medium.com/#musawiralishah/creating-custom-uitableviewcell-using-nib-xib-files-in-xcode-9bee5824e722#.u8xounci2
you get to know , how to create & use .nib file.
I'm trying to display an image with a tableView like so (see image below).
But I'm not sure about the way to implement the red part :
is the red part in the header part of the table view ?
is the red part outside of the table view ?
is this in a custom cell ?
PS : Note that the tableView I would like to be with the picture would have various sections.
Thank you very much for the help.
In this case it's either a header or a custom UITableViewCell because it scrolls with the table. You can implement it either way.
Personally I'd start by making it a cell. That will allow you to use autolayout to easily tackle sizing and dynamic type.
create a custom view as per suthar's comment and add it to the tableview headerview ,
if you have more than one sections than u can use the groupped tableview instead of plain tableview...it becomes more easy..