https://github.com/isaced/ishappypuzzle
just want to hapyy puzzle!
https://github.com/isaced/ishappypuzzle
Last synced: 11 months ago
JSON representation
just want to hapyy puzzle!
- Host: GitHub
- URL: https://github.com/isaced/ishappypuzzle
- Owner: isaced
- License: mit
- Created: 2016-10-26T10:10:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-31T09:46:32.000Z (over 9 years ago)
- Last Synced: 2025-07-28T13:03:46.770Z (12 months ago)
- Language: Swift
- Size: 2.11 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ISHappyPuzzle
just want to hapyy puzzle!
- Swift3
- Xcode8

#### Layout
很方便的使用 JSON 文件来组织布局模型数据,格式如下:
```
[
{
"x": 0.587,
"y": 0.490,
"width": 0.384,
"height": 0.215
},
...
]
```
这是每一块的表示,多个块包在一个数组里即可。
#### Go
使用非常简单,可以从文件或者网络中读取布局模型数据,然后通过 `ISHappyPuzzleView` 装载:
```
// 初始化
let puzzleView = ISHappyPuzzleView()
// 加载布局
puzzleView.loadLayout(layoutInfo)
// 截图
let screenshot = puzzleView.screenShot()
```
...
#### Cocoapods
```
pod 'ISHappyPuzzle'
```