{"id":13537000,"url":"https://github.com/youjinp/SwiftUIKit","last_synced_at":"2025-04-02T03:31:31.404Z","repository":{"id":37893099,"uuid":"261360260","full_name":"youjinp/SwiftUIKit","owner":"youjinp","description":"A collection of missing SwiftUI components","archived":false,"fork":false,"pushed_at":"2022-09-22T04:47:33.000Z","size":1049,"stargazers_count":281,"open_issues_count":6,"forks_count":32,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-23T00:51:22.161Z","etag":null,"topics":["ios","spm","swift","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/youjinp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-05T04:19:24.000Z","updated_at":"2025-03-12T05:20:40.000Z","dependencies_parsed_at":"2023-01-17T17:15:54.904Z","dependency_job_id":null,"html_url":"https://github.com/youjinp/SwiftUIKit","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youjinp%2FSwiftUIKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youjinp%2FSwiftUIKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youjinp%2FSwiftUIKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youjinp%2FSwiftUIKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/youjinp","download_url":"https://codeload.github.com/youjinp/SwiftUIKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246497938,"owners_count":20787230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","spm","swift","swiftui"],"created_at":"2024-08-01T09:00:53.329Z","updated_at":"2025-04-02T03:31:31.380Z","avatar_url":"https://github.com/youjinp.png","language":"Swift","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/15708500/86090069-83443900-bafd-11ea-8692-41713679bae7.png\"\u003e\n\u003c/p\u003e\n\n# SwiftUIKit\n\nA collection of components that will simplify and accelerate your iOS development.\n\n## Components\n\n1. [CurrencyTextField](#1-currencytextfield)\n1. [AdaptToKeyboard](#2-adapttokeyboard) (not needed for iOS 14 beta 6+)\n1. [ContactPicker](#3-contactpicker)\n\n## Demo\n\nThere is an example app at `SwiftUIKitExampleApp` which can be built and run. Just clone this repo and run it.\n\n# 1. CurrencyTextField\n\n## Demo\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"demo/currencyTextField.gif\" width=\"400\"\u003e\n\u003c/p\u003e\n\n## Description\n\nReal time formatting of users input into currency format.\n\n## Usage\n\n```swift\nimport SwiftUIKit\n\nstruct ContentView: View {\n    @State private var value = 0.0\n\n    var body: some View {\n        //Minimal configuration\n        CurrencyTextField(\"Amount\", value: self.$value)\n        \n        //All configurations\n        CurrencyTextField(\"Amount\", value: self.$value, alwaysShowFractions: false, numberOfDecimalPlaces: 2, currencySymbol: \"US$\")\n            .font(.largeTitle)\n            .multilineTextAlignment(TextAlignment.center)\n    }\n}\n```\n\n# 2. AdaptToKeyboard\n\n## Demo\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"demo/keyboardAdapt.gif\" width=\"400\"\u003e\n\u003c/p\u003e\n\n## Description\n\nAnimate view's position when keyboard is shown / hidden\n\n## Usage\n\n```swift\nimport SwiftUIKit\n\nstruct ContentView: View {\n    var body: some View {\n        VStack {\n            Spacer()\n            Button(action: {}) {\n              Text(\"Hi\")\n                  .adaptToKeyboard()\n            }\n        }\n    }\n}\n```\n\n# 3. ContactPicker\n\n## Demo\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/15708500/86092942-55152800-bb02-11ea-9065-623a1a80d808.gif\" width=\"400\"\u003e\n\u003c/p\u003e\n\n## Description\n\nSwiftUI doesn't work well with `CNContactPickerViewController` if you just put it inside a `UIViewControllerRepresentable`. See this [stackoverflow post](https://stackoverflow.com/questions/57246685/uiviewcontrollerrepresentable-and-cncontactpickerviewcontroller/57621666#57621666). With `ContactPicker` here its just a one liner.\n\nTo enable multiple selection use `onSelectContacts` instead.\n\n## Usage\n\n```swift\nimport SwiftUIKit\n\nstruct ContentView: View {\n    @State var showPicker = false\n\n    var body: some View {\n        ZStack {\n            // This is just a dummy view to present the contact picker,\n            // it won't display anything, so place this anywhere.\n            // Here I have created a ZStack and placed it beneath the main view.\n            ContactPicker(\n                showPicker: $showPicker,\n                onSelectContact: {c in\n                    self.contact = c\n                }\n            )\n            VStack {\n                Button(action: {\n                    self.showPicker.toggle()\n                }) {\n                    Text(\"Pick a contact\")\n                }\n            }\n        }\n    }\n}\n```\n","funding_links":[],"categories":["Samples"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoujinp%2FSwiftUIKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoujinp%2FSwiftUIKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoujinp%2FSwiftUIKit/lists"}