-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
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)
}
}
Metadata
Metadata
Assignees
Labels
No labels