### Install M13ProgressSuite via CocoaPods Source: https://context7.com/marxon13/m13progresssuite/llms.txt Add the M13ProgressSuite pod to your Podfile and run 'pod install' to integrate the library. ```ruby # Podfile pod 'M13ProgressSuite', '~> 1.2' ``` ```bash pod install ``` -------------------------------- ### Complete HUD Workflow Example Source: https://context7.com/marxon13/m13progresssuite/llms.txt Illustrates a full loading workflow using M13ProgressHUD with status updates and completion handling. Includes configuration of the HUD and progress view, simulating asynchronous operations. ```objectivec #import "M13ProgressHUD.h" #import "M13ProgressViewRing.h" @interface DataProcessor : NSObject @property (nonatomic, strong) M13ProgressHUD *HUD; @end @implementation DataProcessor - (void)processDataInView:(UIView *)view { // Create and configure HUD M13ProgressViewRing *ring = [[M13ProgressViewRing alloc] init]; ring.showPercentage = YES; self.HUD = [[M13ProgressHUD alloc] initWithProgressView:ring]; self.HUD.progressViewSize = CGSizeMake(60, 60); self.HUD.status = @"Preparing..."; self.HUD.maskType = M13ProgressHUDMaskTypeGradient; self.HUD.hudBackgroundColor = [UIColor colorWithWhite:0.1 alpha:0.9]; self.HUD.statusColor = [UIColor whiteColor]; self.HUD.primaryColor = [UIColor whiteColor]; self.HUD.dismissAfterAction = NO; [view addSubview:self.HUD]; [self.HUD show:YES]; // Start indeterminate while preparing self.HUD.indeterminate = YES; // Simulate async work dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ [self processStep1]; }); } - (void)processStep1 { self.HUD.indeterminate = NO; self.HUD.status = @"Processing Step 1..."; [self.HUD setProgress:0.25 animated:YES]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ [self processStep2]; }); } - (void)processStep2 { self.HUD.status = @"Processing Step 2..."; [self.HUD setProgress:0.50 animated:YES]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ [self processStep3]; }); } - (void)processStep3 { self.HUD.status = @"Finalizing..."; [self.HUD setProgress:0.75 animated:YES]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ [self complete]; }); } - (void)complete { [self.HUD setProgress:1.0 animated:YES]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.3 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ self.HUD.status = @"Complete!"; [self.HUD performAction:M13ProgressViewActionSuccess animated:YES]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ [self.HUD dismiss:YES]; }); }); } - (void)failWithError:(NSError *)error { self.HUD.status = error.localizedDescription; [self.HUD performAction:M13ProgressViewActionFailure animated:YES]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ [self.HUD dismiss:YES]; }); } @end ``` -------------------------------- ### Complete Download Example with Navigation Bar Progress Source: https://context7.com/marxon13/m13progresssuite/llms.txt This example demonstrates how to integrate the navigation bar progress view with a network download operation using `NSURLSession`. It shows how to manage indeterminate and determinate progress, update the title, and handle completion or errors. ```Objective-C #import "UINavigationController+M13ProgressViewBar.h" @implementation DownloadViewController - (void)startDownload { // Show progress bar with custom appearance [self.navigationController setPrimaryColor:[UIColor greenColor]]; [self.navigationController showProgress]; [self.navigationController setProgressTitle:@"Downloading file..."]; // Start indeterminate while connecting [self.navigationController setIndeterminate:YES]; // Begin download task NSURL *url = [NSURL URLWithString:@"https://example.com/largefile.zip"]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration]; NSURLSession *session = [NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:nil]; NSURLSessionDownloadTask *task = [session downloadTaskWithURL:url]; [task resume]; } //NSURLSessionDownloadDelegate - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite { dispatch_async(dispatch_get_main_queue(), ^{ // Switch to determinate mode [self.navigationController setIndeterminate:NO]; // Update progress CGFloat progress = (CGFloat)totalBytesWritten / totalBytesExpectedToWrite; [self.navigationController setProgress:progress animated:YES]; // Update title with percentage NSString *title = [NSString stringWithFormat:@"Downloading... %.0f%%", progress * 100]; [self.navigationController setProgressTitle:title]; }); } - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didFinishDownloadingToURL:(NSURL *)location { dispatch_async(dispatch_get_main_queue(), ^{ // Complete progress bar animation [self.navigationController finishProgress]; [self.navigationController setProgressTitle:nil]; }); } - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error { if (error) { dispatch_async(dispatch_get_main_queue(), ^{ // Cancel on error [self.navigationController cancelProgress]; [self.navigationController setProgressTitle:nil]; }); } } @end ``` -------------------------------- ### Create and Configure M13ProgressViewMetro Source: https://context7.com/marxon13/m13progresssuite/llms.txt Initialize a Windows 8 style animated dots progress view. Configure the number of dots, dot size, animation shape, and colors. Control animation start/stop and perform action states. ```objectivec #import "M13ProgressViewMetro.h" // Create metro-style progress view M13ProgressViewMetro *metroView = [[M13ProgressViewMetro alloc] initWithFrame:CGRectMake(0, 0, 200, 50)]; // Configure dots metroView.numberOfDots = 5; metroView.dotSize = CGSizeMake(8, 8); // Set animation shape metroView.animationShape = M13ProgressViewMetroAnimationShapeEllipse; // Options: M13ProgressViewMetroAnimationShapeEllipse // M13ProgressViewMetroAnimationShapeRectangle // M13ProgressViewMetroAnimationShapeLine // Colors metroView.primaryColor = [UIColor blueColor]; metroView.secondaryColor = [UIColor lightGrayColor]; metroView.successColor = [UIColor greenColor]; metroView.failureColor = [UIColor redColor]; // Control animation [metroView beginAnimating]; // Start animation BOOL isAnimating = [metroView isAnimating]; // Check status [metroView stopAnimating]; // Stop animation // Show action state [metroView performAction:M13ProgressViewActionSuccess animated:YES]; [self.view addSubview:metroView]; ``` -------------------------------- ### Initialize and Configure M13ProgressView Source: https://context7.com/marxon13/m13progresssuite/llms.txt Create a progress view subclass, set appearance colors, animation duration, and manage determinate/indeterminate states and actions. ```objectivec #import "M13ProgressView.h" // Create any progress view subclass M13ProgressViewBar *progressView = [[M13ProgressViewBar alloc] initWithFrame:CGRectMake(0, 0, 200, 20)]; // Set appearance colors progressView.primaryColor = [UIColor blueColor]; progressView.secondaryColor = [UIColor lightGrayColor]; // Set animation duration (in seconds) progressView.animationDuration = 0.3; // Enable indeterminate mode for unknown progress progressView.indeterminate = YES; // Set determinate progress (0.0 to 1.0) [progressView setProgress:0.5 animated:YES]; // Perform success action when complete [progressView performAction:M13ProgressViewActionSuccess animated:YES]; // Perform failure action on error [progressView performAction:M13ProgressViewActionFailure animated:YES]; // Reset to normal state [progressView performAction:M13ProgressViewActionNone animated:YES]; // Add to view hierarchy [self.view addSubview:progressView]; ``` -------------------------------- ### Configure and Use M13ProgressConsole Source: https://context7.com/marxon13/m13progresssuite/llms.txt Demonstrates how to create, configure, and update a M13ProgressConsole view for terminal-style progress display. Customize appearance, line prefixes, and progress types. ```objectivec #import "M13ProgressConsole.h" // Create console progress view M13ProgressConsole *console = [[M13ProgressConsole alloc] initWithFrame:CGRectMake(0, 0, 320, 200)]; // Configure appearance console.maskType = M13ProgressConsoleMaskTypeSolidColor; // Options: M13ProgressConsoleMaskTypeNone // M13ProgressConsoleMaskTypeSolidColor // M13ProgressConsoleMaskTypeIOS7Blur console.maskColor = [UIColor blackColor]; console.backgroundColor = [UIColor colorWithWhite:0.1 alpha:1.0]; // Show blinking cursor console.showCursor = YES; // Set line prefix (like a shell prompt) console.prefix = @"$ "; // Choose progress display type console.progressType = M13ProgressConsoleProgressTypePercentage; // Options: M13ProgressConsoleProgressTypePercentage - Shows "50%" // M13ProgressConsoleProgressTypeDots - Shows "..." // M13ProgressConsoleProgressTypeBarOfDots - Shows "[==== ]" // Animation duration console.animationDuration = 0.2; // Add lines [console addNewLineWithString:@"Initializing system..."]; [console setProgress:0.2]; [console addNewLineWithString:@"Loading resources..."]; [console setProgress:0.5]; // Update current line [console setCurrentLine:@"Processing data..."]; [console setProgress:0.8]; // Enable indeterminate mode console.indeterminate = YES; // Complete [console addNewLineWithString:@"Process complete!"]; // Access all displayed lines NSArray *allLines = console.lines; // Clear console [console clear]; [self.view addSubview:console]; ``` -------------------------------- ### M13ProgressHUD Initialization Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressHUD.html Methods for initializing and showing the M13ProgressHUD. ```APIDOC ## M13ProgressHUD Initialization ### Description Methods for initializing and showing the M13ProgressHUD. ### Instance Methods #### `initWithProgressView:` Initializes the HUD with a progress view. #### `initAndShowWithProgressView:progress:indeterminate:status:mask:inView:` Initializes and shows the HUD with specified parameters. ### Parameters #### `initAndShowWithProgressView:progress:indeterminate:status:mask:inView:` - **progressView** (UIView) - The view to display the progress. - **progress** (CGFloat) - The current progress value. - **indeterminate** (BOOL) - Whether the HUD is in indeterminate mode. - **status** (NSString) - The status message to display. - **mask** (UIView) - The mask view. - **inView** (UIView) - The view to add the HUD to. ``` -------------------------------- ### Create and Configure M13ProgressViewPie Source: https://context7.com/marxon13/m13progresssuite/llms.txt Instantiate and customize a pie chart progress view. Set border width, primary and secondary colors, and update the progress value. ```objectivec #import "M13ProgressViewPie.h" // Create pie progress view M13ProgressViewPie *pieView = [[M13ProgressViewPie alloc] initWithFrame:CGRectMake(0, 0, 60, 60)]; // Configure appearance pieView.backgroundRingWidth = 2.0; // Border thickness pieView.primaryColor = [UIColor orangeColor]; pieView.secondaryColor = [UIColor colorWithWhite:0.9 alpha:1.0]; // Update progress - fills as pie slice [pieView setProgress:0.4 animated:YES]; [self.view addSubview:pieView]; ``` -------------------------------- ### M13ProgressViewStripedBar Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressViewStripedBar.html Methods for performing actions and setting states on the M13ProgressViewStripedBar. ```APIDOC ## M13ProgressViewStripedBar Instance Methods ### performAction:animated: Perform the given action if defined. Usually showing success or failure. #### Parameters - **action** (M13ProgressViewAction) - Required - The action to perform. - **animated** (BOOL) - Required - Wether or not to animate the change #### Declared In `M13ProgressView.h` ### setIndeterminate: Wether or not the progress view is indeterminate. #### Parameters - **indeterminate** (BOOL) - Required - Wether or not the progress view is indeterminate. #### Declared In `M13ProgressView.h` ### setPrimaryColor: The primary color of the `M13ProgressView`. #### Parameters - **primaryColor** (UIColor *) - Required - The primary color to set. #### Declared In `M13ProgressView.h` ### setProgress:animated: Set the progress of the `M13ProgressView`. #### Parameters - **progress** (CGFloat) - Required - The progress to show on the progress view. - **animated** (BOOL) - Required - Wether or not to animate the progress change. #### Declared In `M13ProgressView.h` ### setSecondaryColor: The secondary color of the `M13ProgressView`. #### Parameters - **secondaryColor** (UIColor *) - Required - The secondary color to set. #### Declared In `M13ProgressView.h` ``` -------------------------------- ### M13ProgressViewRing Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressViewRing.html This section details the instance methods available for interacting with the M13ProgressViewRing. ```APIDOC ## M13ProgressViewRing Instance Methods ### performAction:animated: Performs a given action with animation. `- (void)performAction:(M13ProgressViewAction)action animated:(BOOL)animated` #### Declared In `M13ProgressViewRing.m` ### setIndeterminate: Sets the progress view to an indeterminate state. `- (void)setIndeterminate:(BOOL)indeterminate` #### Declared In `M13ProgressViewRing.m` ### setPrimaryColor: Sets the primary color of the progress ring. `- (void)setPrimaryColor:(UIColor *)color` #### Declared In `M13ProgressViewRing.m` ### setProgress:animated: Sets the progress of the progress view with animation. `- (void)setProgress:(CGFloat)progress animated:(BOOL)animated` #### Declared In `M13ProgressViewRing.m` ### setSecondaryColor: Sets the secondary color of the progress ring. `- (void)setSecondaryColor:(UIColor *)color` #### Declared In `M13ProgressViewRing.m` ``` -------------------------------- ### M13ProgressViewBar Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressViewBar.html This section details the instance methods of the M13ProgressViewBar class, used for performing actions and setting states. ```APIDOC ## M13ProgressViewBar Instance Methods ### performAction:animated: Performs a specific action with animation. `- (void)performAction:(M13ProgressViewAction)action animated:(BOOL)animated` #### Declared In `M13ProgressViewBar.m` ### setIndeterminate: Sets the progress view to an indeterminate state. `- (void)setIndeterminate:(BOOL)indeterminate` #### Declared In `M13ProgressViewBar.m` ### setPrimaryColor: Sets the primary color of the progress bar. `- (void)setPrimaryColor:(UIColor *)color` #### Declared In `M13ProgressViewBar.m` ### setProgress:animated: Sets the progress value with an optional animation. `- (void)setProgress:(CGFloat)progress animated:(BOOL)animated` #### Declared In `M13ProgressViewBar.m` ### setSecondaryColor: Sets the secondary color of the progress bar. `- (void)setSecondaryColor:(UIColor *)color` #### Declared In `M13ProgressViewBar.m` ``` -------------------------------- ### Create and Configure M13ProgressHUD Source: https://github.com/marxon13/m13progresssuite/blob/master/README.md Shows how to initialize an M13ProgressHUD with a specific progress view style and configure its size and animation point. The HUD can be added to any UIView. ```objective-c // Create the HUD M13ProgressHUD *HUD = [[M13ProgressHUD alloc] initWithProgressView:[[M13ProgressViewRing alloc] init]]; // Configure the progress view HUD.progressViewSize = CGSizeMake(60.0, 60.0); HUD.animationPoint = CGPointMake([UIScreen mainScreen].bounds.size.width / 2, [UIScreen mainScreen].bounds.size.height / 2); // Add the HUD to the window. (Or any UIView) ``` -------------------------------- ### Quick Initialization of M13ProgressHUD Source: https://context7.com/marxon13/m13progresssuite/llms.txt Initialize and display an M13ProgressHUD with a single method call using convenience initializer. This method allows setting the progress view, initial progress, indeterminate state, status message, mask type, and the container view. ```objectivec #import "M13ProgressHUD.h" #import "M13ProgressViewRing.h" // Create and show HUD in one call M13ProgressViewRing *progressView = [[M13ProgressViewRing alloc] init]; UIView *containerView = self.view; M13ProgressHUD *HUD = [[M13ProgressHUD alloc] initAndShowWithProgressView:progressView progress:0.0 indeterminate:YES status:@"Loading..." mask:M13ProgressHUDMaskTypeGradient inView:containerView]; // Later update and dismiss [HUD setProgress:1.0 animated:YES]; HUD.status = @"Complete!"; [HUD performAction:M13ProgressViewActionSuccess animated:YES]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ [HUD dismiss:YES]; }); ``` -------------------------------- ### M13ProgressHUD Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressHUD.html Instance methods for controlling the lifecycle and actions of the M13ProgressHUD. ```APIDOC ## M13ProgressHUD Instance Methods ### dismiss: Dismiss the progress HUD and remove it from its superview. `- (void)dismiss:(BOOL)_animated_` #### Parameters _animated_ Wether or not to animate the change ### hide: Hide the progress HUD. `- (void)hide:(BOOL)_animated_` #### Parameters _animated_ Wether or not to animate the change #### Discussion **Note:** This method should be used when the HUD is going to be reused. When the HUD needs to be shown again, use [`show:`](#//api/name/show:) do not initalize another instance. That will cause a memory leak. If the HUD is not going to be reused, use [`dismiss:`](#//api/name/dismiss:) instead. To retreive a hidden HUD, either hold onto it with a global variable, or use the `progressHUD` method for UIView. ### initAndShowWithProgressView:progress:indeterminate:status:mask:inView: Initalize and show the hud with parameters. `- (id)initAndShowWithProgressView:(M13ProgressView *)_progressView_ progress:(CGFloat)_progress_ indeterminate:(BOOL)_indeterminate_ status:(NSString *)_status_ mask:(M13ProgressHUDMaskType)_maskType_ inView:(UIView *)_view_` #### Parameters _progressView_ The progress view to show in the HUD. _progress_ The progress to display in the progress view. _indeterminate_ Wether or not the progress view is indeterminate. _status_ The status to display in the HUD. _maskType_ The type of mask to use for the HUD. _view_ The view to show the HUD in. #### Return Value A instance of M13PRogressHUD ### initWithProgressView: Initalize the HUD with a customized progress view. `- (id)initWithProgressView:(M13ProgressView *)_progressView_` #### Parameters _progressView_ The progres view to display in the HUD. #### Discussion **Note:** If you create the HUD with this method, you are responsible for creating the progress view and setting the frame size of the progress view. ### isVisible Wether or not the HUD is currenty visible. `- (BOOL)isVisible` ### performAction:animated: Perform the given action if defined. Usually showing success or failure. `- (void)performAction:(M13ProgressViewAction)_action_ animated:(BOOL)_animated_` #### Parameters _action_ The action to perform. _animated_ Wether or not to animate the change ### setProgress:animated: Set the progress of the `M13ProgressView`. `- (void)setProgress:(CGFloat)_progress_ animated:(BOOL)_animated_` #### Parameters _progress_ The progress to show on the progress view. _animated_ Wether or not to animate the progress change. ### show: Show the progress HUD. `- (void)show:(BOOL)_animated_` #### Parameters _animated_ Wether or not to animate the change ``` -------------------------------- ### M13ProgressViewPie Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressViewPie.html This section details the instance methods available for the M13ProgressViewPie class. ```APIDOC ## Instance Methods ### performAction:animated: Performs a specified action with animation. `- (void)performAction:(M13ProgressViewAction)action animated:(BOOL)animated` #### Declared In `M13ProgressViewPie.m` ### setIndeterminate: Sets the view to an indeterminate state. `- (void)setIndeterminate:(BOOL)indeterminate` #### Declared In `M13ProgressViewPie.m` ### setPrimaryColor: Sets the primary color for the progress view. `- (void)setPrimaryColor:(UIColor *)color` #### Declared In `M13ProgressViewPie.m` ### setProgress:animated: Sets the progress value with an optional animation. `- (void)setProgress:(CGFloat)progress animated:(BOOL)animated` #### Declared In `M13ProgressViewPie.m` ### setSecondaryColor: Sets the secondary color for the progress view. `- (void)setSecondaryColor:(UIColor *)color` #### Declared In `M13ProgressViewPie.m` ``` -------------------------------- ### M13ProgressViewStripedBar Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/html/Classes/M13ProgressViewStripedBar.html Methods for performing actions and setting properties on the M13ProgressViewStripedBar. ```APIDOC ## M13ProgressViewStripedBar Instance Methods ### performAction:animated: Perform the given action if defined. Usually showing success or failure. #### Parameters - **action** (M13ProgressViewAction) - The action to perform. - **animated** (BOOL) - Wether or not to animate the change #### Declared In `M13ProgressView.h` ### setIndeterminate: Wether or not the progress view is indeterminate. #### Parameters - **indeterminate** (BOOL) - A boolean value indicating if the progress view is indeterminate. #### Declared In `M13ProgressView.h` ### setPrimaryColor: The primary color of the `M13ProgressView`. #### Parameters - **primaryColor** (UIColor *) - The primary color to set. #### Declared In `M13ProgressView.h` ### setProgress:animated: Set the progress of the `M13ProgressView`. #### Parameters - **progress** (CGFloat) - The progress to show on the progress view. - **animated** (BOOL) - Wether or not to animate the progress change. #### Declared In `M13ProgressView.h` ### setSecondaryColor: The secondary color of the `M13ProgressView`. #### Parameters - **secondaryColor** (UIColor *) - The secondary color to set. #### Declared In `M13ProgressView.h` ``` -------------------------------- ### Create and Configure M13ProgressViewImage Source: https://context7.com/marxon13/m13progresssuite/llms.txt Use M13ProgressViewImage to display progress by revealing an image. Configure the progress image, reveal direction, and whether to show a greyscale background. Update progress using setProgress:animated:. ```objectivec #import "M13ProgressViewImage.h" // Create image progress view M13ProgressViewImage *imageProgress = [[M13ProgressViewImage alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; // Set the progress image imageProgress.progressImage = [UIImage imageNamed:@"star"]; // Set reveal direction imageProgress.progressDirection = M13ProgressViewImageProgressDirectionBottomToTop; // Options: M13ProgressViewImageProgressDirectionLeftToRight // M13ProgressViewImageProgressDirectionRightToLeft // M13ProgressViewImageProgressDirectionTopToBottom // M13ProgressViewImageProgressDirectionBottomToTop // Show greyscale version as background imageProgress.drawGreyscaleBackground = YES; // Update progress - reveals colored image over greyscale [imageProgress setProgress:0.5 animated:YES]; [self.view addSubview:imageProgress]; ``` -------------------------------- ### Show and Update Progress HUD Source: https://github.com/marxon13/m13progresssuite/blob/master/README.md This snippet shows how to add a HUD to the window, display it, update its progress with animation, set its status message, and finally hide it. Ensure the HUD is properly initialized before use. ```Objective-C UIWindow *window = ((AppDelegate *)[UIApplication sharedApplication].delegate).window; [window addSubview:HUD]; // Show the HUD [HUD show:YES]; //Update the HUD progress [HUD setProgress:0.5 animated:YES]; // Update the HUD status HUD.status = @"Processing"; // Hide the HUD [HUD show:NO]; ``` -------------------------------- ### Create and Configure M13ProgressViewStripedBar Source: https://context7.com/marxon13/m13progresssuite/llms.txt Set up an animated striped progress bar. Customize corner style, corner radius, stripe visibility, width, color, animation, and border. ```objectivec #import "M13ProgressViewStripedBar.h" // Create striped bar M13ProgressViewStripedBar *stripedBar = [[M13ProgressViewStripedBar alloc] initWithFrame:CGRectMake(20, 150, 280, 25)]; // Configure corner style stripedBar.cornerType = M13ProgressViewStripedBarCornerTypeRounded; // Options: M13ProgressViewStripedBarCornerTypeSquare // M13ProgressViewStripedBarCornerTypeRounded // M13ProgressViewStripedBarCornerTypeCircle stripedBar.cornerRadius = 5.0; // Configure stripes stripedBar.showStripes = YES; stripedBar.stripeWidth = 10.0; stripedBar.stripeColor = [UIColor colorWithWhite:1.0 alpha:0.3]; stripedBar.animateStripes = YES; // Animate stripe movement // Border stripedBar.borderWidth = 1.0; // Colors stripedBar.primaryColor = [UIColor colorWithRed:0.2 green:0.8 blue:0.4 alpha:1.0]; stripedBar.secondaryColor = [UIColor colorWithWhite:0.9 alpha:1.0]; [stripedBar setProgress:0.6 animated:YES]; [self.view addSubview:stripedBar]; ``` -------------------------------- ### M13ProgressViewBorderedBar Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressViewBorderedBar.html This section outlines the instance methods available for controlling the M13ProgressViewBorderedBar. ```APIDOC ## M13ProgressViewBorderedBar Instance Methods ### performAction:animated: Performs a specific action on the progress bar with optional animation. `- (void)performAction:(M13ProgressViewAction)action animated:(BOOL)animated` #### Declared In `M13ProgressViewBorderedBar.h` ### setIndeterminate: Sets the progress bar to an indeterminate state. `- (void)setIndeterminate:(BOOL)indeterminate` #### Declared In `M13ProgressViewBorderedBar.h` ### setPrimaryColor: Sets the primary color for the progress bar. `- (void)setPrimaryColor:(UIColor *)color` #### Declared In `M13ProgressViewBorderedBar.h` ### setProgress:animated: Sets the progress value with optional animation. `- (void)setProgress:(CGFloat)progress animated:(BOOL)animated` #### Declared In `M13ProgressViewBorderedBar.h` ### setSecondaryColor: Sets the secondary color for the progress bar. `- (void)setSecondaryColor:(UIColor *)color` #### Declared In `M13ProgressViewBorderedBar.h` ``` -------------------------------- ### M13ProgressHUD Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressHUD.html Methods for controlling the M13ProgressHUD's lifecycle and actions. ```APIDOC ## M13ProgressHUD Instance Methods ### Description Methods for controlling the M13ProgressHUD's lifecycle and actions. ### Instance Methods #### `dismiss:` Dismisses the HUD with an animation. #### `hide:` Hides the HUD. #### `isVisible` Checks if the HUD is currently visible. #### `performAction:animated:` Performs an action with the HUD. #### `setProgress:animated:` Sets the progress of the HUD. #### `show:` Shows the HUD. ### Parameters #### `performAction:animated:` - **action** (id) - The action to perform. - **animated** (BOOL) - Whether to animate the action. #### `setProgress:animated:` - **progress** (CGFloat) - The progress value. - **animated** (BOOL) - Whether to animate the progress change. #### `show:` - **animated** (BOOL) - Whether to animate the show action. ``` -------------------------------- ### M13ProgressConsole Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressConsole.html Reference for the instance methods of the M13ProgressConsole class. ```APIDOC ## Instance Methods ### addNewLineWithString: Add a new line with the given text. `- (void)addNewLineWithString:(NSString *)_newLine_` #### Parameters _newLine_ The text to start a new line with. #### Declared In `M13ProgressConsole.h` ### clear Clears the console. `- (void)clear` #### Declared In `M13ProgressConsole.h` ### setCurrentLine: Set the text of the current line. `- (void)setCurrentLine:(NSString *)_currentLine_` #### Parameters _currentLine_ The string to replace the current line with. #### Declared In `M13ProgressConsole.h` ### setProgress: Set the [progress](#//api/name/progress) of the [`M13ProgressView`](../Classes/M13ProgressView.html). `- (void)setProgress:(CGFloat)_progress_` #### Parameters _progress_ The [progress](#//api/name/progress) to show on the current line. #### Declared In `M13ProgressConsole.h` ``` -------------------------------- ### M13ProgressViewMetro Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressViewMetro.html Methods for controlling the animation state and progress of the M13ProgressViewMetro. ```APIDOC ## M13ProgressViewMetro Instance Methods ### beginAnimating Begin the animation. `- (void)beginAnimating` #### Declared In `M13ProgressViewMetro.h` ### isAnimating Wether or not the progress view is animating. `- (BOOL)isAnimating` #### Declared In `M13ProgressViewMetro.h` ### performAction:animated: Performs a specific action with animation. `- (void)performAction:(M13ProgressViewAction)action animated:(BOOL)animated` #### Declared In `M13ProgressViewMetro.h` ### setProgress:animated: Sets the progress of the view with an optional animation. `- (void)setProgress:(CGFloat)progress animated:(BOOL)animated` #### Declared In `M13ProgressViewMetro.h` ### stopAnimating Stop the animation. `- (void)stopAnimating` #### Declared In `M13ProgressViewMetro.h` ``` -------------------------------- ### Create and Configure M13ProgressHUD Source: https://context7.com/marxon13/m13progresssuite/llms.txt M13ProgressHUD provides a customizable heads-up display. Configure its size, position, background, blur effects, mask type, status label, and colors. It supports auto-dismissal, rotation handling, and various actions like success or failure. ```objectivec #import "M13ProgressHUD.h" #import "M13ProgressViewRing.h" // Create HUD with custom progress view M13ProgressViewRing *ringView = [[M13ProgressViewRing alloc] init]; M13ProgressHUD *HUD = [[M13ProgressHUD alloc] initWithProgressView:ringView]; // Configure size and position HUD.progressViewSize = CGSizeMake(60.0, 60.0); HUD.animationPoint = CGPointMake(CGRectGetMidX([UIScreen mainScreen].bounds), CGRectGetMidY([UIScreen mainScreen].bounds)); HUD.animationCentered = YES; // Or animate from animationPoint // Configure appearance HUD.hudBackgroundColor = [UIColor colorWithWhite:0.0 alpha:0.8]; HUD.cornerRadius = 10.0; HUD.contentMargin = 20.0; HUD.minimumSize = CGSizeMake(100, 100); HUD.applyBlurToBackground = YES; // Configure mask (background overlay) HUD.maskType = M13ProgressHUDMaskTypeGradient; // Options: M13ProgressHUDMaskTypeNone // M13ProgressHUDMaskTypeSolidColor // M13ProgressHUDMaskTypeGradient // M13ProgressHUDMaskTypeIOS7Blur HUD.maskColor = [UIColor colorWithWhite:0.0 alpha:0.3]; // Configure status label HUD.status = @"Loading..."; HUD.statusColor = [UIColor whiteColor]; HUD.statusFont = [UIFont systemFontOfSize:14.0]; HUD.statusPosition = M13ProgressHUDStatusPositionBelowProgress; // Options: M13ProgressHUDStatusPositionBelowProgress // M13ProgressHUDStatusPositionAboveProgress // M13ProgressHUDStatusPositionLeftOfProgress // M13ProgressHUDStatusPositionRightOfProgress // Progress view colors (convenience properties) HUD.primaryColor = [UIColor whiteColor]; HUD.secondaryColor = [UIColor colorWithWhite:1.0 alpha:0.3]; // Auto-dismiss after action HUD.dismissAfterAction = YES; // Rotation handling HUD.shouldAutorotate = YES; // Auto-rotate with device // Or manually set: HUD.orientation = UIInterfaceOrientationPortrait; // Add to window UIWindow *window = [UIApplication sharedApplication].delegate.window; [window addSubview:HUD]; // Show HUD [HUD show:YES]; // Update progress [HUD setProgress:0.5 animated:YES]; HUD.status = @"Processing..."; // Toggle indeterminate mode HUD.indeterminate = YES; // Perform actions [HUD performAction:M13ProgressViewActionSuccess animated:YES]; [HUD performAction:M13ProgressViewActionFailure animated:YES]; [HUD performAction:M13ProgressViewActionNone animated:YES]; // Hide (keeps in memory for reuse) [HUD hide:YES]; // Dismiss (removes from superview) [HUD dismiss:YES]; // Check visibility BOOL visible = [HUD isVisible]; // Retrieve HUD from view M13ProgressHUD *existingHUD = [window progressHUD]; ``` -------------------------------- ### M13ProgressViewStripedBar Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressViewStripedBar.html This section details the instance methods available for controlling the M13ProgressViewStripedBar. ```APIDOC ## M13ProgressViewStripedBar Instance Methods ### performAction:animated: `– performAction:animated:` #### Declared In `M13ProgressViewStripedBar.h` ### setIndeterminate: `– setIndeterminate:` #### Declared In `M13ProgressViewStripedBar.h` ### setPrimaryColor: `– setPrimaryColor:` #### Declared In `M13ProgressViewStripedBar.h` ### setProgress:animated: `– setProgress:animated:` #### Declared In `M13ProgressViewStripedBar.h` ### setSecondaryColor: `– setSecondaryColor:` #### Declared In `M13ProgressViewStripedBar.h` ``` -------------------------------- ### M13ProgressView Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressView.html Reference for the instance methods of the M13ProgressView class. ```APIDOC ## M13ProgressView Instance Methods ### performAction:animated: Perform the given action if defined. Usually showing success or failure. `- (void)performAction:(M13ProgressViewAction)_action_ animated:(BOOL)_animated_` #### Parameters _action_ The action to perform. _animated_ Wether or not to animate the change #### Declared In `M13ProgressView.h` ### setProgress:animated: Set the [progress](#//api/name/progress) of the `M13ProgressView`. `- (void)setProgress:(CGFloat)_progress_ animated:(BOOL)_animated_` #### Parameters _progress_ The [progress](#//api/name/progress) to show on the [progress](#//api/name/progress) view. _animated_ Wether or not to animate the [progress](#//api/name/progress) change. #### Declared In `M13ProgressView.h` ``` -------------------------------- ### M13ProgressViewBorderedBar Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressViewBorderedBar.html Methods available for interacting with the M13ProgressViewBorderedBar. ```APIDOC ## M13ProgressViewBorderedBar Instance Methods ### performAction:animated: Perform the given action if defined. Usually showing success or failure. - **Method**: `void` - **Endpoint**: `- (void)performAction:(M13ProgressViewAction)_action_ animated:(BOOL)_animated_` #### Parameters - **_action_** (M13ProgressViewAction) - Required - The action to perform. - **_animated_** (BOOL) - Required - Wether or not to animate the change #### Declared In `M13ProgressView.h` ### setIndeterminate: Wether or not the [progress](#//api/name/progress) view is indeterminate. - **Method**: `void` - **Endpoint**: `- (void)setIndeterminate:(BOOL)_indeterminate_` #### Declared In `M13ProgressView.h` ### setPrimaryColor: The primary color of the `M13ProgressView`. - **Method**: `void` - **Endpoint**: `- (void)setPrimaryColor:(UIColor *)_primaryColor_` #### Declared In `M13ProgressView.h` ### setProgress:animated: Set the [progress](#//api/name/progress) of the `M13ProgressView`. - **Method**: `void` - **Endpoint**: `- (void)setProgress:(CGFloat)_progress_ animated:(BOOL)_animated_` #### Parameters - **_progress_** (CGFloat) - Required - The [progress](#//api/name/progress) to show on the [progress](#//api/name/progress) view. - **_animated_** (BOOL) - Required - Wether or not to animate the [progress](#//api/name/progress) change. #### Declared In `M13ProgressView.h` ### setSecondaryColor: The secondary color of the `M13ProgressView`. - **Method**: `void` - **Endpoint**: `- (void)setSecondaryColor:(UIColor *)_secondaryColor_` #### Declared In `M13ProgressView.h` ``` -------------------------------- ### M13ProgressViewImage Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/html/Classes/M13ProgressViewImage.html Methods available for interacting with the M13ProgressViewImage. ```APIDOC ## M13ProgressViewImage Instance Methods ### performAction:animated: Perform the given action if defined. Usually showing success or failure. `- (void)performAction:(M13ProgressViewAction)_action_ animated:(BOOL)_animated_` #### Parameters _action_ The action to perform. _animated_ Wether or not to animate the change ### setIndeterminate: Sets the progress view to an indeterminate state. `- (void)setIndeterminate:(BOOL)_indeterminate_` #### Parameters _indeterminate_ Set to YES to enable indeterminate mode, NO to disable. ### setProgress:animated: Sets the progress of the progress view. `- (void)setProgress:(CGFloat)_progress_ animated:(BOOL)_animated_` #### Parameters _progress_ The progress value, between 0.0 and 1.0. _animated_ Wether or not to animate the change ``` -------------------------------- ### Configure M13ProgressViewRing Source: https://context7.com/marxon13/m13progresssuite/llms.txt Style the circular ring progress view with customizable background and progress ring widths, colors, and optional percentage display. ```objectivec #import "M13ProgressViewRing.h" // Create ring progress view M13ProgressViewRing *ringView = [[M13ProgressViewRing alloc] initWithFrame:CGRectMake(0, 0, 80, 80)]; // Configure ring appearance ringView.backgroundRingWidth = 3.0; // Width of background circle ringView.progressRingWidth = 5.0; // Width of progress arc ringView.primaryColor = [UIColor colorWithRed:0.2 green:0.6 blue:1.0 alpha:1.0]; ringView.secondaryColor = [UIColor colorWithWhite:0.85 alpha:1.0]; // Show percentage in center ringView.showPercentage = YES; // Enable indeterminate spinning animation ringView.indeterminate = YES; // Or set determinate progress ringView.indeterminate = NO; [ringView setProgress:0.65 animated:YES]; // Show completion status [ringView performAction:M13ProgressViewActionSuccess animated:YES]; [self.view addSubview:ringView]; ringView.center = self.view.center; ``` -------------------------------- ### M13ProgressViewMetroDot Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressViewMetroDot.html Instance methods available for the M13ProgressViewMetroDot class. ```APIDOC ## M13ProgressViewMetroDot Instance Methods ### copy All subclasses must respond to NSCopying. `- (id)copy` #### Declared In `M13ProgressViewMetro.h` ### performAction:animated: Perform the given action if defined. Usually showing success or failure. `- (void)performAction:(M13ProgressViewAction)_action_ animated:(BOOL)_animated_` #### Parameters _action_ The action to perform. _animated_ Wether or not to animate the change ``` -------------------------------- ### Create and Update M13ProgressViewBar Source: https://github.com/marxon13/m13progresssuite/blob/master/README.md Demonstrates the basic usage of creating, configuring, and updating an M13ProgressViewBar. Add the progress view to your view hierarchy and update its progress value. ```objective-c // Create the progress view. M13ProgressViewBar *progressView = [[M13ProgressViewBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 5.0)]; // Configure the progress view here. // Add it to the view. [self.view addSubview: progressView]; // Update the progress as needed [progressView setProgress: 0.1 animated: YES]; ``` -------------------------------- ### M13ProgressViewLetterpress Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/docset/Contents/Resources/Documents/Classes/M13ProgressViewLetterpress.html This section describes the instance methods available for the M13ProgressViewLetterpress class, primarily focusing on setting the progress. ```APIDOC ## M13ProgressViewLetterpress Instance Methods ### Description Methods for interacting with and controlling the M13ProgressViewLetterpress. ### Method - **setProgress:animated:** ### Description Sets the progress of the view, with an option to animate the change. ### Parameters - **progress** (CGFloat) - The new progress value. - **animated** (BOOL) - A boolean indicating whether the progress change should be animated. ### Declared In - M13ProgressViewLetterpress.h - M13ProgressViewLetterpress.m ``` -------------------------------- ### Create and Configure M13ProgressViewSegmentedRing Source: https://context7.com/marxon13/m13progresssuite/llms.txt Initialize a segmented circular progress view. Configure the number of segments, ring width, separation angle, boundary type, and colors. Progress is shown by filling segments. ```objectivec #import "M13ProgressViewSegmentedRing.h" // Create segmented ring M13ProgressViewSegmentedRing *segmentedRing = [[M13ProgressViewSegmentedRing alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; // Configure segments segmentedRing.numberOfSegments = 10; segmentedRing.progressRingWidth = 8.0; segmentedRing.segmentSeparationAngle = 0.05; // Radians between segments // Set segment boundary style segmentedRing.segmentBoundaryType = M13ProgressViewSegmentedRingSegmentBoundaryTypeWedge; // Options: M13ProgressViewSegmentedRingSegmentBoundaryTypeWedge // M13ProgressViewSegmentedRingSegmentBoundaryTypeRectangle // Show percentage in center segmentedRing.showPercentage = YES; // Colors segmentedRing.primaryColor = [UIColor purpleColor]; segmentedRing.secondaryColor = [UIColor colorWithWhite:0.8 alpha:1.0]; // Progress fills segments [segmentedRing setProgress:0.7 animated:YES]; [self.view addSubview:segmentedRing]; ``` -------------------------------- ### M13ProgressViewFilteredImage Instance Methods Source: https://github.com/marxon13/m13progresssuite/blob/master/Documentation/html/Classes/M13ProgressViewFilteredImage.html This section covers the instance methods of the M13ProgressViewFilteredImage class, including methods for performing actions and setting progress. ```APIDOC ## Instance Methods ### performAction:animated: Perform the given action if defined. Usually showing success or failure. `- (void)performAction:(M13ProgressViewAction)_action_ animated:(BOOL)_animated_` #### Parameters _action_ The action to perform. _animated_ Wether or not to animate the change #### Declared In `M13ProgressView.h` ### setIndeterminate: Sets the progress view to an indeterminate state. Note: M13ProgressViewFilteredImage does not support indeterminate mode. `- (void)setIndeterminate:(BOOL)indeterminate` #### Declared In `M13ProgressView.h` ### setProgress:animated: Sets the progress of the progress view. `- (void)setProgress:(CGFloat)_progress_ animated:(BOOL)_animated_` #### Parameters _progress_ The progress to set. _animated_ Whether or not to animate the change. #### Declared In `M13ProgressView.h` ```