Android Toast in iPhone?

后端 未结 12 916
轮回少年
轮回少年 2020-12-05 20:38

When I write Android apps, I love the Toast feature. Is there a way to get this kind of set and forget popup message in iPhone development using MonoTouch (C# .NET)?

12条回答
  •  醉话见心
    2020-12-05 20:59

    You can use this link for objective-c code for Toast

    http://code.google.com/p/toast-notifications-ios/source/browse/trunk/

    While this link for its usage

    http://code.google.com/p/toast-notifications-ios/wiki/HowToUse

    which could be like any one of the below samples

    [[iToast makeText:NSLocalizedString(@"The activity has been successfully saved.", @"")] show];
    
    [[[iToast makeText:NSLocalizedString(@"The activity has been successfully saved.", @"")] 
                              setGravity:iToastGravityBottom] show];
    
    [[[[iToast makeText:NSLocalizedString(@"Something to display a very long time", @"")] 
                      etGravity:iToastGravityBottom] setDuration:iToastDurationLong] show];
    

提交回复
热议问题