Open source China iOS client Learning (iv) Gcdiscreetnotificationview prompt view

Source: Internet
Author: User
Tags bool

The Gcdiscreetnotificationview class library function is to display a current state as a notification view without blocking the user from interacting with the device application.

Gcdiscreetnotificationview class Library Download address Https://github.com/gcamp/GCDiscreetNotificationView

On the open source China iOS client, when the network is not available,

Our commonly used notification may be a uialertview warning that the current network is not connected, forcing the user to make a choice, and the coercion must be unpleasant. This is one of the advantages of the Gcdiscreetnotificationview class library comparison;

on how to use the Gcdiscreetnotificationview third party library, the development class library is encapsulated in a tool Class (Helper folder) in the open source China iOS client.

+ (void) Toastnotification: (NSString *) text Andview: (UIView *) View andloading: (bool) isloading Andisbottom: (BOOL) Isbottom  
{  
    Gcdiscreetnotificationview *notificationview = [[Gcdiscreetnotificationview alloc] InitWithText: Text showactivity:isloading Inpresentationmode:isbottom? Gcdiscreetnotificationviewpresentationmodebottom:gcdiscreetnotificationviewpresentationmodetop InView:view];  
    [Notificationview Show:yes];  
    [Notificationview hideanimatedafter:2.6];  
}

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.