This app is a sample app that links the tab displayed
in the Navigation Bar and the paging of the content.
The Tab part is scrollable, and the corresponding Tab is
displayed with animation in the center of the screen by paging.
In SwiftUI, it's relatively easy to implement
because we can easily access the NavigationBar part.
このアプリは NavigationBar に表示されたタブと
コンテンツのページングが連動するサンプルアプリです。
Tab 部分はスクロール可能になっていて,ページングにより
対応する Tab が画面中央にアニメーションありで表示されます。
SwiftUI では NavigationBar 部分に容易にアクセスできるため比較的実装しやすいです。
The theme of this app is the Tokyo Metro Marunouchi Line of the Tokyo subway.
Since it is a sample application, the content is static and common to all stations.
Add New Page & Paging | Select tab |
---|---|
Light | Dark |
---|---|
- Xcode 13
- iOS 14 and later
- SwiftUI(2+)
toolBar
modifier andToolbarItem
ScrollViewReader
TabView
'sPageTabViewStyle
selection
(Status of selected item)
Qiita Advent Calendar 2021 "iOS" Day 20.
https://qiita.com/MilanistaDev/items/09809b38dc8b23efa9ac
Please feel free to contact us if you find a bug or have any feedback.
Suggestions for adding functions and code corrections are also welcome.
let name = "Takuya Aso"
let email = "milanista224" + "@" + "icloud.com"
let profession = "iOS Engineer"
let location = "Tokyo"