A fancy hexagonal layout for displaying data like your Apple Watch

Overview

Travis Status CocoaPods compatible Carthage compatible

Hexacon is a new way to display content in your app like the Apple Watch SpringBoard

Highly inspired by the work of lmmenge. Special thanks to zenly for giving me the opportunity to do this

DemoInstallationPropertiesMethodsProtocolsLicense

Demo

You can also use the example provided in the repository or use pod try Hexacon

How to use

Like a UITableView!

add it as a subview

override func viewDidLoad() {
    super.viewDidLoad()

    let hexagonalView = HexagonalView(frame: self.view.bounds)
    hexagonalView.hexagonalDataSource = self

    view.addSubview(hexagonalView)
}

Then use the dataSource protocol

extension ViewController: HexagonalViewDataSource {

    func numberOfItemInHexagonalView(hexagonalView: HexagonalView) -> Int {
        return data.count - 1
    }

    func hexagonalView(hexagonalView: HexagonalView, imageForIndex index: Int) -> UIImage? {
        return data[index]
    }
}

Installation

Carthage

Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate Hexacon into your Xcode project using Carthage, specify it in your Cartfile:

github "gautier-gdx/Hexacon"

Cocoapods

CocoaPods is a dependency manager for Cocoa projects.

You can install it with the following command:

$ gem install cocoapods

To integrate Hexacon into your Xcode project using CocoaPods, specify it in your Podfile:

use_frameworks!

pod 'Hexacon'

Properties

The HexagonalView has the following properties:

weak var hexagonalDataSource: HexagonalViewDataSource?

An object that supports the HexagonalViewDataSource protocol and can provide views or images to configures the HexagonalView.

 weak var hexagonalDelegate: HexagonalViewDelegate?

An object that supports the HexagonalViewDelegate protocol and can respond to HexagonalView events.

public var lastFocusedViewIndex: Int 

The index of the view where the HexagonalView is or was centered on.

public var itemAppearance: HexagonalItemViewAppearance

the appearance is used to configure the global apperance of the layout and the HexagonalItemView

Appearance

public struct HexagonalItemViewAppearance {

    public var needToConfigureItem: Bool // used to circle image and add border, default is false
    public var itemSize: CGFloat
    public var itemSpacing: CGFloat
    public var itemBorderWidth: CGFloat
    public var itemBorderColor: UIColor

    //animation
    public var animationType: HexagonalAnimationType
    public var animationDuration: NSTimeInterval
}

The default appearance is:

 itemAppearance = HexagonalItemViewAppearance(
    
    needToConfigureItem: false,
    itemSize: 50,
    itemSpacing: 10,
    itemBorderWidth: 5,
    itemBorderColor: UIColor.grayColor(),

    animationType: .Circle,
    animationDuration: 0.2)

Animation

There is three types of animation available (more to come)

public enum HexagonalAnimationType { case Spiral, Circle, None }

Methods

func reloadData() 

This function load or reload all the view from the dataSource and refreshes the display

func viewForIndex(index: Int) -> HexagonalItemView?

Return a view at given index if it exists

Protocols

There is Two protocols in hexacon, HexagonalViewDataSource and HexagonalViewDelegate

dataSource

func numberOfItemInHexagonalView(hexagonalView: HexagonalView) -> Int

Return the number of items the view will contain

func hexagonalView(hexagonalView: HexagonalView,imageForIndex index: Int) -> UIImage?

Return a image to be displayed at index

func hexagonalView(hexagonalView: HexagonalView,viewForIndex index: Int) -> UIView?

Return a view to be displayed at index, the view will be transformed in an image before being displayed

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

delegate

func hexagonalView(hexagonalView: HexagonalView, didSelectItemAtIndex index: Int)

This method is called when the user has selected a view

func hexagonalView(hexagonalView: HexagonalView, willCenterOnIndex index: Int)

This method is called when the HexagonalView will center on an item, it gives you the new value of lastFocusedViewIndex

License

Copyright (c) 2015 Gautier Gédoux

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • Fix path to .xcodeproj in ExaconExample.xcworkspace file

    Fix path to .xcodeproj in ExaconExample.xcworkspace file

    This commit changes an absolute path to a realtive one. After this operation it is possible to launch the example by opening ExaconExample.xcworkspace file.

    opened by albinekcom 1
  • Bug with the profile picture. When I opened the app, the profile pic of Alena was the one the user A we see below. After a few second, the app glitches and the picture of Alena refreshed with the good one.

    Bug with the profile picture. When I opened the app, the profile pic of Alena was the one the user A we see below. After a few second, the app glitches and the picture of Alena refreshed with the good one.

    New bug reported in 📱 Wizz iOS. More details available on bug's link: https://app.shakebugs.com/wizz/user-feedback/8IS2DOMS/149

    Tags bug

    screenshot.jpg

    Granted permissions ✅ Access to camera ✅ Access to media library ✅ Access to photo library

    ALL OTHER PERMISSIONS WERE EITHER DENIED OR NOT REQUESTED.


    Reporter [email protected]

    OS iOS 16.1

    Device iPhone 13 mini

    App version 6.0.5 (2)

    Network WiFi

    Current view PopAnswersTableViewController


    Timezone Europe/Paris

    Locale en-FR


    Battery status 100% • Unplugged

    Used storage 23% • 109.5 out of 476.7 GB

    Authentication to unlock device Required


    Resolution 2340 ✕ 1080 px

    Orientation Portrait


    Shake SDK version 15.3.0


    Metadata Not available

    opened by gautier-gdx 0
  • In a pop reply there is no text, only pic

    In a pop reply there is no text, only pic

    New bug reported in 📱 Wizz iOS. More details available on bug's link: https://app.shakebugs.com/wizz/user-feedback/8IS2DOMS/148

    Tags bug

    screenshot.jpg

    Granted permissions ✅ Access to media library ✅ Access to microphone ✅ Access to photo library

    ALL OTHER PERMISSIONS WERE EITHER DENIED OR NOT REQUESTED.


    Reporter Not available

    OS iOS 16.1.1

    Device iPhone 13 Pro

    App version 6.0.3 (2)

    Network WiFi

    Current view DiscussionMessageViewController


    Timezone Europe/Helsinki

    Locale en-FI


    Battery status 61% • Unplugged

    Used storage 40% • 95.3 out of 238.3 GB

    Authentication to unlock device Required


    Resolution 2532 ✕ 1170 px

    Orientation Portrait


    Shake SDK version 15.3.0


    Metadata Not available

    opened by gautier-gdx 0
  • For Alyona

    For Alyona

    New bug reported in 📱 Wizz iOS. More details available on bug's link: https://app.shakebugs.com/wizz/user-feedback/8IS2DOMS/147

    Tags bug

    screenshot.jpg

    Granted permissions ✅ Access to media library ✅ Access to photo library

    ALL OTHER PERMISSIONS WERE EITHER DENIED OR NOT REQUESTED.


    Reporter Not available

    OS iOS 16.1.1

    Device iPhone 13 Pro

    App version 6.0.3 (2)

    Network WiFi

    Current view PopAnswersTableViewController


    Timezone Europe/Helsinki

    Locale en-FI


    Battery status 77% • Unplugged

    Used storage 40% • 95.5 out of 238.3 GB

    Authentication to unlock device Required


    Resolution 2532 ✕ 1170 px

    Orientation Portrait


    Shake SDK version 15.3.0


    Metadata Not available

    opened by gautier-gdx 0
  • Lots of bugs with red badges. When you come from a push notif, answer the message, the tabbar shows a red badge even if nothing is unread.

    Lots of bugs with red badges. When you come from a push notif, answer the message, the tabbar shows a red badge even if nothing is unread.

    New bug reported in 📱 Wizz iOS. More details available on bug's link: https://app.shakebugs.com/wizz/user-feedback/8IS2DOMS/146

    Tags bug

    Screenshot Not available

    Granted permissions ✅ Access to camera ✅ Access to media library ✅ Access to photo library

    ALL OTHER PERMISSIONS WERE EITHER DENIED OR NOT REQUESTED.


    Reporter [email protected]

    OS iOS 16.1

    Device iPhone 13 mini

    App version 6.0.3 (2)

    Network Cellular 4G • BOUYGUES Telecom

    Current view PopAnswersTableViewController


    Timezone Europe/Paris

    Locale en-FR


    Battery status 66% • Unplugged

    Used storage 23% • 109.1 out of 476.7 GB

    Authentication to unlock device Required


    Resolution 2340 ✕ 1080 px

    Orientation Portrait


    Shake SDK version 15.3.0


    Metadata Not available

    opened by gautier-gdx 0
  • No badge on tabbar

    No badge on tabbar

    New bug reported in 📱 Wizz iOS. More details available on bug's link: https://app.shakebugs.com/wizz/user-feedback/8IS2DOMS/145

    Tags bug

    screenshot.jpg

    Granted permissions ✅ Access to camera ✅ Access to media library ✅ Access to photo library

    ALL OTHER PERMISSIONS WERE EITHER DENIED OR NOT REQUESTED.


    Reporter [email protected]

    OS iOS 16.1

    Device iPhone 13 mini

    App version 6.0.3 (2)

    Network Cellular 4G • BOUYGUES Telecom

    Current view FriendsDiscussionViewController


    Timezone Europe/Paris

    Locale en-FR


    Battery status 55% • Unplugged

    Used storage 23% • 108.7 out of 476.7 GB

    Authentication to unlock device Required


    Resolution 2340 ✕ 1080 px

    Orientation Portrait


    Shake SDK version 15.3.0


    Metadata Not available

    opened by gautier-gdx 0
  • I received messages but I dont see the badge on the tabbar

    I received messages but I dont see the badge on the tabbar

    New bug reported in 📱 Wizz iOS. More details available on bug's link: https://app.shakebugs.com/wizz/user-feedback/8IS2DOMS/144

    Tags bug

    screenshot.jpg

    Granted permissions ✅ Access to camera ✅ Access to media library ✅ Access to photo library

    ALL OTHER PERMISSIONS WERE EITHER DENIED OR NOT REQUESTED.


    Reporter [email protected]

    OS iOS 16.1

    Device iPhone 13 mini

    App version 6.0.3 (2)

    Network Cellular 5G

    Current view PopAnswersTableViewController


    Timezone Europe/Paris

    Locale en-FR


    Battery status 55% • Unplugged

    Used storage 23% • 108.7 out of 476.7 GB

    Authentication to unlock device Required


    Resolution 2340 ✕ 1080 px

    Orientation Portrait


    Shake SDK version 15.3.0


    Metadata Not available

    opened by gautier-gdx 0
Owner
Gautier Gédoux
Lead tech engineer 💽
Gautier Gédoux
A simple and awesome loading Activity Indicator(with block moving animation) for your iOS app.

BPBlockActivityIndicator BPBlockActivityIndicator is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on iO

Ben.Park 43 Nov 6, 2021
StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again

StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again. It supports apps which hide the status bar and The Notch

Idle Hands Apps 160 Nov 2, 2022
Material Linear Progress Bar for your iOS apps

LinearProgressBar Material Linear Progress Bar for your iOS apps Installation Carthage: github "Recouse/LinearProgressBar" CocoaPods: Add this to you

Firdavs Khaydarov 161 Dec 5, 2022
Show pleasant loading view for your users 😍

RHPlaceholder ?? Because traditional loading view like UIActivityIndicatorView or similar one are no longer so trendy (Facebook or Instagram apps are

Robert Herdzik 238 Nov 2, 2022
Create your own faces for watchOS. Customize the watch hands, layout, colors, and images. Edit faces on your phone and switch them on the watch.

AppleWatchFaces Design your own watch faces for the apple watch. They are not real watch faces, but a watchOS app running on the watch that tells you

Mike Hill 395 Oct 20, 2022
Terminal Watch Face for Apple Watch

Terminal Watch Face for Apple Watch

Gábor Librecz 1.9k Dec 29, 2022
HoneycombView is the iOS UIView for displaying like Honeycomb layout written by swift

HoneycombView iOS UIView for Honeycomb layout include with photoBrowser. Requirements iOS 8.0+ Swift 2.0+ ARC ##Installation ####CocoaPods HoneycombVi

keishi suzuki 200 May 16, 2022
Fancy news app that diwnloads data from new.com api and shows it in a paging collectionview.

Fancy news reader PAging collection view that shows latest news from techcurch.com and displays full content in a detail page, was built to practice t

Abdul-Mujeeb Aliu 31 Feb 10, 2022
Collect payments with iPhone, Apple Watch, and Siri using Apple Pay

Offering Apple Pay in Your App Collect payments with iPhone, Apple Watch, and Si

Edgar Papyan 4 Dec 14, 2021
Make Apple Watch data transfer rate from iPhone go brrrrrrrr

NanoFi Speed up data transfer from iOS to Apple Watch rate By default, Apple Watch prioritized Bluetooth connection, which makes transferring of music

null 18 Dec 22, 2022
List tree data souce to display hierachical data structures in lists-like way. It's UI agnostic, just like view-model and doesn't depend on UI framework

SwiftListTreeDataSource List tree data souce to display hierachical data structures in lists-like way. It's UI agnostic, just like view-model, so can

Dzmitry Antonenka 26 Nov 26, 2022
ChainPageCollectionView A custom View with two level chained collection views and fancy transition animation

ChainPageCollectionView A custom View with two level chained collection views and fancy transition animation. Demo Requirements iOS 9.0+ Xcode 8 Insta

Yansong Li 775 Dec 7, 2022
A fancy logger yet lightweight, and configurable. 🖨

?? ?? Important: Printer can only print console logs if you're running an app in the Simulator. If you're running in a real device it will not print a

Hemang 66 Dec 7, 2022
An SSH config parser library with a fancy API

The SshConfig makes it quick and easy to load, parse, and decode/encode the SSH configs. It also helps to resolve the properties by hostname and use them safely in your apps (thanks for Optional and static types in Swift).

Artem Labazin 8 Nov 25, 2022
Fancy Swift implementation of the Visual Format Language (experimental and doesn't work with the recent version of Swift)

VFLToolbox Autolayout is awesome! VFL a.k.a Visual Format Language is even more awesome because it allows you to shorten constraints setting code. The

0xc010d 144 Jun 29, 2022
A library for fancy iOS animations that you will definitely love.

EazelAnimationsKit Table of Contents Introduction Animations Usage Installation Contribution Authors Introduction The drive for developing this animat

Eazel 7 Dec 13, 2022
A fancy collection style view controller that was inspired by this Profile Card mockup

JFCardSelectionViewController A fancy collection style view controller that was inspired by this Profile Card mockup: https://dribbble.com/shots/14584

Jeremy Fox 430 Dec 5, 2022
A CollectionView Layout displaying a slanted cells

CollectionViewSlantedLayout is a subclass of the UICollectionViewLayout allowing the display of slanted cells in a UICollectionView. Features Pure Swi

Yassir Barchi 2.2k Dec 27, 2022
A CollectionView Layout displaying a slanted cells

CollectionViewSlantedLayout is a subclass of the UICollectionViewLayout allowing the display of slanted cells in a UICollectionView. Features Pure Swi

Yassir Barchi 2.2k Dec 27, 2022