Giter VIP home page Giter VIP logo

ios-mindmap's Introduction

MindMap

树状结构的展开的思维导图

可实现结构知识点的树状分层展示,树状层次可根据特定的数据格式进行分层加载以及关闭。

使用方式:

项目中导入MindMapViewController试图控制器类以及思维导图模块

导图初始化方法

//加载MindMap背景视图

  • (void)initializeMindMapView

{

//加载背景视图

mindMapBackgroundView = [[MindMapBackgroundView alloc] initWithFrame:CGRectMake( 0, 0, 3 * ScreenWidth, 3 * ScreenHeight)];

mindMapScrollView = [[SMScrollView alloc] initWithFrame:self.view.bounds];

//背景色

mindMapScrollView.backgroundColor = [UIColor colorWithRed:1 green:0.58 blue:0.27 alpha:1];、

//最大放大比例

mindMapScrollView.maximumZoomScale = 4;

//设置委托

mindMapScrollView.delegate = self;

//尺寸变换模式

mindMapScrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

//内容尺寸

mindMapScrollView.contentSize = mindMapBackgroundView.size;

mindMapScrollView.alwaysBounceVertical = YES;

mindMapScrollView.alwaysBounceHorizontal = YES;

mindMapScrollView.stickToBounds = YES;

[mindMapScrollView addViewForZooming:mindMapBackgroundView];

[mindMapScrollView scaleToFit];


//添加视图

[self.view addSubview:mindMapScrollView];

}

ios-mindmap's People

Contributors

kevin-wang-online 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.