当前位置:网站首页>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边栏推荐
- 英特尔David Tuhy:英特尔傲腾技术成功的原因
- 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
- Advertising attribution: how to measure the value of buying volume?
- Implementation of JSTL custom function library
- Win11控制面板快捷键 Win11打开控制面板的多种方法
- AI landing new question type RPA + AI =?
- 计数排序基础思路
- [ArcGIS tutorial] thematic map production - population density distribution map - population density analysis
- How do test / development programmers get promoted? From nothing, from thin to thick
- How to write a resume that shines in front of another interviewer [easy to understand]
猜你喜欢
On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?
Fix the problem that the highlight effect of the main menu disappears when the easycvr Video Square is clicked and played
Digital chemical plant management system based on Virtual Simulation Technology
Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
Surpassing postman, the new generation of domestic debugging tool apifox is elegant enough to use
This "advanced" technology design 15 years ago makes CPU shine in AI reasoning
NFT meta universe chain diversified ecosystem development case
Have you got the same "artifact" of cross architecture development praised by various industry leaders?
What about the collapse of win11 playing pubg? Solution to win11 Jedi survival crash
DAB-DETR: DYNAMIC ANCHOR BOXES ARE BETTER QUERIES FOR DETR翻译
随机推荐
微信能开小号了,拼多多“砍一刀”被判侵权,字节VR设备出货量全球第二,今日更多大新闻在此
ESG全球领导者峰会|英特尔王锐:以科技之力应对全球气候挑战
Win11控制面板快捷键 Win11打开控制面板的多种方法
JetBrain Pycharm的一系列快捷键
【自动化经验谈】自动化测试成长之路
The easycvr platform is connected to the RTMP protocol, and the interface call prompts how to solve the error of obtaining video recording?
Digital chemical plants realize the coexistence of advantages of high quality, low cost and fast efficiency
Golang compresses and decompresses zip files
[team learning] [phase 34] Baidu PaddlePaddle AI talent Creation Camp
True global ventures' newly established $146million follow-up fund was closed, of which the general partner subscribed $62million to invest in Web3 winners in the later stage
【实践出真理】import和require的引入方式真的和网上说的一样吗
jvm是什么?jvm调优有哪些目的?
Case reward: Intel brings many partners to promote the innovation and development of multi domain AI industry
EasyCVR无法使用WebRTC进行播放,该如何解决?
Highly paid programmers & interview questions. Are you familiar with the redis cluster principle of series 120? How to ensure the high availability of redis (Part 1)?
[coded font series] opendyslexic font
[leetcode]Spiral Matrix II
计数排序基础思路
What if win11 pictures cannot be opened? Repair method of win11 unable to open pictures
The most complete deployment of mongodb in history