1
1
# AfriwanLib
2
- Create animation, round corner of view or button, and much more easily with AfriwanLib a library for your iOS app.
2
+ Create animation, round corner of view or button, check internet connection and much more easily with AfriwanLib a library for your iOS app.
3
3
4
- [ <img src =" https://github.com/AfriwanAhda/AfriwanLib/blob/master/demo/animation.gif " width =" 231 " height =" 500 " alt =" Afriwan Ahda " />] ( https://diponten.com )
5
-
6
- [ <img src =" https://github.com/AfriwanAhda/AfriwanLib/blob/master/demo/connection.gif " width =" 231 " height =" 500 " alt =" Afriwan Ahda " />] ( https://diponten. com )
4
+ [ <img src =" https://github.com/AfriwanAhda/AfriwanLib/blob/master/demo/animation.gif " width =" 281.1 " height =" 500 " alt =" Afriwan Ahda " />] ( https://diponten.com )
5
+ & nbsp ; & nbsp ; & nbsp ; & nbsp ; & nbsp ; & nbsp ;
6
+ [ <img src =" https://github.com/AfriwanAhda/AfriwanLib/blob/master/demo/connection.gif " width =" 281.1 " height =" 500 " alt =" Afriwan Ahda " />] ( https://apps.apple. com/id/developer/afriwan-ahda/id1330133888 )
7
7
8
8
9
9
# How to use
10
+
10
11
First step, add AfriwanLib on your Podfile
11
12
``` groovy
12
13
pod 'AfriwanLib'
13
14
```
14
15
15
16
16
- Import this library in your class
17
+ Open your Terminal and run Pod Install. Don’t forget to import AfriwanLib in your Class:
17
18
``` groovy
18
19
import AfriwanLib
19
20
```
20
21
21
22
22
- Now you can create round corner of your view or button easily with 1 line of code:
23
+ ## Create Animation & Round Corner
24
+ Now you can create round corner of your view or button easily with single lline of code:
23
25
``` groovy
24
- // Simple round corner
25
26
roundCorner(view: button_blue, cornerRadius: 15)
27
+ ```
26
28
29
+
30
+ Or create custom round corner only with adding parameter you needed:
31
+ ``` groovy
27
32
// Custom round corner with full parameter
28
33
roundCorner(view: view_green, cornerRadius: 30, shadowOpacity: 0.4, shadowRadius: 2.5, shadowOffset: CGSize.init(width: 1, height: 1), masksToBounds: false)
29
34
@@ -34,16 +39,29 @@ roundCorner(view: view_orange, cornerRadius: view_orange.frame.height/2, shadowO
34
39
35
40
Create animation for UIView, UIButton, UITextField, etc as simple as this:
36
41
``` groovy
37
- // Simple animation
38
42
pulsate(view: yourVieworButton)
43
+ ```
39
44
45
+ Or create custom animation only with adding parameter you needed:
46
+ ``` groovy
40
47
// Custom animation with some parameter
41
48
shake(view: view_green, duration: 0.2, autoreverses: true, repeatCount: 3)
42
49
43
50
// Custom animation with full parameter
44
51
flash(view: view_orange, duration: 0.5, autoreverses: true, repeatCount: 5, fromValue: 1, toValue: 0.2, timingFunction: CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut))
45
52
```
46
53
54
+ ## Check Internet Connection
55
+
56
+ Very easy to check internet connection
57
+ ``` groovy
58
+ if isConnectedToInternet() {
59
+ resultText = "Connected"
60
+ } else {
61
+ resultText = "Not Connected"
62
+ }
63
+ ```
64
+
47
65
48
66
Project example include in this Library, you can clone or download from this repository. Happy Coding!!
49
67
0 commit comments