小编Bil*_*mes的帖子

Android Toast相当于iOS

有谁知道这个iOS Objective C事件的Java Toast等价物是什么?以下是我在iOS中编写的示例.我正在寻找使用Toast代替iOS UIAlert的Java中的相同警报.如果我在原帖上没说清楚,我很抱歉.

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

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

        feastDay = [[UIAlertView alloc]
                     initWithTitle:@"New Years Day!"
                     message:@"January 01"
                     delegate:self
                     cancelButtonTitle:nil
                     otherButtonTitles:@"Close", nil];
        feastDay.delegate = self;
        [feastDay show];
    }
}
Run Code Online (Sandbox Code Playgroud)

android toast xamarin.ios ios xamarin

28
推荐指数
5
解决办法
5万
查看次数

标签 统计

android ×1

ios ×1

toast ×1

xamarin ×1

xamarin.ios ×1