Personal License FREE

1 application Binary restricted distribution Commercial use allowed Can modify source Read full license | More Info

You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

(18 ratings)

Advanced Alerts for iOS

UIPopupView is a powerful class that allows you to easily display information to your users in the form of a simple popup.

Share and win up to $15k in prizes each month!Learn more

Share

Description

UIPopupView is a powerful class that was developed to fill a void in the iPhone SDK. It provides a simple way to give feedback to the user in the form of little popup views.

Customizability was a huge factor in development, so that is why UIPopupView allows you to easily edit almost everything. This includes:

  • Title
  • Title Color
  • Title Alignment
  • Background Color
  • Background Opacity
  • Border Styles
  • Image Colors
  • Introduction Animation
  • Hide Animation
  • Animation Length
  • Much more!

UIPopupView was also designed to easily fit in with any custon color scheme, unlike Apple's popup class, UIAlertView. As mentioned above, you have the ability to change colors, border, text colors, etc. It also follows the design pattern of blocks rather than delegation to handle completion and important events, meaning that there is no fumbling with tags or instance variables to know which popup is which.

Upon purchase, you will receive the UIPopupView class code as well as an example control panel. This control panel allows you to create, change, and view the UIPopupView without writing a line of code.

Back to top

Installation/Setup Instructions

Additional information on installation is included in the UIPopupView.h file.

1) Import the following into your project:

UIPopupView.h
UIPopupView.m
UIPopupView_checkmark.png
UIPopupView_checkmark@2x.png
UIPopupView_x.png
UIPopupView_x@2x.png

2) Add the following framework to your project.

QuartzCore

3) Import "UIPopupView.h" into your class. 4) Create a new instance of the UIPopupView class like so:

UIPopupView *popupView = [[UIPopupView alloc] init];

5) Set the UIPopupViewType.

[popupView setPopupType:UIPopupViewTypeLoading];

6) Optionally utilize some of the UIPopupViewType methods and properties.

[popupView setPopupBackgroundColor:[UIColor whiteColor]];
[popupView setPopupBackgroundAlpha:0.5];
[popupView setTitle:@"Loading!"];

7) Add the UIPopupView to the view of your choice, and then utilize the -[show] method.

[[self view] addSubview:popupView];
[popupView show]; // or use -[showAfterDelay:]

8) Use the -[hide] or -[hideAfterDelay:] method to hide the UIPopupView when you're finished.

[popupView hide]; // or use [popupView hideAfterDelay:2.0];

9) Since you're done with the popup, you can release it.

[popupView release];
Back to top

UIPopupView Types

**- UIPopupViewTypeConfirm**
    A UIPopupView containing a title and a checkmark image.
    Used for confirmations such as "Copied", "Deleted", etc.
**- UIPopupViewTypeCancel**
    A UIPopupView containing a title and an "X" image.
    Used for notifications such as "Cancelled", "Error", etc.
**- UIPopupViewTypeLoading**
    A UIPopupView containing a title and an activity indicator.
    Used for notifications such as "Loading", "Thinking", etc.
**- UIPopupViewTypeInformation**
    A UIPopupView containing a title and some customizable text.
    Used for notifications with custom text such as "Instructions".
Back to top

Real Example

The following is a real example of the UIPopupView in action, with a description of what each line does.

UIPopupView *popup = [[UIPopupView alloc] init]; // Creates the popup object.
[popup setPopupType:UIPopupViewTypeLoading]; // The type is a "Loading Popup" which contains a UIActivityIndicatorView

[popup setTitle:@"Downloading"]; // The title of the popup.

[popup setIntroductionAnimation:UIPopupViewAnimationReverseEnlarge]; // Introduction animation type.
[popup setIntroductionAnimationLength:0.2]; // Introduction animation length.
[popup setIntroductionAnimationCompletionBlock:^{

    [self downloadFileFromServer]; // Example synchronous method.

    [popup hide]; // Hide the popup when completed.

}];

[popup setHideAnimation:UIPopupViewAnimationReverseEnlarge]; // Set hide animation type.
[popup setHideAnimationLength:0.2]; // Set hide animation length.
[popup setHideAnimationCompletionBlock:^{

    NSLog(@"Finished the download."); // Example log called when animation complete.

}];

[[self view] addSubview:popup]; // Add the subject to the view.
[popup show]; // Show the popup.
[popup release]; // Release the popup object.

Questions & Comments

Leave a comment

You must be logged-in to leave a comment.
Log-in now or register for a free account.
No comments have been posted yet.
You must be logged-in to vote. Log-in to your account or register now.
View all 13 reviews »

User Reviews

    Great
    - Aftab, 1 year ago
    Flag review
    Was this helpful? Yes No
    I've searched a lot for a component like this, and it's great that is free and is greater that is incredible well made. It has everything someone need to start and develop his app.
    - Dan Petrescu, 1 year ago
    Flag review
    Was this helpful? Yes No
    Its awesome.. saves lots of time...
    - Hemant, 1 year ago
    Flag review
    Was this helpful? Yes No