Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 2.23 KB

README.md

File metadata and controls

58 lines (44 loc) · 2.23 KB

#iOS-Custom-Activity-Indicator

How to use?

Creating custom activity indicator for iOS

Implementation of spinners

TJSppiner has ability to achieve or change colour, size pattern, image, rotation speed etc.

1. Implementation of line base spinners (similar as iOS Activity indicator). A. You can change inner and outer radius of spinner B. You can change number of line to be appear in the circle of the spinner. C. You can change appearance of spinner using its property like colour, pattern, caps/stork, image etc...

TJSpinner *spinner = [[TJSpinner alloc] initWithSpinnerType:kTJSpinnerTypeActivityIndicator]; spinner.hidesWhenStopped = YES; [spinner setColor:[UIColor blackColor]]; [spinner setInnerRadius:15]; [spinner setOuterRadius:35]; [spinner setStrokeWidth:6]; [spinner setNumberOfStrokes:8]; [spinner setPatternLineCap:kCGLineCapButt]; [spinner setPatternStyle:TJActivityIndicatorPatternStyleDot]; [spinner release];

2. Implementation of BeachBall spinners (similar as iMAC desktop beach ball). A. You can change radius (size) of the beach ball.

TJSpinner *beachBallSpinner = [[TJSpinner alloc] initWithSpinnerType:kTJSpinnerTypeBeachBall]; beachBallSpinner.hidesWhenStopped = YES; [beachBallSpinner setRadius:20]; [beachBallSpinner release];

3. Implementation of Circular spinners. A. You can change radius (size) of the Circular spinners.

TJSpinner *circularSpinner = [[TJSpinner alloc] initWithSpinnerType:kTJCircularSpinner]; circularSpinner.hidesWhenStopped = YES; circularSpinner.radius = 10; circularSpinner.pathColor = [UIColor whiteColor]; circularSpinner.fillColor = [UIColor redColor]; circularSpinner.thickness = 7; [circularSpinner release];

4. Implementation of TJSpinType to confgure for rotation/draw the view. A. You can configure spinners. spinner.spinType = TJSpinTypeRotate // for flowless spining. Fix: github issue #3 Slow circularSpinner

Sample output

iOS Custom Activity indicator or spinner