Heisenberg
Heisenberg
is an iOS
UI library for creating / using chemical structures with written in Swift
. It represent directional structures as using HeisenbergDirectionalStructure
and just linear structures as using HeisenbergLinearStructure
. You can change bonds between two elements as SingleBond
, DoubleBond
or TripleBond
HeisenbergDirectionalStructure
is based on Graph
and HeisenbergLinearStructure
is based on SinglyLinkedList
. You can create just x-axis linear structure with HeisenbergLinearStructure
but with HeisenbergDirectionalStructure
you can create / build what a Graph
can do it.
HeisenbergLinearStructure
HeisenbergDirectionalStructure
Bonding Between Atoms
You can tie two or more atoms with elements bonds. There's a list for bond way.
HeisenbergBoard
HeisenbergBoard
is a class for creating board to handle UI structure of chemical structures. You can pass any HeisenbergLinearStructure
or HeisenbergDirectionalStructure
and you must select a backgroundColor
of the board. Then method drawBoard()
returns a UIView
for your structure.
Example
I've added bunch of test functions to generate a Heisenberg
. You can check it out.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
Installation
Heisenberg is available through CocoaPods. To install
it, simply add the following line to your Podfile:
Author
eliakorkmaz, emrahkrkmz1@gmail.com