类似 Android Toast 的提醒效果:APToast

jopen 10年前

APToast 提供了多种形式的类似 Android Toast 的提醒效果。

特性

  • Tap on toast to dismiss
  • Custom view as toast
  • Queueing toasts one by one
  • Dismiss toast by toastID
  • Present in bottom, top or center of receiver view
  • Present in CGPoint-center of receiver view
  • Customizable UI (globally)
  • Device rotation not supported (by now ;))

示例

#import <APToast/UIView+APToast.h>    // make toast  NSInteger toastID = [self.view ap_makeToast:@"Simple toast message"];  // eject later if needed:  [self.view ap_ejectToast:toastID];      // custom toast view  UIView *customToastView = [[UIView alloc] initWithFrame:CGRectMake(0.f, 0.f, 280, 44)];  customToastView.backgroundColor = [UIColor greenColor];    [self.view ap_makeToastView:customToastView duration:4.f position:APToastPositionCenter];

类似 Android Toast 的提醒效果:APToast

项目主页:http://www.open-open.com/lib/view/home/1402150842993