A toast for mac(support Dark Mode)
Carthage is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods.
To install with Carthage, follow the instruction on Carthage
Cartfile
github "socoolby/CoolToast"
- Add CoolToast to your project
- Add CoolToast.framework to Targets->Generate->Embedded Binaries
- import <CoolToast/ToastWindowController.h>`
- code for demo
ToastWindowController *toastWindow=[ToastWindowController getToastWindow];
toastWindow.animater=CTAnimaterFade;
toastWindow.animaterTimeSecond=2;
toastWindow.autoDismiss=NO;
toastWindow.toastPostion=CTPositionCenter;
toastWindow.maxWidth=250;
toastWindow.delegate=self;
[toastWindow showCoolToast:@"Animater Face\n Just do it."];
Params
CTPositionMouse
CTPositionCenter
CTPositionLeft
CTPositionTop
CTPositionRight
CTPositionBottom
CTPositionOnMainWindow(not support yet)
CTPositionAllWindow(not support yet)
CTAnimaterFade
CTAnimaterScale
CTAnimaterTranslateFromLeft
CTAnimaterTranslateFromTop
CTAnimaterTranslateFromRight
CTAnimaterTranslateFromBottom
CTAnimaterNone
leftOffset
topOffset
rightOffset
bottomOffset
indicate the toast will auto dismiss and auto dismiss time
Toast Color
Toast background color
hiddenIcon default:NO
Show or hide application icon
the icon image, if iconImage is nil then will default display Application's icon
-(void)onCoolToastDismiss:(id)toastWindow;
-(void)onCoolToastClick:(id)toastWindow;
SourceCode:CoolToast
Email:[email protected]