{"id":17648757,"url":"https://github.com/chris-swift-dev/UIKit-Modifiers","last_synced_at":"2025-03-08T23:45:13.047Z","repository":{"id":63907264,"uuid":"229147729","full_name":"chris-swift-dev/UIKit-Modifiers","owner":"chris-swift-dev","description":"SwiftUI-like modifiers for many UIKit views and controls","archived":false,"fork":false,"pushed_at":"2020-02-21T10:03:27.000Z","size":55,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T23:45:10.285Z","etag":null,"topics":["ios","modifiers","swift","swiftui","uikit"],"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/chris-swift-dev.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":"2019-12-19T22:19:54.000Z","updated_at":"2024-09-27T13:09:16.000Z","dependencies_parsed_at":"2022-11-28T22:49:19.449Z","dependency_job_id":null,"html_url":"https://github.com/chris-swift-dev/UIKit-Modifiers","commit_stats":null,"previous_names":["chris-swift-dev/uikit-modifiers","crelies/uikit-modifiers"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-swift-dev%2FUIKit-Modifiers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-swift-dev%2FUIKit-Modifiers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-swift-dev%2FUIKit-Modifiers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-swift-dev%2FUIKit-Modifiers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chris-swift-dev","download_url":"https://codeload.github.com/chris-swift-dev/UIKit-Modifiers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242623564,"owners_count":20159702,"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","modifiers","swift","swiftui","uikit"],"created_at":"2024-10-23T11:20:22.284Z","updated_at":"2025-03-08T23:45:12.749Z","avatar_url":"https://github.com/chris-swift-dev.png","language":"Swift","readme":"# UIKit-Modifiers\n\n[![Swift 5.1](https://img.shields.io/badge/swift5.1-compatible-green.svg?longCache=true\u0026style=flat-square)](https://developer.apple.com/swift)\n[![Platform](https://img.shields.io/badge/platform-iOS%20%7C%20macOS%20%7C%20tvOS-lightgrey.svg?longCache=true\u0026style=flat-square)](https://www.apple.com)\n[![Current Version](https://img.shields.io/github/v/tag/crelies/UIKit-Modifiers?longCache=true\u0026style=flat-square)](https://github.com/crelies/UIKit-Modifiers)\n[![License](https://img.shields.io/badge/license-MIT-lightgrey.svg?longCache=true\u0026style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)\n\n*SwiftUI-like* **modifiers** for many **UIKit** *views* and *controls* - **syntactic sugar**, nothing more 🎁\n\n**Let me know if you miss something** 😉\n\n**Hint: *To avoid conflicts with existing functions I had to use different function signatures for some modifiers!***\n\n## Modifiers available for\n\nThe modifiers are added through *Extensions* to the views / controls.\n\n| **View**                          | **Status** |\n| --------------------------------- | ---------- |\n| **UIActivityIndicatorView**       | ✅          |\n| **UIButton**                      | ✅          |\n| **UICollectionView**              | ✅          |\n| **UIControl**                     | ✅          |\n| **UIDatePicker**                  | ✅          |\n| **UIImageView**                   | ✅          |\n| **UILabel**                       | ✅          |\n| **UIPageControl**                 | ✅          |\n| **UIPickerView**                  | ✅          |\n| **UIProgressView**                | ✅          |\n| **UIScrollView**                  | ✅          |\n| **UISearchTextField**             | ✅          |\n| **UISegmentedControl**            | ✅          |\n| **UISlider**                      | ✅          |\n| **UIStackView**                   | ✅          |\n| **UIStepper**                     | ✅          |\n| **UISwitch**                      | ✅          |\n| **UITableView**                   | ✅          |\n| **UITextField**                   | ✅          |\n| **UITextField-UITextInputTraits** | ✅          |\n| **UITextView**                    | ✅          |\n| **UITextView-UITextInputTraits**  | ✅          |\n| **UIView**                        | ✅          |\n\n## Example\n\nIf you create your *views in code* you may find yourself writing something similar to\n\n```swift\nvar textField: UITextField = {\n    let textField = UITextField()\n    textField.translatesAutoresizingMaskIntoConstraints = false\n    textField.placeholder = \"Username\"\n    textField.textColor = .systemBlue\n    textField.font = .systemFont(ofSize: 17, weight: .semibold)\n    textField.textContentType = .username\n    return textField\n}()\n```\n\nWith this *Swift package* you can use *SwiftUI-like* **modifiers**\n\n```swift\nvar textField: UITextField = {\n    UITextField()\n      .translatesAutoresizingMaskIntoConstraints(false)\n      .placeholder(\"Username\")\n      .textColor(.systemBlue)\n      .font(.systemFont(ofSize: 17, weight: .semibold))\n      .textContentType(.username)\n}()\n```\n\n**Enjoy adding some *syntactic sugar* on top of your *UIKit code*** 🚀\n\n## Installation\n\nAdd this **Swift package** as a dependency to your *Package.swift*\n\n```swift\n.package(url: \"https://github.com/crelies/UIKit-Modifiers.git\", from: \"0.1.0\")\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-swift-dev%2FUIKit-Modifiers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchris-swift-dev%2FUIKit-Modifiers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-swift-dev%2FUIKit-Modifiers/lists"}