M13ProgressSuite Documentation

repository·master·Indexed 26 days ago

https://github.com/marxon13/m13progresssuite

A set of Objective-C classes for iOS providing various progress visualization styles. Includes M13ProgressHUD for customizable overlays, M13ProgressViewBar for UINavigationBar indicators, M13ProgressConsole for terminal-style views, and a suite of interchangeable progress views such as Pie, Ring, and Segmented Bar.

Tokens
887
Snippets
2
Records
4
Agent score
37%

What's inside M13ProgressSuite

  1. Overview of M13ProgressSuite

    master

    M13ProgressSuite is a collection of Objective-C classes designed to display various progress information styles on iOS. It provides an interchangeable set of progress views based on a common superclass, making it easy to switch between different visual styles.

    Key components include:

    • M13ProgressViewBar: A progress bar for UINavigationBar (similar to Apple's Messages app) with support for indeterminate styles.
    • M13ProgressHUD: A customizable HUD overlay that can be displayed over any UIView.
    • M13ProgressConsole: A progress view styled like a terminal.
    • M13ProgressViews: A suite of interchangeable progress view styles including Bar, Bordered Bar, Filtered Image, Image, Pie, Ring, Segmented Bar, Segmented Ring, and Striped Bar.
  2. Add a progress bar to UINavigationBar

    master
    The UINavigationController component (specifically M13ProgressViewBar) allows you to add a progress bar directly to a UINavigationBar. The bar is controlled via the UINavigationController and supports both determinate and indeterminate styles.
  3. Use M13ProgressHUD

    master

    M13ProgressHUD is a customizable overlay used to show progress and status information. You can inject any M13ProgressView subclass into the HUD to customize its appearance. The HUD can be added to a UIWindow or any UIView.

    // 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)
    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];
  4. Use M13ProgressViews

    master

    All progress views in the suite follow a consistent usage pattern. You can instantiate a specific view type (e.g., M13ProgressViewBar, M13ProgressViewRing, M13ProgressViewPie, etc.), add it to your view hierarchy, and update its progress value.

    // 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];