You can only find things using storyboard or Object-C on various sites.
Most iOS app development information is based on Objective-C, and it is not reasonable to exclude them from the survey just because they are "different languages."I'm not asking you to learn Objective-C now.In most of the information, regardless of language, there should be parts that explain the general flow of work and processing, so wouldn't it be helpful to read just that part?
A quiet talk.
The Tab Bar Item (icon image + title string) displayed in the Tab Bar belongs to the View Controller.Therefore, changing the icon is the process of sending a method to the View Controller or changing the properties of the View Controller.
If the instance name of this View Controller is hogeViewController
, then
hogeViewController.tabBarItem=UITabBarItem(title: "hoge", image:UIImage(named: "hoge.png", tag:0)
This changes the Tab Bar Item title to "hoge" and the icon to "hoge.png."
© 2024 OneMinuteCode. All rights reserved.