How to make a popover non-modal? - material-ui

I am trying to have popovers over console.log(), helloword(), and others. However, since popovers in MUI are modal, I cannot show other popovers unless I click outside the popover that is currently opened.
Is there a way to disable modal behavior?
So far, I forced non-modality via properties:
style ={{width:0, height:0}}
modal={null}
hideBackdrop={true}
disableBackdropClick={true}
disableAutoFocus={true}
disableEnforceFocus={true}
What about a modal={true|false}?

Related

Accessible custom modals in SwiftUI

I'm trying to make a custom modal view in SwiftUI be more accessible with VoiceOver.
I've set .accessibility(addTraits: .isModal) but VoiceOver till focus elements under the modal. So then I tried to set .accessibility(hidden: true) when the modal is visible. That kind of works, but VoiceOver focus the element closest to the position of the button that opened the modal, but it would be more logical to focus the first element in the modal.
Not sure how to solve this and what the best way forward is.
Gist with code for popup.
https://gist.github.com/tfsjohan/80e9e39287f65fc044222468b834d74b
What it worked for me was to set .accessibilityElement(children: .ignore) to the sibling views and sending UIAccessibility.post(notification: .screenChanged, argument: nil) before presenting the popup.
In that way, the components behind the popup aren't available anymore during the navigation, and the screen change event moved the focus of the voice over to the element with the highest priority.

Creating a Drop Down Menu with Xcode 4.3.2 Storyboards

I'm a noob at Obj-C, and especially at the concept of storyboarding. It seems like storyboarding could be so awesome yet it is not intuitive at all.
I'm trying to make it so when this button is pressed, the user will see a drop down menu letting them pick from either All, Read, or Unread:
Do I drag a new view controller out and put in a drop down selector in that and then segue to that view from the button?
P.S. What system icon should I use to represent the read/unread filter? The one I have just isn't right. =]
P.P.S. This project is open source: https://github.com/kirkouimet/enzyme
Well, I guess the most native control for this would be a scope bar, but this must be attached to a search bar, which may not be what you're looking for. The scope bar basically would only appear when the search bar is the first responder (i.e., when it has the keyboard's focus).
If you're developing for iPad, you could use a popover controller. Simply create a view controller to manage the buttons for your filter and use a UIStoryboardPopoverSegue to transition to them.
These two questions involving popover segues may help:
- iOS - Create an Popover View using StoryBoard
- UIStoryboardPopoverSegue opening multiple windows on button touch
You may also want to consider using a segmented control inside a toolbar—using the UISegmentedControlStyleBar style—and situating that above the search bar you already have. Then you would just create a IBAction method (probably in your root master view controller) that responds to the UIControlEventValueChanged control event. You can use that to determine which segment was selected to do your filtering.
Something like this...
From top to bottom:
Navigation bar
Toolbar
Flexible space
Segmented control
Flexible space
Search bar
Table view

Tab Bar with popup buttons iPhone

I want to have this type of bar at the bottom of the application and whenever a button is clicked new buttons should popup, which one of them when clicked should take me to its connected view
You shouldn't use Popup as control, I'll recommend you to use it like a notification as this is not Apple way of showing controls.
Here is a nice link from boctor iDev recipes.
You can find here custom UITabBar as well Notification
I would suggest you not to try customizing UITabbar. This will go against the normal behavior of UITabbar and Apple may reject your app for tampering with normal behavior.
You can try having a UIView with a set of buttons in them and bring the similar functionality as in your image.

A bug in iphone sdk?

I have a UIMenuController calling a modal view, however the context menu doesn't hide itself upon calling the modal view. The context menu always hides itself when it's out of focus. I don't think this is the right behavior.
The menu controller probably has no idea you've presented a modal view controller, so you just need to hide it yourself using setMenuVisible:animated:.
I haven't used UIMenuController myself, but that sounds like reasonable behaviour to me.

Why is a UITabBar considered Modal?

Reading the Apple documentation on the UITabBar states,
The most common use of a tab bar is to
implement a modal interface where
tapping an item changes the selection.
With my definition of Modal being:
A modal view is one that has to be
dismissed before you can do anything
else.
But that's not always the use case. I could be interacting with the content view of the UITabBar's first item/button, and that could allow me to reach another view.
OR, I could select another item/button from the UITabBar and reach yet another view.
So how is that considered Modal? (Or is my use case not Modal, and they are just saying, in general, its used Modally?)
I think "modal" here means different "modes".