Summary
In this chapter, we looked at how we display tab bars in SwiftUI from the standard way of implementing tab bars called TabView
. We have also explored modifying views to imitate a tab bar in situations where the standard system provided tab bar will not do, like when selection buttons have to be placed at the top of the screen.
We examined in depth how familiar modal views—sheets, alerts, and popovers—are shown in SwiftUI with focus on both iPhone and iPad, including using presentation detents, with attention on how to achieve this in different releases of iOS.
Moving forward, the next chapter will explore in depth the topic of navigation within SwiftUI.