Skip to content

iTofu/Tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 12, 2025
1520657 Β· Mar 12, 2025

History

9 Commits
Mar 12, 2025
Mar 24, 2021
Mar 12, 2025
Mar 24, 2021
Mar 24, 2021
Mar 24, 2021
Mar 12, 2025
Mar 12, 2025
Mar 12, 2025
Mar 24, 2021
Mar 24, 2021

Repository files navigation

Tree

CI Status Version License Platform Laguage CocoaPods LeoDev GitHub stars

🎏 Tree can help you manage views more clearly.

⚠️ If you using this lib after Swift 5.4, you could @_exported import Tree, otherwise you may have to import Tree everywhere. Swift Bugfix Link

Checking your current swift version:

swift --version

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

ScreenShot_01

Requirements

  • iOS 8.0+

Installation

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

pod 'Tree'

Usage

  • Add subviews (or stackView) or layers:

    // import
    import Tree
    // or global import
    @_exported import Tree
    
    // view
    view <- [
      aView,
      bView <- [
        cView,
      ],
      dLayer,
      eStackView <- [
        fButton,
        gButton,
        (hButton, 0), // insert hButton at index 0
      ],
      judge ? iView : nil,
    ]
    
    // layer
    layer <- [
      aLayer,
      bLayer,
      nil,
      // lalala...
    ]

Author

Leo, leodaxia@gmail.com

License

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

About

🎏 Tree can help you manage views more clearly.

Resources

License

Stars

Watchers

Forks

Packages

No packages published