Popup window in swift for tutorial view - ios

What is the easiest way to create popup window in swift?
For example I have a button called “Help”in the login screen and when I pressed Help button the tutorial screen will appear and blur the background.
I have tried NMPopUpView but didn’t luck to get it work.
Thanks.

If i want a stylised popup then I will create a new Nib file and design it in there. Then when you want to show the popup you can load that NIB and animate it in, upon closing it you can animate it out.

Related

How to add a view that overlaps a tableview in iOS

I want to make a tutorial in my iOS application and I have a tableview with a drawer.
For the first time that the user enters in this screen, a tutorial overlaps the screen first, and disappears after the user taps OK.
Like this
I've tried this tutorial:
http://swiftdeveloperblog.com/creating-custom-user-interface-files-with-xib-in-xcode-6-and-swift/
in which I can use in a UIView but not in a tableview.
I hope someone can give me a hint on how to do it or what to use.
Try this for tutorial view Controller
https://github.com/ariok/BWWalkthrough
In your FirstView controller,
1) Create instance of tutorial ViewController
2) Present that Tutorial ViewController
There is a close button delegate method in BWWalkthrough, i.e. walkthroughCloseButtonPressed() in this method dismiss your tutorial viewController.
I just made a temporary solution to my problem.
I made an image like this:
Create a ViewController and put the image, then add label and button (edit cross dissolve as transition type).
Show this view controller for first time users and go to the next view controller if the button is clicked which is the real view controller(the one that has table view and sliding menu)
The problem here is I need to have different images for different screen size if I really want that the user wont notice the tableview spacing, but it still looks fine.

How to set up toolbar when hovering

I want to create a sort of toolbar that shows up when you tap on a certain part of the screen, e.g. If I'm building a image editor, when the user clicks on the top of the screen it displays all the tools. Whats the best approach for this?
Why not just use a popover view activated by a button?

Customized iOS popup/alert

I wonder if there is an example code of a customized iOS popup/alert that has a "X" button on the top right corner. I found MTPopupWindow that does so but it only allows fixed message to show. I'd like to dynamic generate the message for the popup.
You could present a view modally and have a custom button on the top right corner. The button type would be UIButtonTypeCustom. Create a delegate of the modal view to the main view (for receiving the action of the close button).
You can also have a look on MBProgressHUD and maybe extend it to show a closing button on top.

Tapping background to close subview in Xcode 4.3

Currently I am creating an app. for the ipad that uses a media player. When you click on a button the media player pops up and I have code that when you press another button the media player stops and is hidden so you can go back to using the superview. The problem is, I dont want to have to click a button to close the subview, I want to be able to click anywhere on the background to close. I've tried making the whole background a button but I'm having trouble writing code to make it so that the full window button that closes the subview ONLY appears when the subview is up. Right now the full window button is up constantly so I can't click on the button that brings up the subview in the first place because the large button is overlapping. I hope this dilemma is fairly easy to understand. If not I can send some code.
Try a UIPopover instead. What you're describing is the default behavior.

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