load uiscrollview same as uitableview - objective-c

I need to make a cell having a larger length with no of sub views and i am having a no of these cells.i added all of these cells in UIScrollview,When I scroll scrollview I want that it load just like as UITableView Loaded. Please Suggest Some Method With Code.
Thanks In Advance.

You need not to use UIScrollView. I prefer having custom UITableViewCell which would be reused.

Related

How to change size of UICollectionViewCell inner elements?

I've got a UICollectionView with 3 custom views inside each UICollectionViewCell. I need to make these 3 views bigger in one cell, but I couldn't find a way to access size properties of these views. Is there any way to do it?
Thank you in advance.
If you're subclassing UICollectionViewCell, you can resize them in layoutSubviews. If you're building the cell in your controller, you can assign the subviews a tag, and get them later using viewWithTag:.

How to display tableview within a cell of other tableview?

I want to display a UITableView within the cell of another UITableView without using custom cell.
I tried to display it using a customCell, it is working but that is not convenient for me. So I would like to present the UITableView within a cell of other UITableView without using customCell
Can anyone tell me how to do this?
Many thanks in advance.
You should use a custom cell for this kind of thing. I don't think there is a way to implement it without a UITableViewCell subclass.
Look at this tutorial for some inspiration:
How To Make An Interface with Horizontal Tables Like The Pulse News App

scroll last Cell to top of UITableView

on my last cell is a dynamic textview. With bigger contentSize it will be stay on top of the tableview (to see it, while you fill it on keyboard), but if the textview and also the cell is going to be dynamically bigger: [tableview beginupdates] and [tableview endUpdates] will delete my contentSize. And after that it is scrolling it down to bottom of tableview.
Any ideas how to scroll the cell to the top, and create the cell also dynamically without changes on contentSize? maybe I'm thinking on the right way, ideas?
EDIT
Hmm..not any "correct" solution found...the best way for this purpose is to try set any new cells or sections below the textview to get this cell easy to top of the view. After this its easy to use it with beginUpdates and endUpdates. The cursor will be always in the textview, textview will be dynamically bigger also the cell, so the only easy way.
Another option is to set the uitableview as a subview of another scrollview (uitableview himself has one) to scroll up an down in the new scrollview.
Thanks for help.
From my experience, Text views in cells is a very tricky issue. I recommend just using the free Sensible TableView framework, which has text view cells available out of the box.

Custom scrolling drawing layer over UITableView

I've been struggling with this issue for days, so I hope someone can help me out...
I have a grouped UITableView with several cells. I want to draw some custom graphics above the UITableView that would scroll with the content of the table. Specifically, I want to draw a line with dots, joining the UITableViewCells (across the sections) like this:
Of course if we have more cells than what the screen is capable of displaying, the upper layer with the custom drawing should move with the underlaying cells.
I've tried to subclass UITableView and override it's -drawRect method, but it didn't work. Even if I wouldn't call [super drawRect:rect], the table content displayed without problem.
I've tried to add a new subview to the UITableView, but it changes it's size dynamically when it gets the cells and sections from its datasource... I'm out of ideas...
Although the Web is full of custom UITableViewCell samples, I haven't managed to find anything similiar to my concept...
Can anyone help me how to achieve the above mentioned feature?
First your should subclass UITableView. Then create another UIView and add it as a subView of your custom UITableVIew.
Next override the contentOffset property of the UITableView.
-(void)setContentOffset:(CGPoint)contentOffset
{
[super setContentOffset:contentOffset];
// Custom code here. Update custom subview here.
}
This method will be called as the UITableView is scrolled. You can then adjust the offset of your subview and update its drawing.

Unload specific UITableViewCells

Is there a way to unload/release a UITableViewCell such that the containing UITableView calls cellForRowAtIndexPath: when it is needed again?
I understand that this is exactly what UITableView does by default, but only once the cells are outside the tableview frame. My custom view uses UITableView in such a way that its frame == content size.
If there is no way to unload specific cells, I'll have to think of a different approach.
The method [UITableView reloadRowsAtIndexPaths:withRowAnimation:] allows you to tell the table view to reload one or more cells. This will reload the specified cell(s) if they are on screen and presumably do nothing if they aren't currently on screen. Sounds like what you want though your question is not entirely clear to me.