Skip to content

Row Highlight Issue #27

Description

@Andy0570

When I set a default callback for onTap property on ScrollStackRow instances. And set ScrollStackRowHighlightable for UIViewController instance, row highlight color is not work.

Example Code

I tested it on the official example.

ScrollStackController/ScrollStackControllerDemo/ViewController.swift

...
stackView.addRows(controllers: [welcomeVC, notesVC, tagsVC, galleryVC, pricingVC], animated: false)

// Add callback for `onTap` property for first row
stackView.firstRow?.onTap = { row in
    print("First Row Tapped!")
}

ScrollStackController/Child View Controllers/WelcomeVC.swift

extension WelcomeVC: ScrollStackRowHighlightable {
    public var isHighlightable: Bool {
        print("Func: \(#function), line: \(#line)")
        return true
    }

    public func setIsHighlighted(_ isHighlighted: Bool) {
        print("Func: \(#function), line: \(#line)")
        self.view.backgroundColor = (isHighlighted ? .red : .white)
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions