{"id":15055369,"url":"https://github.com/umobi/uicreator","last_synced_at":"2025-04-10T03:40:50.823Z","repository":{"id":56924848,"uuid":"229453015","full_name":"umobi/UICreator","owner":"umobi","description":"UICreator use declarative programming to create view interface using UIKit","archived":false,"fork":false,"pushed_at":"2020-11-05T15:13:08.000Z","size":1061,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-24T04:51:39.656Z","etag":null,"topics":["declarative","ios-swift","swiftui","ui","uikit","xcode"],"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/umobi.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-21T16:21:19.000Z","updated_at":"2025-01-02T11:49:55.000Z","dependencies_parsed_at":"2022-08-20T22:50:19.918Z","dependency_job_id":null,"html_url":"https://github.com/umobi/UICreator","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/umobi%2FUICreator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umobi%2FUICreator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umobi%2FUICreator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umobi%2FUICreator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umobi","download_url":"https://codeload.github.com/umobi/UICreator/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154936,"owners_count":21056541,"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":["declarative","ios-swift","swiftui","ui","uikit","xcode"],"created_at":"2024-09-24T21:41:38.480Z","updated_at":"2025-04-10T03:40:50.801Z","avatar_url":"https://github.com/umobi.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UICreator\n\n[![Swift](https://github.com/umobi/UICreator/workflows/Swift/badge.svg)](https://cocoapods.org/pods/UICreator)\n[![Version](https://img.shields.io/cocoapods/v/UICreator.svg?style=flat)](https://cocoapods.org/pods/UICreator)\n[![License](https://img.shields.io/cocoapods/l/UICreator.svg?style=flat)](https://cocoapods.org/pods/UICreator)\n[![Platform](https://img.shields.io/cocoapods/p/UICreator.svg?style=flat)](https://cocoapods.org/pods/UICreator)\n\n## Installation\n\nUICreator is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'UICreator'\n```\n\n## Classes\n\nClass | Name | Status | Description\n----|----|----|-----\nUIViewController | UICHostingView | ✅ | It is used to host UICreator's View.\nUINavigationController | UICNavigation | ✅ | It can be used the `UICNavigation.Other` to use custom navigations.\nUITabController | UICTab | ✅ | Defines a tab bar with `UICTabItem` to create the tab views.\nUICPage | UIPageViewController | 🟡 | Create page views.\nUIView | UICSpacer | ✅ | It contains a lot of properties from UIView and helps spacing content inside of it.\nUIStackView | UICStack | ✅ | It has two variation `UICVStack` and `UICHStack`.\nUILabel | UICLabel | ✅ | It shows the text on the screen.\nUITextField | UICText | ✅ | Is a text that can be edited.\nUITextView | UICScrollText | ✅ | It is a scrollable text that can be edited.\nUIScrollView | UICScroll | ✅ | Scrollable content with two variation `UICVScroll` and `UICHScroll`.\nUIImageView | UICImage | ✅ | It shows the image on the screen.\nUIButton | UICButton | ✅ | It is a view with control settings.\nUICActivity | UIActivityIndicatorView | ✅ | Use the `isLoading` to show the indicator.\nUICPageControl | UIPageControl | ✅ | Works by showing indicator to actual page.\n-- | UICRounder | ✅ | It is used to set `cornerRadius` and border layout\n-- | UICZStack | ✅ | It shows more than one child view.\n-- | UICViewRepresentable | ✅ | It is used to make UIKit view a UICreator view.\nUITableView | UICList | 🟡 | It list views using `UICRow`, `UICHeader`, `UICFooter` and `UICSection`. Only some features are implemented.\nUICollectionView | UICCollection | ❌ | It list view using `UICRow`, `UICHeader`, `UICFooter` and `UICSection`. It can be used `UICFlow` that uses `UICollectionFlowLayout`. To create the layout to views, use `layoutMaker(_:)`. Only some features are implemented.\n\n## Reactive Objects\n\nObject | Status | Description\n----|----|-----\nValue | ✅ | Store value inside view. Using the `$` it will turn into a `Relay` object.\nRelay | 🟡 | It is used to update view property with `sync(_:)` or `next(_:)`. There are other special properties like `bind(to:)`, `map(_:)` and `flatMap(_:)`. It is available some operations with booleans, like `self.$isEnabled \u0026\u0026 self.$isEmpty`, resulting in Relay\u003cBool\u003e. It needs more methods to be more flexible.\nProperty | 🟡 | Allow the view to change behavior depending on value of UIView. Accessing with `$` will return a `Relay`. It needs to be configurated by calling `dynamicProperty(_:)` on any view inside the body.\n\t\n## UIKit Wrappers\n\nObject | Status | Description\n----|----|----\nUICOutlet | ✅ | As a way to store the reference of a view inside ViewCreator. Configurated by calling the `as(_:)` method on the view inside the body getter.\n\n## Imperative Methods\n\nMost functions with callback return UIView as a parameter.\n\nMethod | Life Time | Description\n----|----|----\nonNotRendered(_:) | Only once | The callback is called when the UIView will move to superview.\nonRendered(_:) | Only once | It is called when the UIView did move to superview.\nonInTheScene(_:) | Only once | It is called when the UIView did move to window.\nonLayout(_:) | Forever | When uiview layout subviews.\nonTrait(_:) | Forever | When traits changes.\nonAppear(_:) | Forever | When UIView is not hidden or move to hierarchy.\nonDisappear(_:) | Forever | When UIView is hidden or quit the hierarchy.\n\n### Gestures\n\nBesides calling the methods from ViewCreator protocol, it is allowed to declarative create gestures using the `on{Gesture}Maker(_:)`.\n\nUIGestureRecognized | Class | Method\n----|----|----\nUITapGestureRecognized | Tap | onTap(_:)\n-- | Touch | onTouch(_:)\nUIHoverGestureRecognized | Hover | onHover(_:)\nUILongPressGestureRecognizer | LongPress | onLongPress(_:)\nUIPanGestureRecognizer | Pan | onPan(_:)\nUIPinchGestureRecognizer | Pinch | onPinch(_:)\nUIRotationGestureRecognizer | Rotation | onRotation(_:)\nUIScreenEdgePanGestureRecognizer | ScreenEdgePan | onScreenEdgePan(_:)\nUISwipeGestureRecognizer | Swipe | onSwipe(_:)\n\n## Control\n\nDepending on the view, UIControl works by calling the selector when some event occurs. The `Control` protocol enable events from view that extends UIControl and provides the `onEvent(_:, _:)` method. With that, `UICText` implements the `onEditingDidEnd(_:)` and other methods from UIControl.\n\n## Code Example\n\nGo check this repository [UICreator Examples](https://github.com/brennobemoura/UICreator-Examples) to learn and test the library.\n\n    import UICreator\n    class LandmarkRow: UICView {\n        let landmark: Landmark\n\t\t\n        init(landmark: Landmark) {\n            self.landmark = landmark\n        }\n\t\n        var body: ViewCreator {\n            UICSpacer(vertical: 5) {\n                UICHStack {\n                    UICImage(image: self.landmark.image)\n                        .aspectRatio()\n                        .height(equalTo: 50)\n                        .contentMode(.fill)\n                        .clipsToBounds(true)\n\t\t\t\t\t\t\n                    UICLabel(self.landmark.name)\n                    UICSpacer()\n                }\n                .spacing(15)\n            }\n        }\n    }\n\n## Author\n\nbrennobemoura, brenno@umobi.com.br\n\n## License\n\nUICreator is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumobi%2Fuicreator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumobi%2Fuicreator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumobi%2Fuicreator/lists"}