Skip to content

Commit

Permalink
-Made everything public
Browse files Browse the repository at this point in the history
  • Loading branch information
Esqarrouth authored and Goktug Yilmaz committed Nov 23, 2015
1 parent 2ba85ba commit 90d3fd3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 16 deletions.
2 changes: 1 addition & 1 deletion EZLoadingActivity.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "EZLoadingActivity"
s.version = "0.1"
s.version = "0.4"
s.summary = "Lightweight Swift loading activity for iOS7+"
s.description = "Lightweight Swift loading activity for iOS7+. Really simple to use, just add the class and write 1 line of code."
s.homepage = "https://github.com/goktugyil/EZLoadingActivity"
Expand Down
30 changes: 15 additions & 15 deletions EZLoadingActivity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@

import UIKit

struct EZLoadingActivity {
public struct EZLoadingActivity {

//==========================================================================================================
// Feel free to edit these variables
//==========================================================================================================
struct Settings {
static var BackgroundColor = UIColor(red: 227/255, green: 232/255, blue: 235/255, alpha: 1.0)
static var ActivityColor = UIColor(red: 0/255, green: 0/255, blue: 0/255, alpha: 1.0)
static var TextColor = UIColor(red: 80/255, green: 80/255, blue: 80/255, alpha: 1.0)
static var FontName = "HelveticaNeue-Light"
public struct Settings {
public static var BackgroundColor = UIColor(red: 227/255, green: 232/255, blue: 235/255, alpha: 1.0)
public static var ActivityColor = UIColor(red: 0/255, green: 0/255, blue: 0/255, alpha: 1.0)
public static var TextColor = UIColor(red: 80/255, green: 80/255, blue: 80/255, alpha: 1.0)
public static var FontName = "HelveticaNeue-Light"
// Other possible stuff: ✓ ✓ ✔︎ ✕ ✖︎ ✘
static var SuccessIcon = "✔︎"
static var FailIcon = ""
static var SuccessText = "Success"
static var FailText = "Failure"
static var SuccessColor = UIColor(red: 68/255, green: 118/255, blue: 4/255, alpha: 1.0)
static var FailColor = UIColor(red: 255/255, green: 75/255, blue: 56/255, alpha: 1.0)
public static var SuccessIcon = "✔︎"
public static var FailIcon = ""
public static var SuccessText = "Success"
public static var FailText = "Failure"
public static var SuccessColor = UIColor(red: 68/255, green: 118/255, blue: 4/255, alpha: 1.0)
public static var FailColor = UIColor(red: 255/255, green: 75/255, blue: 56/255, alpha: 1.0)
static var WidthDivision: CGFloat {
get {
if UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad {
Expand All @@ -40,7 +40,7 @@ struct EZLoadingActivity {
private static var hidingInProgress = false

/// Disable UI stops users touch actions until EZLoadingActivity is hidden. Return success status
static func show(text: String, disableUI: Bool) -> Bool {
public static func show(text: String, disableUI: Bool) -> Bool {
guard instance == nil else {
print("EZLoadingActivity: You still have an active activity, please stop that before creating a new one")
return false
Expand All @@ -55,7 +55,7 @@ struct EZLoadingActivity {
return true
}

static func showWithDelay(text: String, disableUI: Bool, seconds: Double) -> Bool {
public static func showWithDelay(text: String, disableUI: Bool, seconds: Double) -> Bool {
let showValue = show(text, disableUI: disableUI)
delay(seconds) { () -> () in
hide(success: true, animated: false)
Expand All @@ -64,7 +64,7 @@ struct EZLoadingActivity {
}

/// Returns success status
static func hide(success success: Bool? = nil, animated: Bool = false) -> Bool {
public static func hide(success success: Bool? = nil, animated: Bool = false) -> Bool {
guard instance != nil else {
print("EZLoadingActivity: You don't have an activity instance")
return false
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ EZLoadingActivity is a singleton object so you don't need to keep track of its i
1. Download and drop 'EZLoadingActivity.swift' in your project.
2. Congratulations!

## Install via CocoaPods

You can use [Cocoapods](http://cocoapods.org/) to install `EZLoadingActivity` by adding it to your `Podfile`:

```ruby
platform :ios, '8.0'
use_frameworks!

pod 'EZLoadingActivity'
```

Then on the top of files where you are going to use this:

```swift
import EZLoadingActivity
```

##Requirements

- Xcode 6 or later (Tested on 7)
Expand Down

0 comments on commit 90d3fd3

Please sign in to comment.