CoreData Edit Row - swift

Trying to implement core data edit record.
Current Status : In the view did Load I have aded
self.navigationItem.rightBarButtonItem = self.editButtonItem
The edit button is appeared on the top left navigation bar. By clicking the edit button the red busy icons are appearing. if I click the icon then delete button appears. When I click the table view cell then nothing happens.
Desired Response: I want to call the edit table view controller so that the record can be edited.
I have added didSelect but it is only being called when the table view is not in edit mode.
How to call the edit view controller if I tap any table view cell with the edit icon appearing on the left side.
For example in the clock app. When you click the edit button the red icons appeared on the left side. If we want to edit the time then we can tap the table view cell i.e. alarm time and a view is posed up to edit the time. Same functionality is required.

In order for the didSelectRowAtIndexPath to work during editing, you have to set the allowsSelectionDuringEditing to true

Related

Navigation title / item disappears on switching tab bar item in action sheet clickedButtonAtIndex?

I'm really pulling my hair out over this one.
I'm showing an action sheet on the first view controller within my first tab bar item, when I tap OK, I'm switching to another view within another tab bar item, using the following code.
- (void)actionSheet:(UIActionSheet *)actionSheet
clickedButtonAtIndex:(NSInteger)buttonIndex {
self.tabBarController.selectedIndex = 1;
}
(I assign view controllers to a navigation controller, then to a tab within my app delegate, repeating the process for each tab).
On return from second tab, when I tap tab item one the title and info button has gone.
If I go to next view in the navigation stack within the first tab and back, the title returns.
Here's my first view, I'm about to tap the info buttons.
This shows an action sheet
Yes I do need all though buttons, tap on the second one
OK, it switched me to the second tab.
Now I tap tab one.
All my navigation items are gone!!!
I've also tried adding a label as a title using...
self.navigationItem.titleView
However this is lost too.
My theory here is that in my action sheet clickedButtonAtIndex event (where I've running selectedIndex), the event isn't finishing correctly before it switches to the next tab.
Here's the scenario
Any suggestions ?
Since this is such a complex problem I have created a
sample project.
Take this sample code... and then run. I don't have such problem

IOS, tableview filtering select with a search control

I am building a tableview list with a search control to filter it. My requirement is to let user select one cell quickly by input some keywords.
The UI is simple, a navigationbar with an OK button to confirm the selection, a searchbar below the navigationbar, and the tableview in the bottom.
The problem is that, when user try to filter the tableview, the navigationbar would be disappear, the whole screen will go to search mode, the searchbar would in the top of the screen. In that case, when user selected a cell, he/she could not click the OK button I put in the navigation bar to confirm the selection, he/she have to hit the cancel button of the search bar to exist the search mode and then click the OK button I put there. That is not I want to.
How can I deal with this, to make this operation more easier for my user?
Can you try UISearchDisplayController ? It works like an autocomplete box.
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UISearchDisplayController_Class/Reference/Reference.html
A search display controller manages display of a search bar and a table view that displays the results of a search of data managed by another view controller.
Example:
http://developer.apple.com/library/ios/samplecode/TableSearch/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007848
Hope this helps.

Need Suggestion for Add Button in Edit Mode of Table View

I have a tab bar app with a nav bar and table view. In the nav bar, the left is the back button to the parent view, the middle has the view's title, and the right button is the edit button.
I need to somehow have a button to add cells to the view. There is obviously no room in the Nav bar so I was thinking that when the edit button is pressed, the first cell in the table should be a cell that is also an add button. When the done button (which is the edit button just its text has been toggled), the add button cell would disappear. What do you guys think is this a good way to do this or do you have any suggestions?
Also, how would I start to implement this feature? Thanks.
My be this post will help you.
Edit:
Take a look to this tutorial

Remove UISearchBar on tableView click

I have a UISearchBar which is subviewed by another view when a button is pressed. When it loads, it looks like the following (minus the red scribbles):
I would like to have the UISearchBar view be removed from the parent view controller when the tableView (the area with red scribbles) is clicked and is empty (no search has been made yet). I'm having a difficult time figuring out the best way to do this.
I have tried to put a transparent button in that section and add it as a subview to the search bar. However the button is underneath the tabl view area, so when the table view is clicked, the search bar loses focus and the uibutton is only then accessible.
Does anyone know how I can remove the search bar from the parent view controller when the empty table view below it is clicked?
Thanks.
To bring the transparent button up and make it catch all touched first, use [button.parentView bringSubViewToFront:button].
Another approach could be to catch the search bar losing focus (since you say you see that happening), by putting
– (void)searchBarTextDidEndEditing:(UISearchBar*)searchBar
in the search bar delegate, and handling it from there.

How can I dismiss the view appeared by touching Add item in UINavigationController?

I have added add(+ symbol button) button to my navigation controller.
When I click it a view appears from bottom. I added a navigation bar and two buttons to it.
One save and one cancel button. And the view have one textEdit box. After editing I can save or cancel. If I touch cancel I need the view to disappear like it should go down again.
I think all iPhone , iPodTouch users use it. Like when they touch Add item then a view appears from bottom and when they cancel it goes down again. How can I make in this way in my application.
Maybe you're talking about a UIActionSheet?!?
http://developer.apple.com/IPhone/library/documentation/UIKit/Reference/UIActionSheet_Class/Reference/Reference.html