{"id":2205,"url":"https://github.com/linh-chu/LCUIComponents","last_synced_at":"2025-08-02T23:32:17.610Z","repository":{"id":56918281,"uuid":"92471833","full_name":"linh-chu/LCUIComponents","owner":"linh-chu","description":"It provides UI components such as popover, popup, dialog supporting iOS apps","archived":false,"fork":false,"pushed_at":"2017-11-01T22:55:22.000Z","size":2212,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-29T04:51:07.099Z","etag":null,"topics":[],"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/linh-chu.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":"2017-05-26T04:22:38.000Z","updated_at":"2020-04-08T12:52:00.000Z","dependencies_parsed_at":"2022-08-21T04:50:47.808Z","dependency_job_id":null,"html_url":"https://github.com/linh-chu/LCUIComponents","commit_stats":null,"previous_names":["linhcn/lcuicomponents"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linh-chu%2FLCUIComponents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linh-chu%2FLCUIComponents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linh-chu%2FLCUIComponents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linh-chu%2FLCUIComponents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linh-chu","download_url":"https://codeload.github.com/linh-chu/LCUIComponents/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503144,"owners_count":17930520,"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":[],"created_at":"2024-01-05T20:16:07.536Z","updated_at":"2024-12-06T17:30:51.381Z","avatar_url":"https://github.com/linh-chu.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Other Testing"],"readme":"\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"LCUIComponents/Sample/Resources/img_lc_logo.png\" /\u003e\r\n  \u003c/br\u003e\u003c/br\u003e\r\n  \u003cimg src=\"https://travis-ci.org/linhcn/LCUIComponents.svg?branch=master\" /\u003e\r\n  \u003cimg src=\"https://cocoapod-badges.herokuapp.com/v/LCUIComponents/badge.png\" /\u003e\r\n  \u003cimg src=\"https://cocoapod-badges.herokuapp.com/p/LCUIComponents/badge.png\" /\u003e\r\n  \u003cimg src=\"https://cocoapod-badges.herokuapp.com/l/LCUIComponents/badge.png\" /\u003e\r\n\u003c/p\u003e\r\n\r\n## Overview\r\n\r\nLCUIComponents is an on-going project, which supports creating transient views appearing above other content onscreen when a control is selected. Currently, the framework provides supports to simply create a customisable popover with a selectable data list.\r\n\r\n\u003cp align=\"center\"\u003e\u003cimg src=\"LCUIComponents/Sample/Resources/img_popover_preview.gif\" width=\"220\" /\u003e\u003c/p\u003e\r\n\r\n## Requirements\r\n\r\n* iOS 8.0+\r\n* Xcode 8+\r\n* Swift 3\r\n\r\n## Usage\r\n\r\nThe following is an example of how to create a popover. For more advanced use please check out the `Sample` path.\r\n\r\n### Set up a basic popover with data list\r\n\r\n```swift\r\nimport LCUIComponents\r\nimport UIKit\r\n\r\nclass PopoverSamplesVC: UIViewController {\r\n    \r\n    // Create a data source\r\n    let spiceList: [LCTuple\u003cInt\u003e] = [(key: 1, value:\"Cinnamon\"),\r\n                                     (key: 2, value:\"Cloves\"),\r\n                                     (key: 3, value:\"Ginger\"),\r\n                                     (key: 4, value:\"Turmeric\"),\r\n                                     (key: 5, value:\"Tamarind\")]\r\n    \r\n    @IBAction func btnPopoverTapped(_ sender: UIButton) {\r\n        setupBasicPopover(for: sender)\r\n    }\r\n    \r\n    func setupBasicPopover(for sender: UIView) {\r\n        // Init a popover with a callback closure after selecting data\r\n        let popover = LCPopover\u003cInt\u003e(for: sender, title: \"Spices\") { tuple in\r\n            // Use of the selected tuple\r\n            guard let value = tuple?.value else { return }\r\n            print(value)\r\n        }\r\n        // Assign data to the dataList\r\n        popover.dataList = spiceList\r\n        // Present the popover\r\n        present(popover, animated: true, completion: nil)\r\n    }\r\n}\r\n```\r\n### Set up a custom popover with data list\r\n\r\n```swift\r\nfunc setupCustomPopover(for sender: UIView) {\r\n    // Init a popover with a callback closure after selecting data\r\n    let popover = LCPopover\u003cInt\u003e(for: sender, title: \"Spices\") { tuple in\r\n        // Use of the selected tuple\r\n        guard let value = tuple?.value else { return }\r\n        print(value)\r\n    }\r\n    // Assign data to the dataList\r\n    popover.dataList = spiceList\r\n\r\n    // Set popover properties\r\n    popover.size = CGSize(width: 250, height: 219)\r\n    popover.arrowDirection = .down\r\n    popover.backgroundColor = .orange\r\n    popover.borderColor = .orange\r\n    popover.borderWidth = 2\r\n    popover.barHeight = 44\r\n    popover.titleFont = UIFont.boldSystemFont(ofSize: 19)\r\n    popover.titleColor = .orange\r\n    popover.textFont = UIFont(name: \"HelveticaNeue-MediumItalic\", size: 17) ?? UIFont.systemFont(ofSize: 17)\r\n    popover.textColor = .black\r\n\r\n    // Present the popover\r\n    present(popover, animated: true, completion: nil)\r\n}\r\n```\r\n\r\n## Installation\r\n\r\n### CocoaPods\r\n\r\nSpecify LCUIComponents into your project's `Podfile`:\r\n\r\n```ruby\r\nsource 'https://github.com/CocoaPods/Specs.git'\r\nplatform :ios, '9.0'\r\nuse_frameworks!\r\n\r\npod 'LCUIComponents'\r\n```\r\n\r\n### Manually Embedded\r\n\r\nSimply download and add the `Popover.swift` file from `Source` path to your project.\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinh-chu%2FLCUIComponents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinh-chu%2FLCUIComponents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinh-chu%2FLCUIComponents/lists"}