Git Product home page Git Product logo

floatingmenu's Introduction

๐Ÿ–ผ FloatingMenu

FloatingMenu with expand and compress animation, written in Swift

alt text alt text

๐Ÿ”จ How to use

  • Add FloatingMenuView.swift and FloatingMenuView.xib to your project.
  • If Static identifiers needed then use Constants.swift file.
  • Use the ExtensionClass.swift file for Menu button extension title alignment
  • You can use CustomButtonView as the UIbutton Class

You can instantiate the menu by using on a button action

 let menuView = FloatingMenuView(frame: UIScreen.main.bounds)
 menuView.alpha = 0
 UIApplication.shared.keyWindow?.addSubview(menuView)
 UIView.animate(withDuration: 0.3, delay: 0, options: [.transitionCrossDissolve], animations: {
   menuView.alpha = 1
  }, completion: nil)

on each view controller you have to manually add view and set the identifier for each view controller

  let btnCustom = CustomButtonView(frame: CGRect(x: view.bounds.maxX - 100, y: view.bounds.maxY - 100, width: 70, height: 70))
  btnCustom.controllerIdentifier = Constants.VC_TAG_VALUE.TWO_TAG
  view.addSubview(btnCustom)

FloatingMenuView.swift

Inside the FloatingMenuView.swift you can set the COLUMN_COUNT and ROW_COUNT

Use MenuModel as the Model data for each menu button.

properties available to the model are

- storyBoardName
- storyBoardId
- title
- selectedImage
- unSelectedImage

On creating the Model array of menu button set the specific properties for each.

let Model = MenuModel(storyBoardName: "Main", storyBoardId: Constants.IDENTIFIERS.ONE_CONTROLLER,title: "Captain", selectedImage: "cap-icon", unSelectedImage: "cap-icon")

๐Ÿ‘ค Author

Faisal Azeez [email protected]

๐Ÿ“„ License

Floating-Menu is available under the MIT license. See the LICENSE file for more info.

floatingmenu's People

Contributors

faisalazeez 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.