Tool bar button items not responding when searchDisplayController is active on ios7 - iphone

My application has searchDisplay Controller and a tool bar with Bar button items on it.My problem is that when i tap search button ,search results are shown but my Bar button doesn't respond to click event on ios 7.But the same thing works fine for ios 6.
Bar button works fine when i tap without searching.I understand that bar button is not reactive when my searchDisplay Controller is set active.
I am unable to find the reason and need to over come the issue.

It's not working as your SearchDisplayController is handling the touch event and as such doesn't pass it through the responder chain, down to the bar view.
You can manually pass the event through so that your bar responds to the touch if required.
Check this out: What's the trick to pass an event to the next responder in the responder chain?

Related

Cant' dismiss a UISearchContainerViewController on tvos

So I'm working on a full screen tvos video application. No Tab bar, No Navigation Bar.
I've been trying to add Search functionality to this app.
I'm using a gesture during development to display the search feature.
I instantiate the results controller from my storyboard, then programmatically add that results ViewController to a UISearchController and then wrap that in a UISearchContainerViewController.
I then add that UISearchContainerViewController to my parent ViewController via: addChildViewController, set frame, view.addSubview, didMoveToParentViewController....
(per https://developer.apple.com/library/content/featuredarticles/ViewControllerPGforiPhoneOS/ImplementingaContainerViewController.html)
This successfully displays a functional search controller full screen over my now paused video.
BUT, when I try to dismiss the search ViewController it won't go away...........
I attempt to dismiss the UISearchContainerViewController via: willMoveToParentViewController(nil), view.removeFromSuperView() and removeFromParentViewController... The view does not disappear...
I've verified that the gestures are being called... and I've gone so far as to verify that the parents childViewController no longer contains the UISearchContainerViewController... but the Search interface remains??
I've simply hiding the UISearchContainerViewController for grins... it does not go away!?
I'm going to try a modal presentation as a fallback, but it's not the desired solution... and now I'm personally bugged as to why this doesn't work.
Any help will be greatly appreciated.

Buttons of one particular view controller are not working

On tapping one button of first view controller, I am navigating to second view controller with performSegueWithIdentifier(identifier is given in storyboard and working fine).Second view controller will be shown in Landscape mode.
In second view controller there is a mapView(google). below the map, there is one button; on top of the map there is one more button, but both the button actions are not working.
userInteractionEnabled, enabled , accessibility all are correct.
Action methods are also dragged from storyboards properly and have been properly connected.(Removed and even connected again also)
Still action methods are not getting called. Buttons are also not clickable there.
Couldn't find the reason. thanks for help.

Programmatically hiding a view controller from a tab bar application

I am working on a tab bar application. Is there a way I can programmatically hide one view controller from the scroll down list and from the "edit" list (but still be able to pop it on screen with a certain action, i.e. by calling its tabbarcontroller index)?
The problem is that I have now so many viewcontrollers that completely fill the "edit" screen. So I want to hide some of them and be able to trigger the hidden ones trough some action performed on one of the visible ones.
Thanks

IOS - Prevent page curl in PageViewController

I have a UIPageViewController that displays images. I've set an opportunity to mail a desired image that the user is currently viewing. For this if user taps once the central region of the screen a tab bar appears with a bar button item titled "Mail". And when this button is pressed the imaged is attached to a mail composer. But I have a little problem here: As the bar button is on the left edge when I tap it page curl takes place and I can't get the mail composer-more precisely I can't get the button tapped. How would I prevent page curl when this button is pressed?
There are several ways you can overcome this problem. The second solution is easier to implement.
The first one is to access the gesture recognizers defined for the page view controller (from the "gestureRecognizers" property, which returns an array of gesture recognizers), search for the "tap type" gestures and then assign them a delegate to your view controller. This delegate will implement the method gestureRecognizer:shouldReceiveTouch: and will check if the tap occurred in the tab bar position and will return NO in such case, so the gesture will not be triggered. Your delegate will return YES if you still want the tap but it is outside the tab bar region.
Another possibility is to define a new tap gesture recognizer and assign it to the tab bar. In such case when you tap over the button (which is in the tab bar) the target selector that you assigned to your tap gesture will be triggered. Clearly, this selector will do nothing as its purpose is just to avoid propagation to the gestures which are beyond it (this is the default behavior).
I think my answer came too late from your request, so if you have found a better solution please post it!

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