Custom UITabBarItem Image / Title on iPhone

I would like to add a custom header to one of the predefined UITabBarItems. Whenever I select a specific instance that I like in Interface Builder, if I change the title, it returns to the "user" identifier. Ideally, I would like the book icon from the Bookmarks ID to be created with my own name.

Is this level of customization currently supported by the SDK? Should I end up screening the image and applying it as a custom image?

Thanks for any insight or documentation that points me in the right direction.

+2
source share
2 answers

Unfortunately, the only types of UITabBarItems are those that are supplied and fully described by the OS (i.e. they are assigned icons and headers) and those that are fully described by the application, as you have discovered. On the contrary, the easiest solution is to pull the icon from another location and use it with -initWithTitle:image:tag .

http://img369.imageshack.us/img369/8388/openbookwp4.png

+8
source

Regarding the search for icons on the Internet ... I'm still looking for all the official Apple. Here is what I have found so far:

And instead of escaping, do the following:

+5
source

Source: https://habr.com/ru/post/888486/


All Articles