Latest0.1.2
Homepagehttps://github.com/fghoffmann/IncredibleNetworkManager
LicenseMIT
Platformsios 8.0
Authors

Icon

IncredibleNetworkManager

IncredibleNetworkManager

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements
[![Platform iOS](https://img.shields.io/badge/Platform-iOS-blue.svg?style=fla)]()

| | Language | Minimum iOS Target | Minimum Xcode Version |
|————————|———-|——————–|———————–|
| IQKeyboardManagerSwift | Swift | iOS 8.0 | Xcode 9.0 |
| Demo Project | | | Xcode 9.0 |

## Installation

IncredibleNetworkManager is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

“`ruby
pod ‘IncredibleNetworkManager’
“`
## How to Use

To use the Library initialize it in the AppDelegate with the command:
“`swift
@UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
NetworkManager.initializeNetworkManager()

return true
}
}
“`

To request from the server use the method:
“`swift
NetworkManager.shared.performRequest(_ urlString: String?,
method: URLMethod? = .GET,
bodyData: Data? = nil,
headerValues: [[String]]? = nil,
shouldCache: Bool = false,
completion:@escaping (_ data: Data?) -> Void,
timeoutAfter timeout: TimeInterval = 120,
onTimeout: (()->Void)? = nil) -> URLSessionDataTask?
“`

To load images into the chache use the method:
“`swift
imageView.setImage(, thumbnailUrl: , placeholder: , animated: , completion: Void)?##((UIImage?) -> Void)?##(UIImage?) -> Void#>)
“`

## Author

Fabio Gustavo Hoffmann, [email protected]

## License

IncredibleNetworkManager is available under the MIT license. See the LICENSE file for more info.

## Versions

### 0.1.2
Fixed load image completion

### 0.1.1
Initial Version

Latest podspec

{
    "name": "IncredibleNetworkManager",
    "version": "0.1.2",
    "summary": "Awesome library to load JSON objects and parse them, also do download and caching images.",
    "swift_version": "3.2",
    "description": "To use the Library initialize it in the AppDelegate with the command:n- NetworkManager.initializeNetworkManager()nnTo request from the server use the method:n- NetworkManager.shared.performRequest(_ urlString: String?,n                 method: URLMethod? = .GET,n                 bodyData: Data? = nil,n                 headerValues: [[String]]? = nil,n                 shouldCache: Bool = false,n                 completion:@escaping (_ data: Data?) -> Void,n                 timeoutAfter timeout: TimeInterval = 120,n                 onTimeout: (()->Void)? = nil) -> URLSessionDataTask?nnTo load images into the chache use the method:n- imageView.setImage(<#T##url: String?##String?#>, thumbnailUrl: <#T##String?#>, placeholder: <#T##UIImage?#>, animated: <#T##Bool#>, completion: <#T##((UIImage?) -> Void)?##((UIImage?) -> Void)?##(UIImage?) -> Void#>)",
    "homepage": "https://github.com/fghoffmann/IncredibleNetworkManager",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Fabio Gustavo Hoffmann": "[email protected]"
    },
    "source": {
        "git": "https://github.com/fghoffmann/IncredibleNetworkManager.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "IncredibleNetworkManager/{Classes,Extensions}/**/*"
}

Pin It on Pinterest

Share This