Stretchy header tableView in Swift - uitableview

I am new to Swift.
Now , I'm trying to make a try about Stretchy header in tableView which is something like “If you scroll to see more cells of tableView and the tableView will extend and cover the view top of the tableView; In contrast , it will compress in to a little size”.
Reference of this gitHub project
But, I have no idea how to implement in Swift .. can somebody teach me or tell me? Thanks

You can do this in swift using this pod
just install it
pod 'StretchHeader'
for understanding in depth see this tutorial...

Related

tableview smooth scroll best practices swift

It's a technical question, or about good practices...
I have this App, its a social network, where we have the timeline. In this timeline I have to render a lot of cells on a tableview which I have done this way:
create a Cell (with header, body and footer) -xib file
in this cell I have a method: setupCell() - which configures the contents
for each kind of post I instantiate a correctly view(xib) on body of this cell (like PhotoPost, TextPost or VideoPost etc) and configure constraint to set the size of views.
Also, I'm using:
tableView.estimatedRowHeight = 603
tableView.rowHeight = UITableViewAutomaticDimension
And kingfisher to download images asynchronous.
And, what is best way: storyboard, xib, or code?
So, my problem is that my scroll is lagging - I'm using reusable cells, but every time that tableview delegate calls cellForRow, I have to setupCell().
My first idea:
I get the post array with a task then a create cells for each post and append this to an array of cells, so when cellForRow is called I just get the right cell from this array.. It make better. But still not enough(I'm testing on a iPhone 5c).
My next ideia is create different cell for each kind of post, and save a variable for this cell of his size to setup on heighForCell method.
You think that looks good solution? Can anyone give me an opinion and suggestion? I'am very tankful in advance..
After experimenting with possible solutions I decided to use AsyncDisplayKit to solve my problem, it offers great smooth scrolling.
http://asyncdisplaykit.org
It's complete SDK and has well written documentation so was easy to implement. I would recommend it if you are struggling with a similar issue to me.

Swift-How to add a parallax header like the one in Spotify?

I was wondering if anyone knew what the best way of creating a similar tableview header effect to the one in Spotify was. I have looked at libraries such as CSSStickyHeaderFlowLayout, but they are written in Obj-C and are for CollectionViews. What's basically got to happen is that as the user scrolls to find more tableview cells at the bottom, the header stays in the same place and the top cells start covering it. This is seen in the example section of the git page of the library above.
Thanks in advance for any help!
Try using the solution found here
The original example uses Obj-C but the asker's response uses Swift. They also make use of TableViews rather than CollectionViews

UiTableView as Navigation method in iOS

please have a look at the attached image. I would like to build such a view to add some data to my app. Is the view shown in the image a UiTableView with custom cells? Is there a tutarial showing how to use an UiTableView for form elements (using siwft)?
Thanks
Suggest you look for a third party library that has already implemented what you want. If they're Objective-C you can still use them from Swift through the bridging header.
See this question for some ideas:
Existing iOS form framework

What iOS component is this? (Look at the picture)

Hi guys I've trying to figure out which iOS component is the one in the picture below (the one pointed by the arrows), its like a cell separator that gets stuck at the top while the bottom keep scrolling, you can also find it in the address book with the alphabet. If you happen to know any tutorial any tutorial also post it too. Thank you very much!
That is the section header in a UITableViewController or a subclass of UITableViewController (subclasses are used so you can write your own custom code). You can check out the Stanford cs193P course for more information. Table Views are covered in the 9th week.
Thats the TableView's section header

adding items to tableView in IOS

Can someone go help me figure out how to hookup the table view so that i can add items to the table view? I'm trying to make a news screen for this app and am having trouble adding data to it. I have the xib file all set up i just don't know how to hook it all up in xcode 4.
It looked like you have not use UITableView class before. I would suggest get one of the samples from Apple. Here is the link.

Resources