IOS7 (ios7 custom UIAlertView)

Source: Internet
Author: User

UIAlertView of IOS7 does not support customization and cannot be added to subview.

But you can use a third-party library git download link https://github.com/wimagguc/ios-custom-alertview

Custom iOS7 AlertView

Usage:

1. Download

2. decompress the downloaded package and

  • CustomIOS7AlertView. h
  • CustomIOS7AlertView. m files are pasted into your project.


    3. Add a header file

    Add the header file where you need to use UIAlertView.

    # Import "CustomIOS7AlertView. h"

    And add the protocol. 4. Add AlertView

    Optional * alertView = [[CustomIOS7AlertView alloc] init]; [alertView setButtonTitles: [NSMutableArray arrayWithObjects: @ "cancel", @ "OK", nil]; // Add the button [alertView setContainerView: youcontroller. view]; [alertView show];

    Running result:



    Very simple don't do specific introduction, you can download Demo look: http://download.csdn.net/detail/superlele123/6986895

    Click Item in the upper right corner to bring up 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.