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:
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:
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!