Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Creates a Persentage ImageView shown by the circle state and text inside it

License

Notifications You must be signed in to change notification settings

zero3nna/UIImageView-PersentageCircle

Repository files navigation

UIImageView-PersentageCircle

Creates a ImageView with a circle and text that is displaying the persentage

alt text

Its fully tested on iOS 7.

###All you have to do:

#####1. Import the file in your class:

#import "UIImageView+PersentageCircle.h"

#####2. To show the circle on the right side of your UITableViewCell add the following to - tableView: cellForRowAtIndexPath::

UIImageView *view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 60, 60)];
cell.accessoryView = [view applyCircleWithPersentage:<#yourOwnPersentage#> andTintColor:[UIColor orangeColor];

#####3. Or for the left side of the cell:

UIImageView *view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 60, 60)];
[view applyCircleWithPersentage:<#yourOwnPersentage#> andTintColor:[UIColor orangeColor];
cell.imageView.image = view.image;

#####4. The last step is to change the height of the cells with:

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 60.0f;
}

#####5. Now you can customise the circle in UIImageView+PersentageCircle.m.

And now you should have your own percentage circle!

A german tutorial is availabe on my blog: FudgeCode.de

About

Creates a Persentage ImageView shown by the circle state and text inside it

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published