Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Customized alertView / loadingView for replacing UIAlertView. This component is part of iPhone application DouDouYou兜兜友 (, which is available on

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 XYAlertView
Octocat-spinner-32 XYAlertViewDemo.xcodeproj
Octocat-spinner-32 XYAlertViewDemo
Octocat-spinner-32 .gitignore


Customized alertView / loadingView for replacing UIAlertView. Support display queue, you will never miss any alert/loading view. This component is part of the most popular social network in China, DouDouYou兜兜友 (, which is available download at

How to use

  1. import XYAlertViewHeader.h in your prefix file.
  2. invoke XYShowAlert(@"Hello!") anywhere in your code to popup the alert view.


  • complete way to create a customized alert view with block.

// create an alertView
XYAlertView *alertView = [XYAlertView alertViewWithTitle:@"Hello!"
                                                 message:@"This's the single alert view demo!"
                                                 buttons:[NSArray arrayWithObjects:@"Ok", @"Cancel", nil]
                                            afterDismiss:^(int buttonIndex) {
                                                NSLog(@"button index: %d pressed!", buttonIndex);

// set the second button as gray style
[alertView setButtonStyle:XYButtonStyleGray atIndex:1];

// display
[alertView show];
  • show a loading view and dismiss after 5 seconds

// create a loading view
XYLoadingView *loadingView = [XYLoadingView loadingViewWithMessage:@"Loading will complete in 5 seconds..."];

// display
[loadingView show];

// dismiss loading view with popup message after 5 seconds
[loadingView performSelector:@selector(dismissWithMessage:) withObject:@"The message comes out once loading view gone." afterDelay:5];
  • also you can popup more than one alert view in single call, them will come out one by one without any missing

XYShowAlert(@"Hello! This is the first alertView");
XYShowAlert(@"I'm second one.");
XYShowAlert(@"I'm the last one");

Contrat me

Something went wrong with that request. Please try again.