The best pop-up box for iOS

Source: Internet
Author: User

When you refactor a project, you find that you need to pop up a hint, such as a successful login, a failed data request, a camera or photo album to upload your avatar, and more.

Today, I wrote a pop-up box, using the system's Uialertcontroller, but you have defined some of the ways to click the event, you can directly enter the content of the prompt and the options provided and the event when the option was clicked.

How to use:

Pilot header file: #import "YZ.h" or #import "yz_alert.h" are the same

And then:

Only one option button with prompt content

    [[yz_ Alert yz]  onemessage:@ " content " withaction :@ " " withoneclick< Span class= "S4" >:^{

// Click OK button or Cancel button event, this code will automatically pop up after execution, very simple

}];

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/855243/201703/855243-20170315174613620-1932653415. PNG "style=" border:0px; "/>

    // two option buttons, one OK, one cancellation, and, of course, the content of the prompt

    [[yz_ Alert yz]  twomessage:@ " tip content " withaction :@ " withoneclick :^{

// Click OK to execute the code

} withtwo:@ " cancel " withtwoclick: ^{

// Click Cancel to execute the code

}];

// After the code executes, it will automatically eject very simple

three kinds and above are not the same for example, you can add up to 6 options

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/855243/201703/855243-20170315174737854-254591314. PNG "style=" border:0px; "/>

GitHub

Https://github.com/YouZhiZheShiJingCheng/YZ_Alert


This article is from the "Red Corner Antelope" blog, please be sure to keep this source http://2254359459.blog.51cto.com/10776102/1906984

The best pop-up box for iOS

Related Article

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.