UITableView with UISearchDisplay and Checkmarks - objective-c

I´ve got a TableView with a Searchdisplay and when the user tabs on a cell, the cell accessoryType toggles between none and checkmark. That works fine, when i´m using only the tableview. But when I select a cell while i´m using the searchdisplay, the selection won't be applied to the "normal" tableview.
Maik

can you show me or tell me which type of data you are showing on table. and are you using a simple array? i have a method for solve this problem.
NOW i give you a tips when set chekmark you need to make changes in orignal array.How?When will you explain it. Then i can give you good method to do this.

Related

z-Position for background of a UITableViewCell

I am trying to put the background of a UITableViewCell on top before selection and reverse it after.
The reason is that there are Label and images which prevent the selection but it is working where this is nothing but the background.
I tried :
cell.backgroundView.layer.zPosition=10;
cell.layer.zPosition=10;
Unfortunately it is not working.
If anyone has an idea to solve this problem, I will really enjoy it.
Thank you in advance.
I finally found a better way to do that.
I have completely disabled user interaction on every cells before selection. Like that, no need to put the background in the first z-Position.
I used the following method at the creation AND the didDeselectRowAtIndexPath method:
cell.cellView.userInteractionEnabled=NO;
I put YES on the didSelectRowAtIndexPath method.
It works perfectly.

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

UITableView + UITableViewCell when UISegmentedControl is pressed

I want to ask a question about UITableViewCell.
Apparently, this is what I want to achieve.
I have a page where I display one question at one time. So, when the UISegmentedController on the top right is pressed, I display another question and so on.
please see the picture attached or here: http://dl.dropbox.com/u/27303579/StackOverflow.jpg
Note that I use UITableView (Group style) to display my question. The question text is actually the Section Header.
*All the questions come from Web Service.
My question is:
What should I do when the NEXT (TOP RIGHT CORNER) button is pressed ? What can I do to refresh my page ? Do I need to reuse the current UITableView or how ?
Thanks a lot for your help guys. I hope I make myself clear. really appreciate it !
When the arrow is pressed you can update the data in whatever data structure you have that populates your table cells, and then call [self.tableView reloadData]. This will trigger the UITableViewDataSource functions again, using the data structure to repopulate your table. Of course, cellForRowAtIndexPath will need some handling so that it knows how to draw the cells based on what data they are supposed to display.

NSOutlineView selection does not work

I have an NSOutlineView with a custom datasource (I don't know if this is relevant).
I have only one column (again, I don't know if this is relevant) and I want to perform a specific action upon cell selection, so I thought I should override outlineViewSelectionDidChange. This what I did:
-(void)outlineViewSelectionDidChange:(NSNotification *)notification
{
NSLog(#"selection changed");
}
But this is not working. I have been playing around in IB with the Outline View, the Table Column and the Text Field Cell properties but so far I had no luck. I don't know if I changed any property that caused this situation or if this is something specific to my specific implementation.
So, anyone's got any clue on what I may be missing?
EDIT: Just in case I'm mis-interpreting the selection concept within an OutlineView, I expected the cells to be selected if I just click on the text outside the area of the expand arrow.
Well after a long struggle, as always, just after I posted my question, I found the answer. The problem is I am using the NSOutlineView in an NSPanel and somehow the NSPanel is not allowing the cells to be selected. If I just move the NSOutlineView to an NSWindow it works just as intended.

Prevent updates to NSFetchedResultsController whilst table view is in edit mode

I am using an NSFetchedResultsController with a data source that is updated in the background. This is working really well - as new objects are saved to the managed context they appear in the UITableView. However, this leads to the problem I'm having.
When you swipe to delete a cell, putting the cell into edit mode, if at that point an object is created which pushes the cell down in the table view, the position which the cell occupied will be in edit mode, and not the cell you selected. Basically, the UITableView retains the edit mode on the original index path, without adjusting for the movement of cells.
Is there any way to get around this? Thus far everything I've tried has lead to a dead end.
reminds me of a problem i had when reordering uitableview cells.Look at 'Responding to changes' in NSFetchedResultsController reference. It shows a way to temporarily disable the change notification. I used it for reordering, maybe you can get inspiration from it to solve your problem too.
kind regards
y