{"id":25195943,"url":"https://github.com/simplisticated/visuality","last_synced_at":"2025-04-04T15:44:04.459Z","repository":{"id":56926087,"uuid":"68929227","full_name":"simplisticated/Visuality","owner":"simplisticated","description":"Simplifying work with views in Swift","archived":false,"fork":false,"pushed_at":"2021-10-28T11:42:45.000Z","size":366,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T18:50:49.582Z","etag":null,"topics":["nib","uikit","uiview","uiview-extension","uiviewcontroller"],"latest_commit_sha":null,"homepage":null,"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/simplisticated.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":"2016-09-22T14:26:57.000Z","updated_at":"2021-12-21T13:27:30.000Z","dependencies_parsed_at":"2022-08-20T22:40:07.384Z","dependency_job_id":null,"html_url":"https://github.com/simplisticated/Visuality","commit_stats":null,"previous_names":["igormatyushkin014/visuality"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FVisuality","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FVisuality/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FVisuality/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FVisuality/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplisticated","download_url":"https://codeload.github.com/simplisticated/Visuality/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208022,"owners_count":20901568,"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":["nib","uikit","uiview","uiview-extension","uiviewcontroller"],"created_at":"2025-02-10T01:39:11.129Z","updated_at":"2025-04-04T15:44:04.441Z","avatar_url":"https://github.com/simplisticated.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" \u003e\n  \u003cimg src=\"https://github.com/igormatyushkin014/Visuality/blob/master/Logo/logo_1024_1024.png\" alt=\"Visuality\" title=\"Visuality\" width=\"300px\" height=\"300px\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://swift.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://tldrlegal.com/license/mit-license\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## At a Glance\n\n`Visuality` helps you to create view or view controller instance with NIB by one line of code. This is the main purpose of this library. Actually, there's a lot more features!\n\n## How To Get Started\n\n- Copy content of `Source` folder to your project.\n\nor\n\n- Use Swift package manager.\n\n## Requirements\n\n* iOS 9 and later\n* Xcode 9 and later\n* Swift 4\n\n## Usage\n\n### Views\n\nTo create new `UIView` instance, you have to use `.from()` static method:\n\n```swift\nMyView.from(nib: \u003cnib query\u003e, inBundle: \u003cbundle query\u003e)\n```\n\nNib query can be one of the following values:\n\n- `byNibName(\"MyView\")` - loads NIB with custom name\n- `byClassName` - loads NIB with name of view class\n- `byClassNameWithSuffix(\u003csuffix\u003e)` - loads NIB with name of view class and suffix\n- `none` - loads view without NIB\n\nList of available suffixes for NIB name:\n\n- `_iPhone`\n- `_iPad`\n- `custom(\"suffix\")`\n\nBundle query defines the bundle containing required NIB. Possible values are:\n\n- `main` - main bundle\n- `byInstance(bundle)` - requires instance of `Bundle` type\n- `byIdentifier(\"com.example.App\")` - requires bundle identifier\n\nSo, if you need to initialize a view of `MyView` type with same-named NIB file located in main bundle, you can simply write:\n\n```swift\nlet view = MyView.from(nib: .byClassName, inBundle: .main)\n```\n\n### View Controllers\n\nInitialization of view controller instances is very similar to view's initialization, but there's one more parameter:\n\n```swift\nlet viewController = MyViewController.from(nib: .byClassName, inBundle: .main, loadView: true)\n```\n\nThe last parameter `loadView` is a boolean value defining whether view should be loaded immediately after view controller's instantiation. In most cases you don't need to load view immediately, but, sometimes, this is a quite helpful option.\n\nBy default, `loadView` is `false`, so, if you don't need to load view controller's view immediately, you can avoid mentioning this parameter:\n\n```swift\nlet viewController = MyViewController.from(nib: .byClassName, inBundle: .main)\n```\n\nIn this case view will be loaded right before displaying on the screen.\n\n## License\n\n`Visuality` 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%2Fsimplisticated%2Fvisuality","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplisticated%2Fvisuality","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplisticated%2Fvisuality/lists"}