{"id":13451602,"url":"https://github.com/eleev/column-text-view-ui","last_synced_at":"2025-05-12T05:30:55.697Z","repository":{"id":83808507,"uuid":"222102026","full_name":"eleev/column-text-view-ui","owner":"eleev","description":"📄 Column Text View is an adaptive UI component that renders text in columns, horizontally [iOS 12, UIKit, TextKit, SwiftUI].","archived":false,"fork":false,"pushed_at":"2019-12-29T09:14:24.000Z","size":47128,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-05T11:11:55.240Z","etag":null,"topics":["core-graphics","coregraphics","framework","ios","spm","swift","swift-package-manager","swiftui","textkit","ui-component","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/eleev.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-11-16T13:17:39.000Z","updated_at":"2024-08-05T11:11:55.240Z","dependencies_parsed_at":"2024-01-16T03:58:34.757Z","dependency_job_id":null,"html_url":"https://github.com/eleev/column-text-view-ui","commit_stats":null,"previous_names":["jvirus/column-text-view-ui"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eleev%2Fcolumn-text-view-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eleev%2Fcolumn-text-view-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eleev%2Fcolumn-text-view-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eleev%2Fcolumn-text-view-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eleev","download_url":"https://codeload.github.com/eleev/column-text-view-ui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253681896,"owners_count":21946826,"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":["core-graphics","coregraphics","framework","ios","spm","swift","swift-package-manager","swiftui","textkit","ui-component","uikit"],"created_at":"2024-07-31T07:00:56.813Z","updated_at":"2025-05-12T05:30:50.683Z","avatar_url":"https://github.com/eleev.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# column-text-view-ui [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)\n\n[![Build](https://github.com/jvirus/column-text-view-ui/workflows/Build/badge.svg)]()\n[![Platform](https://img.shields.io/badge/Platform-iOS_12-yellow.svg)]()\n[![Platform](https://img.shields.io/badge/Platform-iPadOS_12-darkyellow.svg)]()\n[![Language](https://img.shields.io/badge/Language-Swift_5.1-orange.svg)]()\n[![SPM](https://img.shields.io/badge/SPM-Supported-red.svg)]()\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)]()\n\n**Last Update: 29/December/2019.**\n\n![](/Assets/cover-preview.png)\n\n### If you like the project, please give it a star ⭐ It will show the creator your appreciation and help others to discover the repo.\n\n# ✍️ About\n📄 Column Text View is an adaptive UI component that renders text in columns, horizontally [iOS 12, UIKit, TextKit, SwiftUI].\n\n# 📺 Demo\nPlease wait while the `.gif` files are loading...\n\n\u003cimg src=\"/Assets/textview-ui-ipad.gif\" width=\"59%\"\u003e \u003cimg src=\"/Assets/textview-ui-iphone.gif\" width=\"40%\"\u003e\n\n\n# 🍱 Features\n- **Configurable**\n    - There are a number of configurable properties and you can use, such as, you can specify the number of columns for the supplied text, specify column spacing, paddings and other properties\n- **Adaptive**\n    - The underlying text container adjusts its size to support the needed amount of space for the supplied text\n-  **SwiftUI Compatable**\n    - You can use a dedicated wrapper called `ColumnedTextView` to use the componet with `SwiftUI`   \n- **Ease of Use**\n    - Instantiate a single instane of `ColumnTextView` or `ColumnedTextView` (for `SwiftUI` ), setup the parent view and supply some text\n- **Designable and Inspectable**\n    - You can use `.storyboard` or `.xib` files to configure the component without touching code (well, almost)\n\n# 📚 Usage\n\nThe first thing you need to do is to prepare the UI component. The following example demostrates the programmatic approach, where the component is instantiated without `.storyboard` or `.xib` outlets:\n\n```swift\n// 1\nlet columnTextView = ColumnTextView(frame: view.bounds, .columns(2))\ncolumnTextView.autoresizingMask = [.flexibleWidth, .flexibleHeight]\ncolumnTextView.backgroundColor = .white\nparentView.addSubview(columnTextView)\n\n// 2\ncolumnTextView.attributedText = attributedString\n```\n- (1) The first part is instantiation and setup. Here we have pretty usual things happenning, nothing exotic 🌴. You can specify the way the columns should be created. Here you have two options: to use `.absolute(***UInt16***)`, where the associated parameter is a single column `width` in points or to use `.columns(***UInt16***)`, where the associated parameter is a positive integer number that specifies the exact number of columns that should be created for the current screen's `width`.\n- (2) The next part is about the text `attachment`. You simply create an instance of `NSAttributedString`, configure it as you'd like and that's it. \n\nYou can change the `attributedText` property, the results will be correspondigly reflected and specify all `four` paddings for `top, right, bottom and left` sides of the component. \n\n# 🏗 Installation\n\n## Swift Package Manager\n\n### Xcode 11+\n\n1. Open `MenuBar` → `File` → `Swift Packages` → `Add Package Dependency...`\n2. Paste the package repository url `https://github.com/jVirus/column-text-view-ui` and hit `Next`.\n3. Select the installment rules.\n\nAfter specifying which version do you want to install, the package will be downloaded and attached to your project. \n\n### Package.swift\nIf you already have a `Package.swift` or you are building your own package simply add a new dependency:\n\n```swift\ndependencies: [\n    .package(url: \"`https://github.com/jVirus/column-text-view-ui\", from: \"1.0.0\")\n]\n```\n\n## Manual \nYou can always use copy-paste the sources method 😄. Or you can compile the framework and include it with your project.\n\n# 🙋‍♀️🙋‍♂️ Contributing\nYour contributions are always appreciated. There are many ways how you help with the project:\n\n- You can suggest something\n- You can write additional documentation or sample codes\n- Implement a new feature \n- Fix a bug\n- Help to maintain by answering to the questions (if any) that other folks have\n- etc.\n\nOverall guidelies are:\n\n- Please, discuss a feature or a major source change/addition before spending time and creating a pool requested via issues. \n- Create a separate branch and make sure that your code compiles and does not produce errors and warnings.\n- Please, don't be upset if it takes a while to review your code or receive an answer.\n\n# 👨‍💻 Author \n[Astemir Eleev](https://github.com/jVirus)\n\n# 🔖 Licence \nThe project is available under [MIT Licence](https://github.com/jVirus/column-text-view-ui/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feleev%2Fcolumn-text-view-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feleev%2Fcolumn-text-view-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feleev%2Fcolumn-text-view-ui/lists"}