Skip to content

Commit 3fc9893

Browse files
committed
Update README.md
1 parent c537b3f commit 3fc9893

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ This SDK enables you to create and modify xmind(`.xmind`) files, and it's writte
99
Supported Platforms:
1010

1111
- iOS 9+
12+
1213
- macOS 10.11+
1314

15+
16+
1417
## Structure of XMind files
1518

1619
XMind file is a zip file which contains several components, including manifest, metadata, sheets and resources.
@@ -23,6 +26,46 @@ Sheets contains all of the topics that belong to the each sheets(canvas).
2326

2427
Manifest lists primary files that contained in this xmind file.
2528

29+
30+
31+
## Fast Creating
32+
33+
When you just wanna create a xmind file easily. Use the DSL.
34+
35+
```swift
36+
import XMindSDK
37+
38+
...
39+
...
40+
41+
let wb = try! workbook {
42+
topic(title: "Apple") {
43+
topic(title: "Hardware") {
44+
topic(title: "iPhone") {
45+
topic(title: "iPhone 6")
46+
topic(title: "iPhone 7 Plus")
47+
topic(title: "iPhone 8")
48+
topic(title: "iPhone XS Max")
49+
}
50+
topic(title: "Mac") {
51+
topic(title: "MacBook Pro")
52+
topic(title: "Mac mini")
53+
topic(title: "Mac Pro")
54+
}
55+
}
56+
57+
topic(title: "Software") {
58+
topic(title: "Xcode")
59+
topic(title: "Siri")
60+
}
61+
}
62+
}
63+
64+
try wb.save(to: filePath)
65+
```
66+
67+
68+
2669
## Usage
2770

2871
If you create a new xmind file, you can directly operate sheets and topics after initializing a `Workbook` instance that represents a xmind file.

0 commit comments

Comments
 (0)