Skip to content

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.

Notifications You must be signed in to change notification settings

MilanistaDev/SwipePageChanger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

SwipePageChanger

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 部分に容易にアクセスできるため比較的実装しやすいです。

Sample GIF and Images

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
SwipePageChanger_1 SwipePageChanger_2
Light Dark
img_light img_dark

Environment

  • Xcode 13
  • iOS 14 and later
  • SwiftUI(2+)

Point of implementation

  • toolBar modifier and ToolbarItem
  • ScrollViewReader
  • TabView's PageTabViewStyle
  • selection (Status of selected item)

Article

Qiita Advent Calendar 2021 "iOS" Day 20.
https://qiita.com/MilanistaDev/items/09809b38dc8b23efa9ac

Contact

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"

About

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.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages