I have a UIScrollView inside a cell but when the cell is selected the view disappears in the background how can I put it back to foreground. Thanks
JVPython
It's possible you aren't properly setting up your UITableViewCell so that selection doesn't cover up the cell contents. Perhaps you are adding the scrollview to the cell directly and not to the contentView of the cell?
The Apple documentation describes the layout of a cell and what happens to those elements when a cell is selected: Table View Programming Guide
Have you tried:
[self.view bringSubviewToFront:myScrollerView];
Related
I have a TableViewCell with three Views. I'm using AutoLayout and UITableViewAutomaticDimension for the rowHeight. What I want to achieve is that when a user clicks on a cell, the blue view as well as the whole TableViewCell gets expanded (animated), like this ...
I couldn't come up with an idea to solve this, does anyone has a hint?
enter image description hereenter image description herei am trying to make a push to another view controller when i tap a cell that is on a scrollview but when i use the func didSelectrowAtIndexPath and run a tap the cell nothing happens ....
do you guys have some ideas ?
thnx !
From looking at your screenshot you do not need the scrollview inside the tableview as a tableview itself adds a scrollview for you. Try removing this (and adding the cells straight under the tableview hierarchy) and see if it works.
If not add some code to your question about how your view controller is set out etc.
I have a UITableView embedded in a UIViewController. The TableViewCells are rows for the user to select something, so when they touch it a checkmark appears, heres where my question comes in:
I dont want the UITableView to scroll in its window, I want the TableView to grow with the items it contains. Do I need to put a scroll view on the UIViewController and then the TableView on that? Or will the ViewController scroll if the content is bigger than the View?
Also, Im not even sure where to start with changing the height dynamically of the UITableView, everywhere I look its about changing the cell heighets dynamically.
Please Help! Thank you!
self.tableView.scrollEnabled=false;
stops the scrolling
self.tableView.frame=CGRectMake(0, 0, (float)width, (float)height);
sets the size of your tableview
But I don't understand why you want to stop tableview scrolling and to scroll the whole view....
I am working on a app where I want to expand a tableviewcell to cover almost all the screen with animation when it is selected by user. I am looking to create a uiview on the tableviewcell and expend it to cover major portion of the screen when user selects the row.
The main problem I am having is to get the frame from where my pop up view will start expending. How will I get the frame of the row which is touched?
Thanks
Pankaj
Is it crucial that the cell should not reposition?
If not ( i am guessing not, as you are anyway planning to cover whole screen):
When the cell is selected, scroll the cell to top (using scrollToRowAtIndexPath) and either insert your custom view to cell's contentView or modify its parameters if its already there with different opacity/size etc
Use UITableView function to get the rect for the row by passing the its NSIndexPath.
- (CGRect)rectForRowAtIndexPath:(NSIndexPath *)indexPath
I created an application using a UITableview.
But when I scroll the table view, I see a white space view before and after the table view. How can I fit the UITableview so it doesn't show that empty view?
Here's an image of what happens when I scroll the UITableview.
Set the bounces property of the UITableView to FALSE.
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScrollView_Class/Reference/UIScrollView.html%23//apple_ref/occ/cl/UIScrollView
(UITableView inherits from UIScrollView)
The answer is...
tableView.bounces=FALSE;