how do i pass a selected parameter into swift?

It is simpler to use block, like

private var _observer: Any!  // unsubscribed automatically on deinit

func addObserver(_ scrollView: UIScrollView) {
    _observer = NotificationCenter.default.addObserver(forName: name, 
                object: nil, queue: nil) { notification in
        // ... just use scrollView here

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top