i have a scrollview with some subviews. Inside this subviews i have other subviews.
i want to present a popover that is anchored to one of this "nested" subviews.
I correctly show the popover, and it is anchored to the corrected subview, but whenever i scroll the scrollview, the popover doesn't move with the scrollview. I would like my popover to move and to adjust its "x" origin every time i scroll the scrollview horizontally.
This is the code i use to present the popover.
func showAlarmViewController(notification: NSNotification){
    troubleViewController = TroubleshootViewController()
    troubleViewController!.modalPresentationStyle = .Popover
    troubleViewController!.preferredContentSize = CGSizeMake(300.0, 150.0)
    popoverMenuViewController = troubleViewController!.popoverPresentationController
    popoverMenuViewController!.permittedArrowDirections = .Down
    popoverMenuViewController!.delegate = self
    popoverMenuViewController!.passthroughViews = [self.detailScrollView]
    popoverMenuViewController!.sourceView = (notification.object as! UIView).superview
    popoverMenuViewController!.sourceRect = CGRect(x: -100, y: 100, width: 300, height: 150)
    presentViewController(
        troubleViewController!,
        animated: true,
        completion: nil)
}
any help please? thanks!
 
     
    