{"id":2260,"url":"https://github.com/gautier-gdx/Hexacon","last_synced_at":"2025-08-02T23:32:41.714Z","repository":{"id":56914519,"uuid":"53795349","full_name":"gautier-gdx/Hexacon","owner":"gautier-gdx","description":"A fancy hexagonal layout for displaying data like your Apple Watch","archived":false,"fork":false,"pushed_at":"2024-06-16T21:22:06.000Z","size":33461,"stargazers_count":344,"open_issues_count":4,"forks_count":22,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-10T20:29:12.952Z","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/gautier-gdx.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-13T16:31:55.000Z","updated_at":"2025-06-13T08:03:27.000Z","dependencies_parsed_at":"2024-06-19T22:50:17.019Z","dependency_job_id":"138d03fc-dd0d-4091-bb5b-04e16e0bb867","html_url":"https://github.com/gautier-gdx/Hexacon","commit_stats":{"total_commits":64,"total_committers":5,"mean_commits":12.8,"dds":0.109375,"last_synced_commit":"193caa6a3a2be655309ae10aa272650a9e70eb0a"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/gautier-gdx/Hexacon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gautier-gdx%2FHexacon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gautier-gdx%2FHexacon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gautier-gdx%2FHexacon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gautier-gdx%2FHexacon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gautier-gdx","download_url":"https://codeload.github.com/gautier-gdx/Hexacon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gautier-gdx%2FHexacon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268472913,"owners_count":24255786,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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:09.148Z","updated_at":"2025-08-02T23:32:41.388Z","avatar_url":"https://github.com/gautier-gdx.png","language":"Swift","funding_links":[],"categories":["UI","Menu","Libs","UI [🔝](#readme)"],"sub_categories":["Activity Indicator","UI","Other free courses"],"readme":"\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/gautier-gdx/Hexacon/assets/hexacon-logo.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://travis-ci.org/gautier-gdx/Hexacon.svg\"\u003e\u003cimg alt=\"Travis Status\" src=\"https://travis-ci.org/gautier-gdx/Hexacon.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://img.shields.io/cocoapods/v/Hexacon.svg\"\u003e\u003cimg alt=\"CocoaPods compatible\" src=\"https://img.shields.io/cocoapods/v/Hexacon.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\u003cimg alt=\"Carthage compatible\" src=\"https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**Hexacon** is a new way to display content in your app like the Apple Watch SpringBoard\n\nHighly inspired by the work of [`lmmenge`](https://github.com/lmmenge/WatchSpringboard-Prototype).\nSpecial thanks to [`zenly`](https://github.com/znly) for giving me the opportunity to do this\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"#demo\"\u003eDemo\u003c/a\u003e • \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e • \u003ca href=\"#properties\"\u003eProperties\u003c/a\u003e • \u003ca href=\"#methods\"\u003eMethods\u003c/a\u003e • \u003ca href=\"#protocols\"\u003eProtocols\u003c/a\u003e • \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n\n## Demo\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/gautier-gdx/Hexacon/assets/HexaconDemo3.gif\" /\u003e\n\u003c/p\u003e\n\nYou can also use the example provided in the repository or use `pod try Hexacon`\n\n### How to use\n\nLike a UITableView!\n\nadd it as a subview\n```swift\noverride func viewDidLoad() {\n    super.viewDidLoad()\n\n    let hexagonalView = HexagonalView(frame: self.view.bounds)\n    hexagonalView.hexagonalDataSource = self\n\n    view.addSubview(hexagonalView)\n}\n``` \nThen use the dataSource protocol\n```swift\nextension ViewController: HexagonalViewDataSource {\n\n    func numberOfItemInHexagonalView(hexagonalView: HexagonalView) -\u003e Int {\n        return data.count - 1\n    }\n\n    func hexagonalView(hexagonalView: HexagonalView, imageForIndex index: Int) -\u003e UIImage? {\n        return data[index]\n    }\n}\n``` \n\n## Installation\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate Hexacon into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"gautier-gdx/Hexacon\"\n```\n\n### Cocoapods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects.\n\nYou can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\nTo integrate Hexacon into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nuse_frameworks!\n\npod 'Hexacon'\n```\n## Properties\n\nThe HexagonalView has the following properties:\n```swift\nweak var hexagonalDataSource: HexagonalViewDataSource?\n```\nAn object that supports the HexagonalViewDataSource protocol and can provide views or images to configures the HexagonalView.\n```swift\n weak var hexagonalDelegate: HexagonalViewDelegate?\n```\nAn object that supports the HexagonalViewDelegate protocol and can respond to HexagonalView events.\n```swift\npublic var lastFocusedViewIndex: Int \n```\nThe index of the view where the HexagonalView is or was centered on.\n\n```swift\npublic var itemAppearance: HexagonalItemViewAppearance\n```    \nthe appearance is used to configure the global apperance of the layout and the HexagonalItemView\n\n#### Appearance\n\n```swift\npublic struct HexagonalItemViewAppearance {\n\n    public var needToConfigureItem: Bool // used to circle image and add border, default is false\n    public var itemSize: CGFloat\n    public var itemSpacing: CGFloat\n    public var itemBorderWidth: CGFloat\n    public var itemBorderColor: UIColor\n\n    //animation\n    public var animationType: HexagonalAnimationType\n    public var animationDuration: NSTimeInterval\n}\n``` \nThe default appearance is:\n```swift\n itemAppearance = HexagonalItemViewAppearance(\n    \n    needToConfigureItem: false,\n    itemSize: 50,\n    itemSpacing: 10,\n    itemBorderWidth: 5,\n    itemBorderColor: UIColor.grayColor(),\n\n    animationType: .Circle,\n    animationDuration: 0.2)\n``` \n\n#### Animation\n\nThere is three types of animation available (more to come)\n```swift\npublic enum HexagonalAnimationType { case Spiral, Circle, None }\n``` \n\n## Methods\n\n``` swift\nfunc reloadData() \n```\nThis function load or reload all the view from the dataSource and refreshes the display\n``` swift\nfunc viewForIndex(index: Int) -\u003e HexagonalItemView?\n```\nReturn a view at given index if it exists\n\n## Protocols\n\nThere is Two protocols in hexacon, HexagonalViewDataSource and  HexagonalViewDelegate\n\n#### dataSource\n\n``` swift\nfunc numberOfItemInHexagonalView(hexagonalView: HexagonalView) -\u003e Int\n```\nReturn the number of items the view will contain\n``` swift\nfunc hexagonalView(hexagonalView: HexagonalView,imageForIndex index: Int) -\u003e UIImage?\n```\nReturn a image to be displayed at index\n``` swift\nfunc hexagonalView(hexagonalView: HexagonalView,viewForIndex index: Int) -\u003e UIView?\n```\nReturn a view to be displayed at index, the view will be transformed in an image before being displayed\n\n`NB: all of this methods are optional and you will have to choose whether you want to display a view or an image otherwise the image will be chosen in priority`\n\n#### delegate\n\n``` swift\nfunc hexagonalView(hexagonalView: HexagonalView, didSelectItemAtIndex index: Int)\n```\nThis method is called when the user has selected a view\n``` swift\nfunc hexagonalView(hexagonalView: HexagonalView, willCenterOnIndex index: Int)\n```\nThis method is called when the HexagonalView will center on an item, it gives you the new value of lastFocusedViewIndex\n\n## License\n\nCopyright (c) 2015 Gautier Gédoux\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgautier-gdx%2FHexacon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgautier-gdx%2FHexacon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgautier-gdx%2FHexacon/lists"}