I am trying to create a "delete" button on the "Edit Item" page, which can be reverted when pressed On the previous page, delete the related entry in a It starts with an IBAction method on the "Edit Item" page, which is basically nothing but feeds the key to be removed from the back page controller: This is where the verb actually starts (on the list page): At the beginning of that method, there are 8 objects in the Then when that method is complete, the breakpoint immediately jumps on it: But from the first line of From my limited experience with these types of things (I'm definitely still starting), I think that this is something to do with the Can a new man help and tell where I am going wrong? Or if this is easy, can you recommend a better solution for removing an entry in a Thank you in advance for your help ! Do you know how the property works in C-2.0? I will declare a property in my parents view controller to include my _currentItemsArray declared as a strong reference. ; In addition, set up a weak asset in your childViewController (which you want to delete) Set property on childViewController at push Instead of calling a method on your original controller, remove the item within the childViewController within the array By doing this, you do not need to sort the array again to see. WillAppear Instead, just ask to reload the tableView Any meaning It may also be wise to include your logic inside the CellForAraetIndApath, the NumberofForce Insight and other tableview data source methods. NSMutableDictionary , and then update the tableview list of entries.
- (IBAction) deleteItem: (id) sender {[_parentController removeItemWithDeleteButton: [_ mainFactoidTextField text]]; }
- Remove the (zero) item tag Del.button: (NSString * ) Key {[_currentItemsDict removeObjectForKey: key]; [Self. Navigation Controller PopWebControllerUnited: Yes]; }
_currentItemsDict , which goes to
removeObjectForKey: after 7. Then this is the ViewController above, which is the "edit item" page, returning us to the list of entries.
viewWillAppear: ,
_currentItemsDict is back in 8 objects. Since then everything works fine, but it is working with all the original 8 entries, which means that nothing was found.
popViewControllerAnimated: method , But I can not understand whether I have heard of some different variables in different ways which they can come back in the form of their own, but I have not wrapped my heart around this concept Or maybe it's completely something else, I I do not know. I can tell that
_currentItemDict has 7 objects, and then one row later it comes 8 times.
NSMutableDictionary from a different ViewController? (Code samples and tutorial links are appreciated because I am currently not only sufficient, sometimes unable to translate my theory into theory!)
@property (nonatomic, weak) NSMutableArray * parentItemsArray;
childViewController.parentItemsArray = self._currentItemsArray; [Self. Navigation controller Push ViewController: animated childViewController: Yes];
[self.parentItemsArray removeObjectAtIndex: indexOfKey];
No comments:
Post a Comment