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:
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.
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];
**- 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".
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.
Great
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.
Its awesome.. saves lots of time...
Questions & Comments