Skip to content

Based on MBProgressHUD - is an iOS drop-in class that displays a translucent ActivityView with an indicator and/or labels while work is being done in a background thread.

License

Notifications You must be signed in to change notification settings

souzainf3/RNActivityView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RNActivityView

RNActivityView is based on MBProgressHUD. All credits to MBProgressHUD.

Was designed to facilitate the calls, especially on large projects.

MBProgressHUD is an iOS drop-in class that displays a translucent HUD with an indicator and/or labels while work is being done in a background thread. The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD with some additional features.

The differential is RNActivityView which has a category (extension to UIView) to facilitate the use of the component. Decreases the work of getting instantiating and configuring component for simple uses.

Requirements

RNActivityView works on iOS 7+ and requires ARC to build. Works fine on Objective-C and Swift.

  • Foundation.framework
  • UIKit.framework
  • CoreGraphics.framework

Adding RNActivityView to your project

Cocoapods

  1. Add a pod entry for RNActivityView to your Podfile pod 'RNActivityView'
  2. Install the pod(s) by running pod install.
  3. Import RNActivityView Category #import "UIView+RNActivityView.h".

Usage using category (UIView+RNActivityView.h)

Simply call the associated instance.

[self.view showActivityViewWithLabel:@"Loading"];
[self.view hideActivityViewWithAfterDelay:2];

If you need to configure the RNActivityView you can call the associated instance.

	self.view.activityView.mode = RNActivityViewModeDeterminate;
	self.view.activityView.labelText = @"Progress";
	float progress = 0.0f;
	while (progress < 1.0f)
	{
		progress += 0.01f;
		self.view.activityView.progress = progress;
		usleep(50000);
	}

Associated object With Blocks

	[self.view showActivityViewWithMode:(RNActivityViewModeIndeterminate) label:@"With a block" detailLabel:nil whileExecutingBlock:^{
		[self myProgressTask];
	}];

All other functions can be called directly from the associated instance. No need to manually set a variable for this..

Apps using this control

Zee - Personal Finances. BirdLight.

About

Based on MBProgressHUD - is an iOS drop-in class that displays a translucent ActivityView with an indicator and/or labels while work is being done in a background thread.

Resources

License

Stars

Watchers

Forks

Packages

No packages published