当前位置:网站首页>Detect when a tab bar item is pressed
Detect when a tab bar item is pressed
2022-07-07 04:34:00 【Zafo】
problem :
I have a root view controller which isn't set as the custom class for any of my view controllers on my storyboard. I have a root view controller , It is not set as a custom class for any view controller on my storyboard .Instead, all of my view controllers are subclassing this class like so. contrary , All my view controllers class this class like this .
// RootViewControllerclass RootViewController: UIViewController, UITabBarDelegate { // This is not getting executed on any of the view controllers func tabBar(tabBar: UITabBar, didSelectItem item: UITabBarItem) { print("ddd") }}// Subclassing it class TopStoriesViewController: RootViewController {}But I seem to be struggling with doing something when a tabbaritem is pressed on the view controller which is subclassing the rootviewcontroller, ie, the message is not being printed. however , When inheriting rootviewcontroller Press tabbaritem when , I seem to be trying to do something , That is, no message is printed .
Solution :
Reference resources : https://stackoom.com/en/question/2Hyfj边栏推荐
- SSM+jsp实现仓库管理系统,界面那叫一个优雅
- 2022 electrician cup a question high proportion wind power system energy storage operation and configuration analysis ideas
- Complimentary tickets quick grab | industry bigwigs talk about the quality and efficiency of software qecon conference is coming
- EasyCVR平台接入RTMP协议,接口调用提示获取录像错误该如何解决?
- [team learning] [34 sessions] Alibaba cloud Tianchi online programming training camp
- EasyCVR集群重启导致其他服务器设备通道状态离线情况的优化
- This "advanced" technology design 15 years ago makes CPU shine in AI reasoning
- Break the memory wall with CPU scheme? Learn from PayPal to expand the capacity of aoteng, and the volume of missed fraud transactions can be reduced to 1/30
- leetcode 53. Maximum Subarray 最大子数组和(中等)
- 日常工作中程序员最讨厌哪些工作事项?
猜你喜欢

On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?

C#使用西门子S7 协议读写PLC DB块

用CPU方案打破内存墙?学PayPal堆傲腾扩容量,漏查欺诈交易量可降至1/30

AI landing new question type RPA + AI =?

Why does WordPress open so slowly?
![[OA] excel document generator: openpyxl module](/img/e3/e6a13a79ad9023cf263d1926a224b5.png)
[OA] excel document generator: openpyxl module

各路行业大佬称赞的跨架构开发“神器”,你get同款了吗?

This "advanced" technology design 15 years ago makes CPU shine in AI reasoning

英特尔David Tuhy:英特尔傲腾技术成功的原因

【ArcGIS教程】专题图制作-人口密度分布图——人口密度分析
随机推荐
Ssm+jsp realizes enterprise management system (OA management system source code + database + document +ppt)
Complimentary tickets quick grab | industry bigwigs talk about the quality and efficiency of software qecon conference is coming
EasyCVR集群重启导致其他服务器设备通道状态离线情况的优化
DAB-DETR: DYNAMIC ANCHOR BOXES ARE BETTER QUERIES FOR DETR翻译
leetcode 53. Maximum Subarray 最大子数组和(中等)
Fiance donated 500million dollars to female PI, so that she didn't need to apply for projects, recruited 150 scientists, and did scientific research at ease!
[untitled]
B站大佬用我的世界搞出卷积神经网络,LeCun转发!爆肝6个月,播放破百万
Golang compresses and decompresses zip files
True Global Ventures新成立的1.46亿美元后续基金关账,其中普通合伙人认缴6,200万美元以对后期阶段的Web3赢家进行投资
ESG全球领导者峰会|英特尔王锐:以科技之力应对全球气候挑战
Case reward: Intel brings many partners to promote the innovation and development of multi domain AI industry
See Gardenia minor
AI landing new question type RPA + AI =?
接口自动化测试实践指导(中):接口测试场景有哪些
Dab-detr: dynamic anchor boxes are better queries for Detr translation
用CPU方案打破内存墙?学PayPal堆傲腾扩容量,漏查欺诈交易量可降至1/30
EasyUI export excel cannot download the method that the box pops up
Win11远程桌面连接怎么打开?Win11远程桌面连接的五种方法
《原动力 x 云原生正发声 降本增效大讲堂》第三讲——Kubernetes 集群利用率提升实践