in Blueprint.js when I try to use popover into an overlay. Second one close by popover closing - overlay

When I try to use popover inside Overlay, it closes when popover close. It looks like popover's closing remove something from body element.

Related

How can I load into a different view in a popover?

I have some code that opens a popover window that displays some text. This is done by an action segue rather than actual code in a storyboard. Is there any way, that I can load into a different view by pressing a button on the popover view and have it load into the next view? I've tried using another action segue, but it puts a popover into my current popover over the button that I press. Thanks!
This kind of thing can't be done with just storyboards; some code will be necessary.
Here's how I would do this: instead of trying to use two separate popovers, use one popover with kind of a "nested" setup. The popover's content view controller would contain, say, a Page1ViewController and a Page2ViewController. When first displayed, the main controller would install page 1's view. You could maybe wire the action from page 1's button directly to the main controller, but I recommend that you use delegation for this. Create a protocol that's something like Page1ViewControllerDelegate and adopt the protocol in your main controller, then in the delegate method for page1ControllerRequestTransition(_:) or whatever you choose, just grab the page 1 view out and swap the page 2 view in. You can even have the two views be different sizes; the popover will automatically adjust itself.
Oh, and don't forget to disable translatesAutoresizingMaskIntoConstraints and add appropriate constraints to fix the four sides of each page's view.

Hide a custom iPhone control when another portion of the screen is tapped

My problem is thus: I've created a custom view, a numeric keypad, that I display when a button is pressed. When anywhere else on the screen is tapped, I want to hide the keypad.
I solved the problem by overriding touchesBegan:withEvent. Then a hit test tells me if the numeric keypad was pressed. As long as the keypad wasn't pressed, I hide it (by setting its hidden property to YES).
It works, but I don't like it. Its not very clean. My other option is to have a view controller for the numeric keypad and display it as a modal view controller. The keypad view would have a transparent background. I don't like this method either.
Any ideas?
A simple solution would be to have an invisible UIButton that you add to the view when the keypad comes up and remove along with the keypad when it is tapped.
Of course, the tap you get on the UIButton will prevent you from using that tap for anything else, so your interface wouldn't work while the keypad is there.

Where should I "save" changes in my iPhone view to 'create new' of an object?

I have a view that creates a new core data managed object, and fills in all the required properties and also allows optional ones. I originally had a "Done" button on the top left, and when that was pressed, I validated the object then saved and removed the view.
Now I have an edit/done type setup on the top right, so sometimes there are two identical "Done" buttons on the top of the view. I want to switch the left side button so that it just has the normal "Back" button, then somehow validate and stop the view from being removed if it doesn't validate. I can't find any way to capture the method called by that back button and modify it, and viewWillDisappear doesn't work cause there's no way to abort the disappearing.
How can I make this work? I need to validate this, then save, then remove the view if validate and save worked only.
It sounds like your view is a perfect candidate to be pushed modally instead of through the navigation controller stack.
Push the view that creates your NSManagedObject modally:
[self presentModalViewController:yourViewController animated:YES]
Then continue to use your top right EDIT/DONE button for editing/validation as you currently are and when validation is successful simply save your object and dismiss the modal view controller from the parent view controller:
[[self parentViewController] dismissModalViewControllerAnimated:YES];
For more details check http://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html#//apple_ref/doc/uid/TP40007457-CH111-SW14
If you still want to use a button on the left hand side perhaps you can change the right button to say EDIT/CANCEL and add a DONE button on the left side that is only visible when you're not in EDIT mode. If appropriate you can point the DONE button to run through the same validation process before dismissing the modal view using the code above but it probably makes sense that the EDIT/CANCEL button takes care of it.
I hope this helps.
Rog
There is no documented way to intercept the standard back button of UINavigationController. If you want this functionality, your only option would be to customize leftBarButtonItem with a custom button.
When the user taps that button, you can first validate your object and then call popViewControllerAnimated:.
It's hard to mimic the look of the built-in back button, though.

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

Toolbar moves up when call finishes

While in a call, if the user wants to use my application, and if the call finishes, and the user is still in the application, the toolbar moves up, well all the view moves up, and so the toolbar now has a space in the bottom. Basically the height "Touch to return to call" has. I am using a toolbar and a navigation controller. The navigation controller moves fine, and everything in the view moves accordingly, the only problem is with the toolbar. So the question is, Is there an event, which is called after the call is finished, so I can set the frame again of my toolbar? I tried this delegate with no luck:
- (void)application:(UIApplication *)application willChangeStatusBarFrame:(CGRect)newStatusBarFrame
This one is called only when the toolbar is changing orientation.
alt text http://is.hn/downloads/IMG_0008.PNG
alt text http://is.hn/downloads/IMG_0009.PNG
Thanks.
In general setting your auto resize masks properly should fix things. Could you update with a screenshot to show exactly where the resizing issues are happening?