Showing posts with label toast in ios. Show all posts
Showing posts with label toast in ios. Show all posts

Tuesday, November 4, 2014

Toast message in iOS

Toast message in iOS

UIAlertView *toast = [[UIAlertView alloc] initWithTitle:nil message:@"Alert Example like toast" delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil];
            [toast show];
            float duration = 0.5; // duration in seconds
            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, duration * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
                [toast dismissWithClickedButtonIndex:0 animated:YES];