Latest 1.2.0
Homepage https://github.com/ndennu/HoverView
License MIT
Platforms ios 9.0
Authors

HoverView Framework

New revolutionnary bubble component

CocoaPods Build Status pod version License: MIT Readme Score Coverage Status

Prerequisites

  • XCode 9 and Swift 4
  • CocoaPod
  • iOS 11 project

Installation

  1. Add this line to your Podfile
    pod 'HoverViewFramework', '~> 1.2'
  2. Run pod install to install HoverViewFramework to your project
  3. Have fun !

Usage

First, you must import the framework with this line :

import HoverViewFramework

Then, you can use HoverViewController like this exemple of usage.

let mainViewController = ViewController()
let rootViewController = UINavigationController(rootViewController: mainViewController)
let hoverViewController = HoverViewController()
hoverViewController.setupWithImage(rootViewController: rootViewController, size: 50, imgBubbleName: "bubbleImage.png", imgTrashName: "cross.png")
hoverViewController.delegate = mainViewController

To add the bubble you need to call hvc.addBubble() in your view controller

class ViewController: UIViewController {
    // ... some code
    // Add only one bubble
    func addBubble() {
        // We need to call hvc.addBubble() to display a bubble
        // You can call it in button action code
        if let hvc = hoverViewController {
            hvc.addBubble()
        }
    }
    // ... some code
}
// Delegate to get the HoverViewController and other usefull event
extension ViewController: HoverViewControllerDelegate {
    public func hoverViewController(_ hoverViewController: HoverViewController) {
        self.hoverViewController = hoverViewController
    }
}

HoverViewController’s available methods

Method name Parameters Return type
init none HoverViewController
setupWithImage bubbleImage name and trash image name void
addBubble none void

HoverViewControllerDelegate’s available methods

Method name Parameters Return type
hoverViewController HoverViewController void
hoverViewController / didTouchUpInsideHoverView HoverViewController and UIView void

Delegate implementation

func hoverViewController(_ hoverViewController: HoverViewController) {
    // ... some code
}

func hoverViewController(_ hoverViewController: HoverViewController, didTouchUpInsideHoverView view: UIView) {
    // ... some code
}

Version History

  • v1.2.0
- Fixed landcape mode handling for HoverViewController
- Added automatic positioning for the BubbleView
  • v1.1.5
- Added new tap event for BubbleView in delegate
- Fixed README.md
  • v1.0.3
- Initial working release

Credits

  • Ahmed HACHEMI (Developper)
  • Jeyaksan RAJARATNAM (Developper)
  • Nicolas DENNU (Developper)

Licence

MIT License

Copyright (c) 2018 ajn

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.

Latest podspec

{
    "name": "HoverViewFramework",
    "version": "1.2.0",
    "license": "MIT",
    "summary": "New revolutionnary bubble component",
    "homepage": "https://github.com/ndennu/HoverView",
    "authors": {
        "groupe1": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ndennu/HoverView.git",
        "tag": "1.2.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "HoverView/*.swift",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This