gpt4 book ai didi

ios - 如何将 JKAutoShrinkView 或 GTScrollNavigationBar 与 Storyboard一起使用

转载 作者:行者123 更新时间:2023-11-29 12:37:42 25 4
gpt4 key购买 nike

我正在尝试使用 JKAutoShrinkView但我正在使用 Storyboard,但我不确定如何翻译以下概念:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];

UINavigationController *navigationController = [[UINavigationController alloc] initWithNavigationBarClass:[JKAutoShrinkNavigationBar class] toolbarClass:[JKAutoShrinkToolbar class]];
[navigationController setToolbarHidden:NO animated:NO];
[navigationController setAutoNavigationBarShirnkEnabled:YES];
[navigationController setAutoToolbarShirnkEnabled:YES];

JKViewController *viewController = [[JKViewController alloc] init];
[navigationController pushViewController:viewController animated:NO];

self.window.rootViewController = navigationController;

return YES;
}

GTScrollNavigationBar 采用了相同的方法.基本上, Storyboard的等价物是什么?我假设问题是 initWithNavigationBarClass。但是知道的人应该可以告诉我翻译的情况。

最佳答案

只需将 Navigation Bar 的类从导航 Controller 场景中的 Storyboard更改为 GTScrollNavigationBar

enter image description here

enter image description here

关于ios - 如何将 JKAutoShrinkView 或 GTScrollNavigationBar 与 Storyboard一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25838702/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com