IBScrollViewFloatingHeader
IBScrollViewFloatingHeader copied to clipboard
-[UIScrollView floatingHeaderView]: unrecognized selector sent to instance
This is probably a dumb noob question, but I'm getting an unrecognized selector when calling from Swift.
myScrollView?.floatingHeader = headerView
.
Also tried explicitly getting the selector: myScrollView.perform(#selector(setter: UIScrollView.floatingHeaderView), with: headerView)
. Same result. What am I doing wrong?
In LLDB, I can get the selector:
(lldb) p #selector(setter:(myScrollView.floatingHeaderView)) (Selector) $R0 = "setFloatingHeaderView:"
But...
(lldb) p myScrollView.perform(#selector(setter:(myScrollView.floatingHeaderView)), with: headerView) 2018-10-16 12:22:08.598233-0700 myapp[47655:11222566] -[UIScrollView setFloatingHeaderView:]: unrecognized selector sent to instance 0x7fe4a98e4600
I don't know what the problem was, but I ported the code to Swift, and that worked.