Swift Package Manager iOS Twitter: @sebjvidal


A light-weight, extensible package for easily building pixel-perfect iOS settings screens in a pinch.


SettingsKit can be installed using Swift Package Manager. To get started…

  1. Open your project in Xcode and navigate to File, Add Packages...
  2. Search for in the “Search or Enter Package URL” toolbar item
  3. Choose SettingsKit
  4. Click Add Package


To create a new settings screen, create an array of SettingsKitSections. A section has a children and optional header and footer parameters.

import SettingsKit

let sections: [SettingsKitSection] = [
        settings: [
                icon: SettingsKitIcon(
                    symbol: UIImage(systemName: "gear"),
                    config: UIImage.SymbolConfiguration(pointSize: 21),
                    colour: .systemGray
                title: "General",
                children: [
                        settings: [
                            SettingsKitToggle(title: "A Toggle Cell", key: "toggle")
                            SettingsKitTextField(title: "A TextField Cell", key: "textField")

let viewController = SettingsKitViewController(sections: sections)

The children property of SettingsKitSections takes an array of SettingsKitSections, so you can go as many layers deep as you need.

The root SettingsKitViewController navigation elements can be customised as follows.

viewController.title = "SettingsKit"
viewController.navigationItem.largeTitleDisplayMode = .automatic
viewController.navigationController?.navigationBar.prefersLargeTitles = true


SettingsKit is built with UIKit, so you can customise the SettingsKitViewController as you would a UITableViewController.

Be careful when overriding the SettingsKitViewController tableView‘s delegate methods, as the following methods are used internally to make the package functional:

  • numberOfSections(in:)
  • tableView(_:titleForHeaderInSection:)
  • tableView(_:titleForFooterInSection:)
  • tableView(_:numberOfRowsInSection:)
  • tableView(_:cellForRowAt:)
  • tableView(_:heightForRowAt)
  • tableView(_:shouldHighlightRowAt:)
  • tableView(_:didSelectRowAt:)


View Github