TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Aug 2016 |
Maintained by Mayank Patel.
Depends on: | |
DACircularProgress | ~> 2.3 |
SDWebImage | != 3.7.2, ~> 3.7 |
It's Simple UIImageView Category Class which is for downloading image from remote server using SDWebImage and DACircleProgressView
MPProgressViewCell is designed to be presented within a navigation controller. Simply set the delegate (which must conform to MPProgressCellDelegate
)
See the code snippet below for an example of how to implement the MPProgressViewCell. There is also a simple demo app within the project.
[imageview mp_setImageFromURL:URL];
[imageview mp_setImagefromURLwithPlaceholder:URL
placeholderImage:[UIImage imagenamed:@"placeholder.png"]];
@class MPProgressCell;
@interface progressCell : UITableViewCell
@property (weak, nonatomic) IBOutlet MPProgressCell *imgView; // bind the image view with MPProgressCell Category Class
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 5;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
progressCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MPCell"
forIndexPath:indexPath];
[cell.imgView mp_setImageFromURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3590/3329114220_5fbc5bc92b.jpg"]];
/* Now you can also show processing with placeholder image
[cell.imgView mp_setImagefromURLwithPlaceholder:[NSURL URLWithString:@"http://farm4.static.flickr.com/3590/3329114220_5fbc5bc92b.jpg"] placeholderImage:[UIImage imageNamed:@"22.png"]]; */
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 110.0f;
}
MPProgressIndicatorCell is available through CocoaPods ,To install it, simply add the following line to your Podfile:
pod "MPProgressIndicatorCell"
To run the example project, clone the repo, and run pod install
from the Example directory first.
Then import the ProgressViewCell into your source files (or into your bridging header if you're using with Swift and not using frameworks with CocoaPods):
#import "MPProgressCell.h"
If you are using Swift and frameworks, then you can just import the browser into your Swift source file:
import MPProgressCell
Mayank Patel, [email protected]
Better to use this from Pod,
MPProgressViewCell is available under the MIT license. See the LICENSE file for more info.