Closed zhuyu99 closed 7 years ago
It seems that only UINavigationItemView is related to LTNavigationBar. UINavigationItemView is non-public class.
You can try the following codes:
NSData itemViewData = [NSData dataWithBytes:(unsigned char []) {0x55, 0x49, 0x4e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x56, 0x69, 0x65, 0x77} length:20]; NSString itemViewString = [[NSString alloc] initWithData:itemViewData encoding:NSASCIIStringEncoding];
Then you can use NSClassFromString to get UINavigationItemView class.
This lib uses a hacky way to achieve the result, in the new iOS version, the structure of UINavigation is changed and this lib no longer works anymore, so please check these alternatives:
https://github.com/andreamazz/AMScrollingNavbar https://github.com/DanisFabric/RainbowNavigation https://github.com/MoZhouqi/KMNavigationBarTransition
不知道苹果抽什么风,Your app uses or references the following non-public APIs:
UIInputSetHostView, UIKeyboard, UINavigationItemView, UIPeripheralHostView
The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.