As I started my side project, I looked into various ways to use UITabBar for structuring the home screen.
1️⃣ The first method I explored was how to hide the UITabBar. There are several ways to achieve this, but I opted to manage it in one place.
Previously, I would either set tabbar.isHidden
when the viewWillAppear
of the screen to be hidden was called, adjust the tabbar.frame
, or use the property hidesBottomBarWhenPushed when pushing a new screen. However, having to check this every time a new screen is added can be confusing. By managing it in one place, it simplifies collaboration and reduces confusion, which I found beneficial.
2️⃣ Secondly, I handled animations when transitioning screens upon selecting a TabBar item. While the animation styles can vary, the handling methods are generally similar. In the method tabBarController(_:animationControllerForTransitionFrom:to:) of the UITabBarControllerDelegate, you return an animator object that adopts the UIViewControllerAnimatedTransitioning protocol to apply the animation.
I implemented and compared two styles: slide format and zoom in/out format.
3️⃣ Lastly, I switched to a CustomTabBar. When modifying the default TabBar, there are limitations regarding animation handling and frame adjustments. Therefore, I used a UIStackView to replace the default TabBar. Each TabItem was implemented as a UIView, and I introduced RxGesture to apply tap events.
I implemented a chat feature using FirebaseAuth and FireStore. This project considers scenarios where multiple users can use the same chat room. I implemented this in the Firebase_Learn_Project.
The FireStore DB structure distinguishes each user by Uid using FirebaseAuth and matches them to chat rooms.
The chat-related code follows an MVVM structure.
I was unable to find a solution for displaying a loading indicator on the first screen when not showing the last chat history in FireStore.