single popover ui angular bootstrap - angular-ui-bootstrap

I have been using Angular-UI Bootstrap popover for my project. I have multiple popovers in a view.
The functionality required was to have a single popover open at a time. I could have used "focus" as my trigger. But using it will close the popover if I click on the content of the popover.
I have been able to achieve this programmatically by following #Kim Ras solution in this thread
But the problem is that I am able to close the popover only when clicking popover button.
What I want, is, to be closed if I click anywhere on the page other than the popover content.

Related

Dismiss iOS form sheet modal via outside tap + VoiceOver mode

On an iPad, you can use controller.modalPresentationStyle = UIModalPresentationFormSheet to show a centered modal on the screen. A common technique is to allow the user to dismiss the modal by clicking "outside" or "behind" it. This is covered in numerous other answers (Iphone SDK dismissing Modal ViewControllers on ipad by clicking outside of it,
Dismiss modal view form sheet controller on outside tap), usually by adding a tap gesture to the view's UIWindow.
My question is, how do I make this accessible to users in VoiceOver mode? The native action sheets allow clicks outside the sheet to dismiss, and even prompt the user, saying "double tap to dismiss popup window". How can I expose the UIWindow tap gesture in the same way?
From Apple:
https://support.apple.com/guide/iphone/learn-voiceover-gestures-iph3e2e2281/ios
Dismiss an alert or return to the previous screen: Two-finger scrub
(move two fingers back and forth three times quickly, making a ā€œzā€).
If the modal sheet is opened, we can prompt the user to "make a z gesture" to go back.
There is basically no way to do this with the FormSheet presentation. You can use the Popover presentation, but it behaves differently in some cases.
My solution was to check UIAccessibilityIsVoiceOverRunning() and add an extra close button element to the top of FormSheet that can be clicked via voiceover. I also implemented accessibilityPerformEscape for the global escape gesture.

iOS - SlideMenuControllerSwift and UITabBarController

In my app I'm using UITabBarController and SlideMenuControllerSwift together.
https://github.com/dekatotoro/SlideMenuControllerSwift
The problem is managing the back button. When I'm in one of the tabs and when I click on some element and go inside to another view the menu button still stays there and is not replaced by the back button.
Are there any sample repositories or other libraries that already do this? This should be a very common use case.

Disappearing accessoryInputView on menu open

I am using ECSlidingViewController in my project and I also have a messages view, in which I have an accessoryInputView to imitate the iOS Messages app. Now when I open my menu on this view, the accessoryInputView slides down and is nowhere to be found. I can no longer find it under the UITextEffectsWindow in the debugger's UI Hierarchy view.
Where did it go? Do I need to call it back? If so, how?
Disabling the menu gesture on the detailpage (of a navigation controller that was on my menu in my case) fixed the problem.

Display Dashcode Browser in App with SIngle NavBar

How can I display a Dashcode created Browser template in a UIWebView, that the user can dismiss, without having two navigation bars? In the photo below, you'll see that the top bar is part of an Xcode navigation controller with a back button for the purpose of letting the user leave the web view. The lower bar is for the Dashcode created stack and pop of the content hierarchy that the user navigates.
As far as I know, you can't put a button in a web page, Dashcode or otherwise, that will dismiss a cocoa app view controller. If I hide the Xcode navbar, the user can't get rid of the web view when they're done. I can't hide the Dashcode navbar or the user can't navigate the content.
As some background, what I'm trying to accomplish is in-app documentation that I host on the web. Similar to how the Apple iPhone Cards app does with its Help view. This would allow me to update the documentation via my web page, without needing to update the app itself.
The answer appears to be floating a Done button in a transparent view that floats over the top of the web view. Thereby giving the effect that the Done button (from Xcode IB) is part of the NavBar from Dashcode Browser template.

iOS connect my view to popup on button press

I have two xibs, one is my title screen with buttons, the other is a more specific window that should come up when one of the buttons is pressed.
This isn't switching the whole screen, just a popup window, where clicking outside of the bounds of that window will make it disappear leaving only my title screen remaining as it was visible behind this popup view. This is similar to my understanding of "modal views".
Anyway I do not quite get how to connect it to the button on my title screen. I have the views made in IB ready to go. I'm not sure if I have declared all objects to satisfaction yet.
From what I understand I think I need a UIViewController or something, but its all a pretty thick fog of information right now
insight appreciated, or links to proper noob sources would be helpful
Does your title screen have a view controller (or is your app delegate the main controller object)? You will want to add an IBAction to that object, connect the button to it, and then present your other view controller modally (or in a popover) from there.
A popover will appear in a small window with an arrow, and tapping outside will close it. A modal view controller typically slides up into place, and you have to press a cancel button to close it. This guide explains how to use a popover. Using a modal view controller is simple if you have a view controller: [myViewController presentModalViewController:nextViewController animated:YES].

Resources