GithubHelp home page GithubHelp logo

lihuiyao1986 / azexpandableiconlistview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azuritul/azexpandableiconlistview

0.0 2.0 0.0 193 KB

An expandable/collapsible view component written in Swift.

License: MIT License

Ruby 6.10% Swift 39.59% Objective-C 3.29% Shell 51.02%

azexpandableiconlistview's Introduction

AZExpandableIconListView

CI Status Version License Platform Language

An expandable/collapsible UIView that holds an array of UIImageView. Something like accordion. An interesting practice with auto layout and animation.

Screenshots

expandable

Requirements

  • iOS 8 or above
  • Xcode 7 or above
  • Swift 2.1

Demo Project

To run the example project, clone the repo with git clone https://github.com/Azuritul/AZExpandableIconListView.git, and run pod install from the Example directory first.

Usage

Initialize the view with frame and an array of images, for example:

let expandable = AZExpandableIconListView(frame: CGRectMake(4, 30, UIScreen.mainScreen().bounds.size.width - 20, 70), images: [image1, image2, image3])
view.addSubview(expandable)

Notice that the width and height of the icons in the view would always be 80% of the containing view's height.

Configurable options

Currently AZDropdownMenu can be customized with the following properties. More will come in the future.

  • imageSpacing The space between icons. Default is 4.
  • onExpanded The method to be called when the menu is expanded. Default is null.
  • onCollapsed The method to be called when the menu is collapsed. Default is null.

Installation

AZExpandableIconListView is available through CocoaPods. To install it, simply add the following line to your Podfile:

use_frameworks!
pod 'AZExpandableIconListView'

Version

  • 0.1.1
    • Updated README
  • 0.1.0
    • Initial version

Credit

Author

Chris Wu (Azuritul), [email protected]

License

AZExpandableIconListView is available under the MIT license. See the LICENSE file for more info.

azexpandableiconlistview's People

Contributors

azuritul avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.