Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic preview of diagram library for iOS (Read 9785 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
preview of diagram library for iOS
Jun 26th, 2015 at 11:43am
Print Post  
We have implemented most of the core MindFusion diagramming API as a Swift 2.0 module. If anyone is interested in trying out a preview build, please download this archive containing the framework file and a simple application project:

https://mindfusion.eu/_beta/SwiftDiagram.zip

The DiagramView control is fully interactive and lets you draw and connect ShapeNode, TableNode, TreeViewNode and ContainerNode objects, based on the value of its Behavior property. The library also includes a NodeListView control that enables drag-and-drop creation of nodes. Features planned for v1.0 release that are not yet implemented are styled text and automatic layout algorithms.

In order to integrate Diagramming.framework into a new Xcode project, add it to Embedded Binaries and Linked Frameworks sections under target's General tab:



and Link Binary with Libraries and Embed Frameworks sections on Build Phases tab:



In addition, on Build Settings tab enable the Embedded Content Contains Swift Code property and add the Diagramming.Framework path to Framework Search Paths list, possibly using $(SRCROOT) value to find copy in local project folder:



In order to add a diagram view to a storyboard screen, create a View object, set its class in identity inspector to DiagramView, and set the type of its controller class to DiagramViewController.

Any comments, questions and general feedback are welcome.
« Last Edit: Jun 30th, 2015 at 7:00am by Stoyo »  
Back to top
 
IP Logged
 
Forum Admin
YaBB Administrator
*****
Offline


Rock and Roll

Posts: 573
Joined: Apr 6th, 2003
Re: preview of diagram library for iOS
Reply #1 - Jul 30th, 2015 at 2:11pm
Print Post  
This new build implements the LayeredLayout algorithm for automatic graph layout:

https://mindfusion.eu/_beta/SwiftDiagram.zip

It can be applied by calling the Diagram.arrange method with a LayeredLayout instance as argument:

Code
Select All
let defBounds = Rect(x: 0, y: 0, width: 20, height: 20)

let factory = dview.diagram.factory

let n1 = factory.createShapeNode(defBounds); n1.text = "1"
let n2 = factory.createShapeNode(defBounds); n2.text = "2"
let n3 = factory.createShapeNode(defBounds); n3.text = "3"
let n4 = factory.createShapeNode(defBounds); n4.text = "4"
let n5 = factory.createShapeNode(defBounds); n5.text = "5"
let n6 = factory.createShapeNode(defBounds); n6.text = "6"

factory.createDiagramLink(n1, destination: n2)
factory.createDiagramLink(n1, destination: n3)
factory.createDiagramLink(n2, destination: n4)
factory.createDiagramLink(n2, destination: n5)
factory.createDiagramLink(n4, destination: n6)
factory.createDiagramLink(n5, destination: n6)
factory.createDiagramLink(n3, destination: n6)
factory.createDiagramLink(n1, destination: n6)

let layout = LayeredLayout()
dview.diagram.arrange(layout) 





Enjoy!
  
Back to top
WWW  
IP Logged
 
Forum Admin
YaBB Administrator
*****
Offline


Rock and Roll

Posts: 573
Joined: Apr 6th, 2003
Re: preview of diagram library for iOS
Reply #2 - Sep 7th, 2015 at 1:50pm
Print Post  
This new build implements SpringLayout, FractalLayout and TreeLayout algorithms for automatic graph layout:

https://mindfusion.eu/_beta/SwiftDiagram.zip

Code
Select All
func onSpringLayout(sender:UIButton!)
{
    let layout = SpringLayout()
    diagramView.diagram.arrange(layout)
} 





Enjoy!
  
Back to top
WWW  
IP Logged
 
Forum Admin
YaBB Administrator
*****
Offline


Rock and Roll

Posts: 573
Joined: Apr 6th, 2003
Re: preview of diagram library for iOS
Reply #3 - Oct 26th, 2015 at 10:52am
Print Post  
A new build of the iOS diagram component is now available:
https://mindfusion.eu/_beta/SwiftDiagram.zip

1. The framework has been compiled using final released version of Swift 2.0 compiler.
2. The archive includes initial help reference in HTML format.
3. A built-in context menu allows deleting diagram items and starting in-place edit operations. The menu shows after a long press, and also raises contextMenuCreated event that lets you add custom commands to the menu or remove built-in ones.

Enjoy!
  
Back to top
WWW  
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2362
Joined: Oct 19th, 2005
Re: preview of diagram library for iOS
Reply #4 - Dec 6th, 2016 at 7:11pm
Print Post  
We have rebuilt the framework bundle using Swift 3 compiler  -
https://mindfusion.eu/_beta/SwiftDiagram.zip

ETA for official release is end of December.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2362
Joined: Oct 19th, 2005
Re: preview of diagram library for iOS
Reply #5 - Jan 4th, 2017 at 12:23pm
Print Post  
We have released v1.0 of the iOS diagram library. Distribution is now available here -
https://mindfusion.eu/SwiftDiagram.zip
  
Back to top
 
IP Logged
 
ato276
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 1
Joined: Jul 10th, 2017
Re: preview of diagram library for iOS
Reply #6 - Jul 10th, 2017 at 8:43pm
Print Post  
Can you update the preview of diagram library for iOS to newest Swift Version?
I have problem with Xcode 8.3.3 when try to compile the library: "Module compiled with Swift 3.0.2 cannot be imported in Swift 3.1"

Thanks!
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2362
Joined: Oct 19th, 2005
Re: preview of diagram library for iOS
Reply #7 - Jul 11th, 2017 at 7:46am
Print Post  
Hi,

We'll try to update it today.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2362
Joined: Oct 19th, 2005
Re: preview of diagram library for iOS
Reply #8 - Jul 11th, 2017 at 2:12pm
Print Post  
This build has been compiled using Swift 3.1 -
https://mindfusion.eu/SwiftDiagram.zip

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint