1

I am facing a problem I cannot solve alone. At least, I don't know what's the right way to program this. I am writing an app which will open a PopupView as a Subview of my main menu when pressing + . This looks like this:

enter image description here

As soon as this subview is visible, I want to perform different segues (when pressing button 1,2,3 or 4) so this popup can change the view to 1-4:enter image description here

I created a separate Storyboard for this popup and when pressing +, the initial view of it will be added as a subview:

let addFilePopup : UIStoryboard = UIStoryboard(name: "AddFilePopup", bundle: nil)
animations.showInView(self.view, aView: addFilePopup.instantiateInitialViewController()?.view, animated: true)
// the method for adding the PopupView as a Subview
func showInView(superView: UIView, aView: UIView!, animated: Bool)
{
    aView.center = superView.center
    superView.addSubview(aView)
    if animated
    {
        self.showAnimate(aView)
    }
}

Showing the Popup itself works so far, but as soon as I press one button, the segue of the Popup is not performed... Do you have any hints to me for this problem? Besides, is this the right approach?

If you also could let me know how I can make the superview.alpha = 0,5 and ignoring touches without taking affect on the subview that would be great too. Thanks in advance!

MkaysWork
  • 625
  • 1
  • 7
  • 11
  • I don't think you have to create a new storyboard. You can just create a new view controller, link the views properly (using segues if you prefer) and then use that view controller as your popup. – Henny Lee Jan 05 '16 at 18:03
  • I am creating the new Storyboard to have a better overview, but will try that to so I can see if there is any difference. – MkaysWork Jan 05 '16 at 18:05
  • Can you show us how you create the popup? – Henny Lee Jan 05 '16 at 18:06
  • What exactly do you mean by that? The Form of the Popup is 600x600 (Freeform) and centered with it's SuperView before added as a Subview. – MkaysWork Jan 05 '16 at 20:24
  • What dose your segue code look like? How do you plan on returning from the segue? – MwcsMac Jan 05 '16 at 20:46
  • It's an simple show segue from the first popupview to the next one. No coding required for this – MkaysWork Jan 05 '16 at 20:50

0 Answers0