-
Notifications
You must be signed in to change notification settings - Fork 184
/
ObjC.swift
37 lines (30 loc) · 1.04 KB
/
ObjC.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// ObjC.swift
// test
//
// Created by Prasanga Siripala on 9/25/15.
// Copyright © 2015 PJ Engineering and Business Solutions Pty. Ltd. All rights reserved.
//
import Foundation
import UIKit
@objc public enum ObjCEffect: Int {
case Line
case Circle
case GrowLine
case GrowCircle
}
extension LiquidLoader {
@objc public convenience init(frame: CGRect, effect: ObjCEffect, color: UIColor, numberOfCircle: Int, duration: CGFloat, growColor: UIColor? = UIColor.redColor()) {
var s: Effect
if effect == .Line {
s = Effect.Line(color, numberOfCircle, duration, growColor)
} else if effect == .Circle {
s = Effect.Circle(color, numberOfCircle, duration, growColor)
} else if effect == .GrowLine {
s = Effect.GrowLine(color, numberOfCircle, duration, growColor)
} else { //if effect == .GrowCircle {
s = Effect.GrowCircle(color, numberOfCircle, duration, growColor)
}
self.init(frame: frame, effect: s)
}
}