Android Toast equivalent in iOS


Does anyone know what the Java Toast equivalent of this iOS Objective C event would be in a Fragment?
Below is a sample of what I have written in iOS. What I am looking for the same Alert in Java using a Toast in place of the iOS UIAlert. I am sorry if I did not make that clear on my original post.

- (void) dateLogic {
    NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
    [dateFormat setDateFormat:@"MMMM dd"];
    NSString *theDate = [dateFormat stringFromDate:[NSDate date]];

    if ([theDate isEqualToString:@"January 01"]) {

        feastDay = [[UIAlertView alloc]
                     initWithTitle:@"New Years Day!"
                     message:@"January 01"
                     otherButtonTitles:@"Close", nil];
        feastDay.delegate = self;
        [feastDay show];

Source: Xamarin.ios Questions

Categorised as Uncategorised Tagged , , , ,


I found this amazing class in github that works like a charm.
Toast for iOS
It is enough to import the UIView+Toast.h and UIView+Toast.m files and then add

[self.view makeToast:@"This is a piece of toast."];

as written in the page examples.

Lorine Bahringer

Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us