Skip to content

A beautiful settings screen created in SwiftUI

License

Notifications You must be signed in to change notification settings

JeanMeijer/SwiftUI-Settings-Screen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftUI Settings Screen

A beautiful settings screen created in SwiftUI. It is based on my Gradient Game!

Light Mode Settings Dark Mode Setting

Features

  • Customizable
  • iOS compatibility
  • Landscape compatibility
  • iPad compatibility
  • Dark mode
  • Hover Effect for iPad
  • Mac compatibility [Share Sheet not working]

Support

  • iOS 13.0+ / macOS 10.15+

Future

  • Make it a Swift Package

Documentation

Individual rows is the SettingsRow View which takes the image, title and action as the parameter. You can customise it to your liking.

For example, this row is for writing a review, with a function in the closure.

SettingsRow(imageName: "pencil.and.outline", title: "Write a review") {
    self.settingsViewModel.writeReview()
}

Each section is embedded in a VStack, with a custom background modifier.

For example, this section is for showing a personal Twitter account.

VStack(alignment: .leading) {
    SettingsRow(imageName: "textbox", title: "Creator") {
        self.settingsViewModel.openTwitter(twitterURLApp: Settings.personalTwitterApp, twitterURLWeb: Settings.personalTwitterWeb)
    }
}
.settingsBackground()

Contribution

You are free to add more features to it, or refactor the code! I will be more than happy to accept PRs.

Contact - Rudrank Riyam

About

A beautiful settings screen created in SwiftUI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%