Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
swift可用,oc暂不支持
  • Loading branch information
crypto committed Dec 26, 2019
1 parent 12b305f commit 28d4552
Show file tree
Hide file tree
Showing 39 changed files with 43 additions and 137 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified Code/.DS_Store
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion MCircleBoard.podspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@version = "0.0.8"
@version = "1.0.0"
Pod::Spec.new do |s|
s.name = "MCircleBoard"
s.version = @version
Expand Down
8 changes: 4 additions & 4 deletions MCircleBoard.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
4852A43A21EC8D5600E017BE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4852A43821EC8D5600E017BE /* LaunchScreen.storyboard */; };
4852A44521EC8D5600E017BE /* MCircleBoardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4852A44421EC8D5600E017BE /* MCircleBoardTests.swift */; };
4852A45021EC8D5600E017BE /* MCircleBoardUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4852A44F21EC8D5600E017BE /* MCircleBoardUITests.swift */; };
485ACDB623B1E23D0065C029 /* MCircleBoard.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 485ACDB523B1E23D0065C029 /* MCircleBoard.bundle */; };
485EE78123B36240008BEC2D /* MCircleBoard.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 485EE78023B36240008BEC2D /* MCircleBoard.bundle */; };
4876096421ED6D8A008F7B78 /* MCircleBoard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4876096321ED6D8A008F7B78 /* MCircleBoard.swift */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -49,7 +49,7 @@
4852A44B21EC8D5600E017BE /* MCircleBoardUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MCircleBoardUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4852A44F21EC8D5600E017BE /* MCircleBoardUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MCircleBoardUITests.swift; sourceTree = "<group>"; };
4852A45121EC8D5600E017BE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
485ACDB523B1E23D0065C029 /* MCircleBoard.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = MCircleBoard.bundle; sourceTree = SOURCE_ROOT; };
485EE78023B36240008BEC2D /* MCircleBoard.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = MCircleBoard.bundle; path = Code/MCircleBoard.bundle; sourceTree = SOURCE_ROOT; };
4876096321ED6D8A008F7B78 /* MCircleBoard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MCircleBoard.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -108,7 +108,7 @@
4852A43621EC8D5600E017BE /* Assets.xcassets */,
4852A43821EC8D5600E017BE /* LaunchScreen.storyboard */,
4852A43B21EC8D5600E017BE /* Info.plist */,
485ACDB523B1E23D0065C029 /* MCircleBoard.bundle */,
485EE78023B36240008BEC2D /* MCircleBoard.bundle */,
);
path = MCircleBoard;
sourceTree = "<group>";
Expand Down Expand Up @@ -237,7 +237,7 @@
files = (
4852A43A21EC8D5600E017BE /* LaunchScreen.storyboard in Resources */,
4852A43721EC8D5600E017BE /* Assets.xcassets in Resources */,
485ACDB623B1E23D0065C029 /* MCircleBoard.bundle in Resources */,
485EE78123B36240008BEC2D /* MCircleBoard.bundle in Resources */,
4852A43521EC8D5500E017BE /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "circleicon_red.png",
"filename" : "black.png",
"scale" : "1x"
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "circleicon_blue.png",
"filename" : "blue.png",
"scale" : "1x"
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "circleicon_grey.png",
"filename" : "green.png",
"scale" : "1x"
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "circleicon_green.png",
"filename" : "red.png",
"scale" : "1x"
},
{
Expand Down
Binary file added MCircleBoard/Assets.xcassets/red.imageset/red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions MCircleBoard/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class ViewController: UIViewController {
super.viewDidLoad()

let array1:[(imageName:String, count:Int)] = [
("circleicon_black", 12),
("circleicon_green", 6),
("circleicon_black", 3),
("circleicon_purple", 9)
("black", 5),
("green", 6),
("black", 3),
("green", 3)
]

let array2:[(imageType: MCircleItemType, count:Int)] = [
Expand All @@ -35,18 +35,18 @@ class ViewController: UIViewController {
(.red, 9)
]

let array3:[String] = ["circleicon_black",
"circleicon_black",
"circleicon_black",
"circleicon_black",
"circleicon_black",
"circleicon_lightblue",
"circleicon_lightblue",
"circleicon_lightblue",
"circleicon_lightblue",
"circleicon_red",
"circleicon_red",
"circleicon_red"]
let array3:[String] = ["black",
"black",
"black",
"black",
"black",
"blue",
"blue",
"blue",
"blue",
"red",
"red",
"red"]

let array4:[MCircleItemType] = [.white, .white, .white, .white, .white, .yellow, .yellow, .yellow, .yellow, .yellow, .black, .black, .black, .black, .red, .red, .red]

Expand All @@ -57,7 +57,7 @@ class ViewController: UIViewController {
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 2) {
circleBoard.setInterface(array: array2)
//circleBoard.setInterface(array: array3)
//circleBoard.setInterface(defaultArray: array4)
//circleBoard.setInterface(array: array4)
}

}
Expand Down
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,46 @@

## 简介

MCircleBoard是一个iOS库,用于展示圆形仪表盘,用户可以随时调整仪表盘上的格子数,顺时针逆时针方向
MCircleBoard是一个iOS库,用于展示圆形的仪表盘,用户可以随时对仪表盘进行调整,更改仪表盘位置、大小、格子数以及顺逆时针方向等

仪表盘的起始位置为最底部的格子,使用者可以使用默认的图片或者自己传入展示用的图片,使用者传入的图片必须为底部对应的图片(竖直方向的图标)。



## 使用

用户可以在创建MCircleBoard的实例的同时传入数据,也可以先创建实例并通过`setInterface`的方法更新。
用户可以用终端命令:`pod 'MCircleBoard'`添加该库或者直接下载GitHub上的项目并将Code文件夹下的文件直接拉入自己的项目进行使用。

用户可以在创建MCircleBoard类的时候填写参数,也可以在创建后使用`setInterface`方法对MCircleBoard进行更新。

用户可以使用MCircleBoard内置的图片(`MCircleItemType`)进行布局,也可以自行传入图片进行布局。

传入的数据可以为数组或者元组数组(swift),用户可以自己传入图片数据也可以直接使用`MCircleItemType`下的默认图片,默认图片的创建及更新方法中数组的参数名为`defaultArray`


*****


## Description

MCircleBoard is a iOS library that will display a circular dash board. You can modify the count of the items in the board and the rotation direction anytime.
MCircleBoard is a iOS library that will display a circular dash board. You can modify the board at any time , like the count of the items, the rotation direction and so on.

The beginning point of the board is the bottom one. You can use default image or use your own image and the image you input must be the bottom item's(Vertical pattern icon).



## Usage

You can input data when create the instance variable of MCircleBoard or update the data with `setInterface` after create the instance variable of MCircleBoard.
To integrate MCircleBoard into your Xcode project using CocoaPods, specify it in your `Podfile`:

```
pod 'MCircleBoard'
```

You can also download MCircleBoard to your computer and drag the file `Code` into the Project Navigator of your application's Xcode project.

You can input parameters to the MCircleBoard when you initialize it or use `setInterface` to update it.

The incoming data could be string array or tuple array(swift). You can input the image type array of MCircleItemType to use the default image or input the image name array to display the image you want. The parameter which is used in creating the instance variable of MCircleBoard and refresh data is defaultArray.
The incoming data could be string array or tuple array(swift). You can input the image type array of `MCircleItemType` to use the default image or input the image name array to display the image you want.



Expand Down
Binary file modified example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 28d4552

Please sign in to comment.