gpt4 book ai didi

iphone - 如何在 iPhone 上的 uinavigationbar 上创建信息按钮

转载 作者:行者123 更新时间:2023-12-03 18:26:26 25 4
gpt4 key购买 nike

我见过许多应用程序在导航栏上都有一个信息按钮(字母“i”,周围有一个圆圈)。如何添加这种类型的按钮?

最佳答案

之前的答案很接近,但没有完全编译。这就是您真正想要的:

// Info button
UIButton* infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
[infoButton addTarget:self action:@selector(showInfoView:) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:infoButton];

关于iphone - 如何在 iPhone 上的 uinavigationbar 上创建信息按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1456088/

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