I have a uitableview and when I put it in the edit mode and reorder the cells , the native ui shows the cells separators/shadow while I drag the cell.
Is there a way to drag the cell without the shadow being visible ?
I have already set the setSeparatorStyle:UITableViewCellSeparatorStyleNone on my table view, however the shadow is still visible for cell being dragged.
Thanks!
Related
I have a tableivew, I want to add a coachmark on top of the tableview cell. and this coachmark is like a popup.
what I did is uncheck the clip to bonds in this tableview cell so it appeared correctly.
but what happened is when I scroll up/bottom this popup is covered by the previous tableview cell.
so any idea how to solve this issue with making the cell background clear because those cells are colored.
Use followings methods to change z axis distance for your coachmark view
bringSubviewToFront(_:)
sendSubviewToBack(_:) on coachmark or others cells
Example:
cell.contentView.bringSubviewToFront(coachmark)
I have an UITableView with varying height, and when pressing reorder control, in the cell view structure a new view appears. Normally it is not a problem, but sometimes its height is quite big, and it overlaps, with cell below.
Why this view appears?
How can I get rid of it?
Or prevent to overlap other cells?
This view is part of the reorder mechanism and can't be removed. It is used to hide the cell content while you drag a screenshot view above the tableview.
If you set the cell clipsToBounds as YES, it should prevent it's content overlapping other cells.
I have a UICollectionView with one section, 10 cells and horizontal scrolling using a Flow Layout.
One cell occupies the entire screen, and has a UITextView and two UIButtons.
How can I prevent scrolling if no button in the cell is selected, and if it is selected, how can I scroll to the next cell on a UIBarButton click?
I would also like to preserve selection in order to be able to go back to the previous cell and change the selection if needed.
I have a UITableView with custom cells. In the awakeFromNib of the cell custom class I add the cell labels etc. using AutoLayout. They display fine when viewed first time.
(Blue rectangle is a single UITableViewCell)
The problem is that after I swipe the table view so that some cells goes offscreen then back again (i.e. cells are re-layout) the cell layer gets cutoff.
Another way to debug is to go to Xcode, Click Debug>View Debugging>Capture View Hierarchy on Xcode 6+. It looks like there is possibly an unused view being added to the bottom left corner of your view? Try the view debugging to see if that's the case.
I have a UITableView and below the custom cell (in IB) I have inserted a UIView. The UIView gets set to hidden when viewDidLoad() gets called and is only displayed when there is no data in the UITableView. This works great and servers my purpose.
The problem is that even when the UIView is hidden, the scrolling on the UITableView considers the view to be present. i.e. The vertical scroll with scroll well below the last cell, covering the area where the UIView exists - even though its blank and nothing is displayed.
I have tried to hide the UIView but this doesn't help either. How do I get the scroll to not extend to the area covered by the UIView?
Edit:
The image on the left is how IB looks. I have added a UIView as a subview of the TableView. The image on the right is the large scroll space below the last cell.
Expected behavior: When the view is hidden, the scroll view only scrolls until the last cell.
If your view is displayed only when there is no cells, you could just add it over your UITableView (or behind it if your UITableView's background is clear) and hide it when you have cells to display. Just be sure to add your view as a sibling of your UITableView and not as a child view of your UITableView.