Remove cell accessories with Mono Touch - mono

How can i remove all the cell accessories within a table with the press of a button?
I wanted to go through all the table rows and set the accessory for each cell to none. To do this you need to know the indexPaths to be able to get the rows. This isn't possible within Mono Touch (but is in native code!).
Does anyone know how to solve this?

Have the button cause a table refresh, and set some flag that will tell GetCell() whether or not the accessory should be drawn.

Related

Do-this-next Indicator as Accessory View in UITableView?

I want to add a small indicator (like a green arrow or small circle) to indicate to the user what to do next in my iPad app (apparently some of the users can't figure what to do first, even tho' I have instructions in a drop-down help file). The indicator would be visible on the left side of the row and only on the row which would be the next action to take (user should tap that row to get the next sub-view to appear).
Any ideas how to accomplish this? (I looked on SO and Google and didn't find anything that was pertinent).
Add an image view to your prototype table cell. When you want to indicate that a given row is the next thing to do, set the image of the image view for that row to your indicator image.

UICollectionView does not reveal all cells in Simulator

I am not very experienced with UICollectionView and Auto-Layout.
I have a very basic UICollectionView inside a root view. The root view seems to have a Navigation Item.
I created a custom cell which is really a square in proper size to allow 2 such cells per row using the FlowLayout.
There are 8 such cells in the view - it is basically a grid. I have absolutely no constraints on the view.
The collection view occupies the entire size of the root view according to the IB and in the editor, the first cell is placed right under the navigation item which is perfect.
However, when I ran the app in the simulator and scrolled the collectionview all the way to the button, I see only a partial fragment of both cells in the last row. I can see I have scrolled all the way down...
Obviously there seems to be some sort of overflow...but I would have thought uicollectionview would automatically handle the overflow and make all the cells visible?
When I set number of items in IB I can see that the cells in the last row are only partially visible.
Seems like content size of the collection view is not right - that's my guess..
What do I need to do to adjust things in IB so that all of my cells are visible...I do not want to hardcode any values in the code...
Thanks.
Solved. It turns out simulator does not show the entire collection view...the same shows fine on the device... What a headache...

How to display the full text on hover over cell in UITableView?

In a UITableView, I am having a set of values, some of which have a value longer than the width specified/drawn. I want a way to show the full value on hover over that cell, like we have on web pages.
Please advise a way to achieve this.
Since you really can't hover on a touch phone, I would use a UILongPressGestureRecognizer and have the action display a smaller subset view on the screen over the table view with the cells details.

How to skin the UITableViewCell image used when selecting multiple rows?

When you put the cell in edit mode and allow multiple cells to be selected at once, the UITableView shows a checkbox on the left of the cell, like below.
How do I change that image? Changing the cell.editingAccessoryView just adds another accessory to the right, instead of changing the left one.
Apologies for reading the question wrong at first. Best I can find at the moment is the multiSelectCheckmarkColor property on the tableview. This technically isn't what you are asking for... however, if simply changing the color is a sufficient solution for you then you might be interested this option.
The only working solution I know is not using the default editing mode at all.
You can easily add a custom checkbox to your cell and animate the cell to show it when entering editation mode.

Is there quick way to know what cell is out of device screen in UITableView?

I have tableView with a lot of cells. I need to remove cells, which user passes while scrolling the tableView.
cellForRowAtIndexPath is called when user scroll to this cell to perform its content and the question is there similar method to know what cells are out of the screen while scrolling?
Take a look at UITableView's visibleCells method. It'll tell which ones are visible. Then I'm assuming you know how many total cells there are and you can do the logic to work out which ones are not visible.