Home

Awesome

TNSexyImageUploadProgress

An image upload progress component for Objective-C

TNSexyImageUploadProgress

Installation

Manual

CocoaPods

How to use?

For example:

dispatch_async(dispatch_get_main_queue(), ^{
    self.imageUploadProgress.progress = progress.fractionCompleted;
});
    

For example

self.imageUploadProgress = [[TNSexyImageUploadProgress alloc] init];
[self.imageUploadProgress show];
   

Customise the component

If you want you can customise how the component looks. You can set the following properties:

PropertyWhat does it do
progressSet how far the circle has to be drawn (value between 0.0 and 1.0)
radiusSet the radius for the circular image mask
progressBorderThicknessSet the thickness of the border
trackColorSet the color for the track
progressColorSet the color for the progress
showOverlaySet if you want the component to show an overlay

For example

self.imageUploadProgress = [[TNSexyImageUploadProgress alloc] init];
self.imageUploadProgress.radius = 100;
self.imageUploadProgress.progressBorderThickness = -10;
self.imageUploadProgress.trackColor = [UIColor blackColor];
self.imageUploadProgress.progressColor = [UIColor whiteColor];
self.imageUploadProgress.imageToUpload = selectedImage;
[self.imageUploadProgress show];

Video

You can check out a video of the component at http://cl.ly/VE1F/TNSexyImageUpload.mov

Demo

There is a demo project added to this repository, so you can see how it works. In the folder 'webservice', you can find a PHP script to upload pictures. Just put it in your document directory and set the correct path in MainViewController.

License

TNSexyImageUploadProgress published under the MIT license:

Copyright (C) 2014, Frederik Jacques

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.