Coder Social home page Coder Social logo

cooltoast's Introduction

CoolToast

A toast for mac(support Dark Mode)

Carthage

Installation with Carthage (iOS 8+)

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"

How to use

  1. Add CoolToast to your project
  2. Add CoolToast.framework to Targets->Generate->Embedded Binaries
  3. import <CoolToast/ToastWindowController.h>`
  4. 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

toastPostion default: CTPositionTop|CTPositionLeft

CTPositionMouse
CTPositionCenter
CTPositionLeft
CTPositionTop
CTPositionRight
CTPositionBottom
CTPositionOnMainWindow(not support yet)
CTPositionAllWindow(not support yet)

animater default: CTAnimaterFade

CTAnimaterFade
CTAnimaterScale
CTAnimaterTranslateFromLeft
CTAnimaterTranslateFromTop
CTAnimaterTranslateFromRight
CTAnimaterTranslateFromBottom
CTAnimaterNone

Position of margin to screen, not work for CTPositionCenter and CTPositionMouse

leftOffset
topOffset
rightOffset
bottomOffset

autoDismiss and autoDismissTimeInSecond default :YES

indicate the toast will auto dismiss and auto dismiss time

backgroundColor default : [NSColor clearColor]

Toast Color

toastBackgroundColor

Toast background color

hiddenIcon default:NO

Show or hide application icon

iconImage

the icon image, if iconImage is nil then will default display Application's icon

Delegate for Toast

-(void)onCoolToastDismiss:(id)toastWindow;  
-(void)onCoolToastClick:(id)toastWindow;  

SourceCode:CoolToast
Email:[email protected]

cooltoast's People

Contributors

socoolby avatar

Stargazers

mcgtts avatar ONG_J avatar rayman0724 avatar  avatar 黄文飞 avatar Fisher Lee avatar nyzstar avatar Wu Xuejun avatar  avatar terrywang avatar kkm avatar

Watchers

James Cloos avatar

Forkers

xuvw fisher158163

cooltoast's Issues

Print error log

[NSWindow makeKeyWindow] called on NSWindow 0x144008da0 which returned NO from -[NSWindow canBecomeKeyWindow].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.