Closed StefaniOSApps closed 5 years ago
Did you import the library?
@import AMScrollingNavbar;
Yes of course, it's not my first framework.
first - connect with cocoa-pods
second - import Framework
I use Xcode v10.0
Ok, there was a missing NSObject
inheritance in one of the objects, so it wasn't exposed in ObjC.
It's fine now, checkout the updated readme.
Sorry, It's not working...
terminal said:
2018-10-10 21:44:00.012671+0200 Example[3341:505821] -[UINavigationController followScrollView:delay:scrollSpeedFactor:collapseDirection:followers:]: unrecognized selector sent to instance 0x10601d200
2018-10-10 21:44:00.013002+0200 Example[3341:505821] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UINavigationController followScrollView:delay:scrollSpeedFactor:collapseDirection:followers:]: unrecognized selector sent to instance 0x10601d200'
*** First throw call stack:
(0x1bb413ef8 0x1ba5e1a40 0x1bb32b154 0x1e82465c0 0x1bb419810 0x1bb41b4bc 0x1041f1088 0x1e7c5aa60 0x1e7c5b144 0x1e7bc20e8 0x1e7bc2da8 0x1e7bc40a8 0x1e7ba6298 0x1e86bbf44 0x1bf9f5a34 0x1bf9fa9c4 0x1bf9599d4 0x1bf9882f4 0x1e823336c 0x1bb3a2408 0x1bb3a1d08 0x1bb39ccfc 0x1bb39c5b8 0x1bd610584 0x1e8218bc8 0x1041f154c 0x1bae5cb94)
libc++abi.dylib: terminating with uncaught exception of type NSException
i made a example git: https://github.com/StefaniOSApps/Example
From the readme:
Make sure to use ScrollingNavigationController
instead of the standard UINavigationController
. Either set the class of your UINavigationController in your storyboard, or create programmatically a ScrollingNavigationController instance in your code.
Thanks for the hint, I had overlooked that.
Unfortunately, this does not change anything, even with the change it does not work.
I have the following log
2018-10-10 22:29:50.313147+0200 Example[3439:518696] Unknown class ScrollingNavigationController in Interface Builder file.
2018-10-10 22:29:50.392339+0200 Example[3439:518696] -[UINavigationController followScrollView:delay:scrollSpeedFactor:collapseDirection:followers:]: unrecognized selector sent to instance 0x10281c400
2018-10-10 22:29:50.392722+0200 Example[3439:518696] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UINavigationController followScrollView:delay:scrollSpeedFactor:collapseDirection:followers:]: unrecognized selector sent to instance 0x10281c400'
*** First throw call stack:
(0x1bb413ef8 0x1ba5e1a40 0x1bb32b154 0x1e82465c0 0x1bb419810 0x1bb41b4bc 0x100da5088 0x1e7c5aa60 0x1e7c5b144 0x1e7bc20e8 0x1e7bc2da8 0x1e7bc40a8 0x1e7ba6298 0x1e86bbf44 0x1bf9f5a34 0x1bf9fa9c4 0x1bf9599d4 0x1bf9882f4 0x1e823336c 0x1bb3a2408 0x1bb3a1d08 0x1bb39ccfc 0x1bb39c5b8 0x1bd610584 0x1e8218bc8 0x100da554c 0x1bae5cb94)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I have already changed the example of GIT according to the current state of knowledge. https://github.com/StefaniOSApps/Example
As the log suggests:
2018-10-10 22:29:50.313147+0200 Example[3439:518696] Unknown class ScrollingNavigationController in Interface Builder file.
You need to set the navigation controller to that class, that is present in the framework's module, like so (taken from the sample of this repo...):
perfect, it works now. could you add a objectiv-c demo, like this https://github.com/StefaniOSApps/Example
thanks 4 your help
I have one last question
My UINavigationController has its own "ViewControllerNavigation.h" and "ViewControllerNavigation.m" file
If I replace here in the ".h" "UINavigationController" by "ScrollingNavigationController" an error message comes up.
Unfortunately I can not select "ViewControllerNavigation" as class and "AMScrollingNavbar" as module. Only the combination "ScrollingNavigationController" as class and "AMScrollingNavbar" as module is possible.
Is there a simple solution here?
You can't subclass a swift class from ObjC.
Describe the bug I can not use the following line
what can I do?
Screenshots