Skip to content

Commit 61d5617

Browse files
Update README.md
1 parent e0f4e4b commit 61d5617

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,34 @@ Just add the processView folder to your project.
4040

4141
## Usage
4242
(see sample Xcode project Demo)
43-
4443
create a view in the storyboard and give it's class 'ProcessLoadingView' then connect an outlet to it.
4544

45+
## Fast Setup
46+
`ProcessLoadingView` can have variable number of items based on your need, you only need the following steps to get it runing:
47+
48+
1- put a `UIView` in your storyboard and give it a class `ProcessLoadingView`.
49+
![Alt Text](https://image.ibb.co/g5Q2gm/class.png)
50+
51+
2- connect an outlet to it, call it `viewProcess`
52+
53+
3- create options object and assign it to `viewProcess` :
54+
55+
```Swift
56+
let step = 3
57+
let totalSteps = 4
58+
59+
var options = ProcessOptions()
60+
options.setNumberOfItems(number: totalSteps)
61+
options.images = [(img1, nil), (img2, nil), (img3, nil), (img4, nil)]
62+
options.stepComplete = step
63+
options.bgColor = bgColor
64+
viewProcess.options = options
65+
```
66+
# note
67+
* set the number of process steps through options's `setNumberOfItems` method.
68+
* `options.images` should be assigned an array it's count equals to the total number of steps.
4669

47-
### Code
70+
### Full customization of processView
4871
```Swift
4972
//totalSteps: adding 8 process items, this number can be increased or decreased ;)
5073
let totalSteps = 8

0 commit comments

Comments
 (0)