// Get started
SCLAlertView *alert = [[SCLAlertView alloc] init];
[alert showSuccess:selftitle:@"Hello World"subTitle:@"This is a more descriptive text."closeButtonTitle:@"Done"duration:0.0f];
// Alternative alert types
[alert showError:selftitle:@"Hello Error"subTitle:@"This is a more descriptive error text."closeButtonTitle:@"OK"duration:0.0f]; // Error
[alert showNotice:selftitle:@"Hello Notice"subTitle:@"This is a more descriptive notice text."closeButtonTitle:@"Done"duration:0.0f]; // Notice
[alert showWarning:selftitle:@"Hello Warning"subTitle:@"This is a more descriptive warning text."closeButtonTitle:@"Done"duration:0.0f]; // Warning
[alert showInfo:selftitle:@"Hello Info"subTitle:@"This is a more descriptive info text."closeButtonTitle:@"Done"duration:0.0f]; // Info
[alert showEdit:selftitle:@"Hello Edit"subTitle:@"This is a more descriptive info text with a edit textbox"closeButtonTitle:@"Done"duration:0.0f]; // Edit
[alert showCustom:selfimage:[UIImage imageNamed:@"git"] color:color title:@"Custom"subTitle:@"Add a custom icon and color for your own type of alert!"closeButtonTitle:@"OK"duration:0.0f]; // Custom
[alert showWaiting:selftitle:@"Waiting..."subTitle:@"Blah de blah de blah, blah. Blah de blah de"closeButtonTitle:nilduration:5.0f];
[alert showQuestion:selftitle:@"Question?"subTitle:kSubtitlecloseButtonTitle:@"Dismiss"duration:0.0f];
// Using custom alert width
SCLAlertView *alert = [[SCLAlertView alloc] initWithWindowWidth:300.0f];
SCLAlertview in a new window. (No UIViewController)
SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow];
[alert showSuccess:@"Hello World"subTitle:@"This is a more descriptive text."closeButtonTitle:@"Done"duration:0.0f];
// Alternative alert types
[alert showError:@"Hello Error"subTitle:@"This is a more descriptive error text."closeButtonTitle:@"OK"duration:0.0f]; // Error
[alert showNotice:@"Hello Notice"subTitle:@"This is a more descriptive notice text."closeButtonTitle:@"Done"duration:0.0f]; // Notice
[alert showWarning:@"Hello Warning"subTitle:@"This is a more descriptive warning text."closeButtonTitle:@"Done"duration:0.0f]; // Warning
[alert showInfo:@"Hello Info"subTitle:@"This is a more descriptive info text."closeButtonTitle:@"Done"duration:0.0f]; // Info
[alert showEdit:@"Hello Edit"subTitle:@"This is a more descriptive info text with a edit textbox"closeButtonTitle:@"Done"duration:0.0f]; // Edit
[alert showCustom:[UIImage imageNamed:@"git"] color:color title:@"Custom"subTitle:@"Add a custom icon and color for your own type of alert!"closeButtonTitle:@"OK"duration:0.0f]; // Custom
[alert showWaiting:@"Waiting..."subTitle:@"Blah de blah de blah, blah. Blah de blah de"closeButtonTitle:nilduration:5.0f];
[alert showQuestion:@"Question?"subTitle:kSubtitlecloseButtonTitle:@"Dismiss"duration:0.0f];
// Using custom alert width
SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindowWidth:300.0f];
New Window: Known issues
SCLAlert animation is wrong in landscape. (iOS 6.X and 7.X)
Post a Comment