We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here's an example using swift. Maybe add it in the readme somewhere, because digging though stackoverflow is not nice.
import CRToast //somewhere.... var options:[NSObject:AnyObject] = [ kCRToastTextKey : "Hello World! This is a sample message up after loading the view", kCRToastBackgroundColorKey : UIColor.blackColor(), kCRToastTextColorKey: UIColor.yellowColor(), kCRToastTextMaxNumberOfLinesKey: 2, kCRToastTimeIntervalKey: 3, kCRToastUnderStatusBarKey : NSNumber(bool: false), kCRToastTextAlignmentKey : NSTextAlignment.Left.rawValue, //options[kCRToastImageKey] = UIImage(named: "ic_whatever") as AnyObject? kCRToastNotificationTypeKey : CRToastType.NavigationBar.rawValue, kCRToastAnimationInTypeKey : CRToastAnimationType.Gravity.rawValue, kCRToastAnimationOutTypeKey : CRToastAnimationType.Gravity.rawValue, kCRToastAnimationInDirectionKey : CRToastAnimationDirection.Top.rawValue, kCRToastAnimationOutDirectionKey : CRToastAnimationDirection.Top.rawValue ] CRToastManager.showNotificationWithOptions(options, completionBlock: { () -> Void in print("done!") })
The text was updated successfully, but these errors were encountered:
thanks but its giving errors in swift 3
Sorry, something went wrong.
let options: [String: Any] = [kCRToastTextKey: "Member joined: (member.identity)", kCRToastTextAlignmentKey: NSTextAlignment.center, kCRToastBackgroundColorKey: UIColor.red, kCRToastAnimationInTypeKey: CRToastAnimationType.gravity, kCRToastAnimationOutTypeKey: CRToastAnimationType.gravity, kCRToastAnimationInDirectionKey: CRToastAnimationDirection.left, kCRToastAnimationOutDirectionKey: CRToastAnimationDirection.right]
CRToastManager.showNotification(options: options) { print("completed") }
This one is working example.
good
No branches or pull requests
Here's an example using swift. Maybe add it in the readme somewhere, because digging though stackoverflow is not nice.
The text was updated successfully, but these errors were encountered: