Bullet Frame Alertview

Source: Internet
Author: User


Create a bullet box
Uialertview *alert = [[Uialertview alloc] initwithtitle:@ "title" message:@ "Show Details" Delegate:self cancelbuttontitle:@ "Cancel" otherbuttontitle:@ "OK", nil];

Set the display type of alert (this is when message is nil, enter the message content)
Alert.alertviewstyle = Uialertviewstyleplaintextinput;
Set the contents of the text box input
NSString *text;
[Alert textfiledatindex:0].text = text;
Show Alert Bullet Box
[Alert show];

#pragma Mark-uialertview Proxy method
Clicking on the button above Alertview will call this method
-(void) Alertview: (Uialertview *) Alertview Clickedbuttonatindex: (Nsinteger) Buttonindex
{
if (Buttonindex = = 0)
{
Generally for cancellations
Return
}
if (Buttonindex = = 1)
{
1. Get the content in the text box
NSString *name = [Alertview textfieldatindex:0].text;
}
}
Little Tricks
Alert.tag can be used to pass a value that does not need to define a global variable;

Bullet Frame Alertview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.