├── Gifs
├── fade.gif
├── scale.gif
├── MousePosition.gif
└── show_from_top.gif
├── CoolToast.framework.zip
├── Assets.xcassets
├── Contents.json
├── messageTextColor.colorset
│ └── Contents.json
└── conainerBackgroundColor.colorset
│ └── Contents.json
├── TestCoolToast
├── Assets.xcassets
│ ├── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── main.m
├── AppDelegate.h
├── TestCoolToast.entitlements
├── AppDelegate.m
├── ViewController.h
├── Info.plist
├── ViewController.m
└── Base.lproj
│ └── Main.storyboard
├── CoolToast.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── xcshareddata
│ └── xcschemes
│ │ └── CoolToast.xcscheme
└── project.pbxproj
├── CoolToast
├── CTView.h
├── CTView.m
├── CTScreen.h
├── CoolToast.h
├── CTCommon.h
├── Info.plist
├── CTScreen.m
├── ToastWindowController.h
├── CTCommon.m
├── ToastWindowController.xib
└── ToastWindowController.m
├── .gitignore
├── CoolToastTests
├── Info.plist
└── CoolToastTests.m
├── TestCoolToastTests
├── Info.plist
└── TestCoolToastTests.m
├── TestCoolToastUITests
├── Info.plist
└── TestCoolToastUITests.m
├── README.md
└── LICENSE
/Gifs/fade.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/socoolby/CoolToast/HEAD/Gifs/fade.gif
--------------------------------------------------------------------------------
/Gifs/scale.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/socoolby/CoolToast/HEAD/Gifs/scale.gif
--------------------------------------------------------------------------------
/Gifs/MousePosition.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/socoolby/CoolToast/HEAD/Gifs/MousePosition.gif
--------------------------------------------------------------------------------
/Gifs/show_from_top.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/socoolby/CoolToast/HEAD/Gifs/show_from_top.gif
--------------------------------------------------------------------------------
/CoolToast.framework.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/socoolby/CoolToast/HEAD/CoolToast.framework.zip
--------------------------------------------------------------------------------
/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/TestCoolToast/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CoolToast.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TestCoolToast/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TestCoolToast
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, const char * argv[]) {
12 | return NSApplicationMain(argc, argv);
13 | }
14 |
--------------------------------------------------------------------------------
/TestCoolToast/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TestCoolToast
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : NSObject
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/CoolToast/CTView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CTView.h
3 | // CoolToast
4 | //
5 | // Created by Socoolby on 2019/7/5.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface CTView : NSView
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/CoolToast.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TestCoolToast/TestCoolToast.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-only
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CoolToast/CTView.m:
--------------------------------------------------------------------------------
1 | //
2 | // CTView.m
3 | // CoolToast
4 | //
5 | // Created by Socoolby on 2019/7/5.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import "CTView.h"
10 |
11 | @implementation CTView
12 |
13 | - (void)drawRect:(NSRect)dirtyRect {
14 | [super drawRect:dirtyRect];
15 | }
16 | //Overrite for tap event.
17 | -(BOOL)acceptsFirstMouse:(nullable NSEvent *)event{
18 | return YES;
19 | }
20 | @end
21 |
--------------------------------------------------------------------------------
/CoolToast/CTScreen.h:
--------------------------------------------------------------------------------
1 | //
2 | // CTScreen.h
3 | // CoolToast
4 | //
5 | // Created by Socoolby on 2019/7/1.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface CTScreen : NSObject
15 |
16 | //+ (NSScreen *)screenWithPoint:(CGPoint)point;
17 | + (CGPoint)mouseLocationInScreen;
18 | + (NSScreen*)getMainScreen;
19 | +(NSScreen*)getCurrentScreen;
20 | + (NSRect)frameForScreen:(NSScreen *)screen;
21 |
22 |
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
--------------------------------------------------------------------------------
/TestCoolToast/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // TestCoolToast
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
18 | // Insert code here to initialize your application
19 | }
20 |
21 |
22 | - (void)applicationWillTerminate:(NSNotification *)aNotification {
23 | // Insert code here to tear down your application
24 | }
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 | .DS_Store
20 | # CocoaPods
21 | #
22 | # We recommend against adding the Pods directory to your .gitignore. However
23 | # you should judge for yourself, the pros and cons are mentioned at:
24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25 | #
26 | #Pods/
27 | Pods
28 | Podfile.lock
29 |
--------------------------------------------------------------------------------
/CoolToast/CoolToast.h:
--------------------------------------------------------------------------------
1 | //
2 | // CoolToast.h
3 | // CoolToast
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | //! Project version number for CoolToast.
14 | FOUNDATION_EXPORT double CoolToastVersionNumber;
15 |
16 | //! Project version string for CoolToast.
17 | FOUNDATION_EXPORT const unsigned char CoolToastVersionString[];
18 |
19 | // In this header, you should import all the public headers of your framework using statements like #import
20 |
21 |
--------------------------------------------------------------------------------
/CoolToastTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/TestCoolToastTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/TestCoolToastUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/CoolToast/CTCommon.h:
--------------------------------------------------------------------------------
1 | //
2 | // CoolToast.h
3 | // CoolToast
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright � 2019 Socoolby. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 | #import
12 |
13 | /*!
14 | Return Bundle where resources can be found.
15 |
16 | @discussion Throws NSInternalInconsistencyException if bundle cannot be found.
17 | */
18 | NSBundle *CTBundle();
19 |
20 |
21 | /*!
22 | Convenient method to get localized string from the framework bundle.
23 | */
24 | NSString *CTLoc(NSString *aKey);
25 | @interface CTCommon : NSObject
26 | +(void)delayToRunWithSecond:(float)second Block:(dispatch_block_t)block;
27 | +(CGSize)calculateFont:(NSString*)string withFont:(NSFont*)font;
28 | + (int)lineCountForText:(NSString *) text font:(NSFont*)font withinWidth:(CGFloat)width;
29 | @end
30 |
--------------------------------------------------------------------------------
/TestCoolToast/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // TestCoolToast
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | @interface ViewController : NSViewController
12 | @property (strong) IBOutlet NSView *testToastWindowButton;
13 | @property (nonatomic,strong) ToastWindowController *toastWindow;
14 | -(IBAction)testToast:(id)sender;
15 | -(IBAction)testToastWithAnimaterFade:(id)sender;
16 | -(IBAction)testToastWithAnimaterScale:(id)sender;
17 | -(IBAction)testToastWithAnimaterFromLeft:(id)sender;
18 | -(IBAction)testToastWithAnimaterFromTop:(id)sender;
19 | -(IBAction)testToastWithAnimaterFromRight:(id)sender;
20 | -(IBAction)testToastWithAnimaterFromBottom:(id)sender;
21 |
22 | @end
23 |
24 |
--------------------------------------------------------------------------------
/Assets.xcassets/messageTextColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | },
6 | "colors" : [
7 | {
8 | "idiom" : "universal",
9 | "color" : {
10 | "color-space" : "srgb",
11 | "components" : {
12 | "red" : "1.000",
13 | "alpha" : "1.000",
14 | "blue" : "1.000",
15 | "green" : "1.000"
16 | }
17 | }
18 | },
19 | {
20 | "idiom" : "universal",
21 | "appearances" : [
22 | {
23 | "appearance" : "luminosity",
24 | "value" : "dark"
25 | }
26 | ],
27 | "color" : {
28 | "color-space" : "srgb",
29 | "components" : {
30 | "red" : "0.227",
31 | "alpha" : "1.000",
32 | "blue" : "0.227",
33 | "green" : "0.227"
34 | }
35 | }
36 | }
37 | ]
38 | }
--------------------------------------------------------------------------------
/Assets.xcassets/conainerBackgroundColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | },
6 | "colors" : [
7 | {
8 | "idiom" : "universal",
9 | "color" : {
10 | "color-space" : "srgb",
11 | "components" : {
12 | "red" : "0x35",
13 | "alpha" : "0.700",
14 | "blue" : "0x37",
15 | "green" : "0x34"
16 | }
17 | }
18 | },
19 | {
20 | "idiom" : "universal",
21 | "appearances" : [
22 | {
23 | "appearance" : "luminosity",
24 | "value" : "dark"
25 | }
26 | ],
27 | "color" : {
28 | "color-space" : "srgb",
29 | "components" : {
30 | "red" : "1.000",
31 | "alpha" : "1.000",
32 | "blue" : "1.000",
33 | "green" : "1.000"
34 | }
35 | }
36 | }
37 | ]
38 | }
--------------------------------------------------------------------------------
/CoolToast/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSHumanReadableCopyright
22 | Copyright © 2019 Socoolby. All rights reserved.
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CoolToastTests/CoolToastTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // CoolToastTests.m
3 | // CoolToastTests
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CoolToastTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation CoolToastTests
16 |
17 | - (void)setUp {
18 | // Put setup code here. This method is called before the invocation of each test method in the class.
19 | }
20 |
21 | - (void)tearDown {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | - (void)testExample {
26 | // This is an example of a functional test case.
27 | // Use XCTAssert and related functions to verify your tests produce the correct results.
28 | }
29 |
30 | - (void)testPerformanceExample {
31 | // This is an example of a performance test case.
32 | [self measureBlock:^{
33 | // Put the code you want to measure the time of here.
34 | }];
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/TestCoolToastTests/TestCoolToastTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // TestCoolToastTests.m
3 | // TestCoolToastTests
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TestCoolToastTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation TestCoolToastTests
16 |
17 | - (void)setUp {
18 | // Put setup code here. This method is called before the invocation of each test method in the class.
19 | }
20 |
21 | - (void)tearDown {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | - (void)testExample {
26 | // This is an example of a functional test case.
27 | // Use XCTAssert and related functions to verify your tests produce the correct results.
28 | }
29 |
30 | - (void)testPerformanceExample {
31 | // This is an example of a performance test case.
32 | [self measureBlock:^{
33 | // Put the code you want to measure the time of here.
34 | }];
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/TestCoolToast/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | Copyright © 2019 Socoolby. All rights reserved.
27 | NSMainStoryboardFile
28 | Main
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/TestCoolToast/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/CoolToast/CTScreen.m:
--------------------------------------------------------------------------------
1 | //
2 | // CTScreen.m
3 | // CoolToast
4 | //
5 | // Created by Socoolby on 2019/7/1.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import "CTScreen.h"
10 |
11 | @implementation CTScreen
12 | + (CGPoint)mouseLocationInScreen{
13 | return [NSEvent mouseLocation];
14 | }
15 | + (NSScreen*)getMainScreen{
16 | return [NSScreen mainScreen];
17 | }
18 | +(NSScreen*)getCurrentScreen{
19 | NSArray * screenArray = [NSScreen screens];
20 | CGPoint mousePoint=[self mouseLocationInScreen];
21 | for(NSScreen *screen in screenArray){
22 | if(CGRectContainsPoint(screen.frame,mousePoint)){
23 | return screen;
24 | }
25 | }
26 | return [self getMainScreen];
27 | }
28 | + (NSRect)frameForScreen:(NSScreen *)screen
29 | {
30 | NSScreen * baseScreen = [NSScreen screens].firstObject;
31 | NSRect baseFrame = baseScreen.frame;
32 |
33 | NSRect mainFrame = screen.frame;
34 | NSRect mainVisibleFrame = screen.visibleFrame;
35 |
36 | NSRect frame = NSMakeRect(mainVisibleFrame.origin.x,
37 | baseFrame.size.height - mainFrame.size.height - mainFrame.origin.y,
38 | mainVisibleFrame.size.width,
39 | mainVisibleFrame.size.height);
40 |
41 | return frame;
42 | }
43 | @end
44 |
--------------------------------------------------------------------------------
/TestCoolToastUITests/TestCoolToastUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // TestCoolToastUITests.m
3 | // TestCoolToastUITests
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TestCoolToastUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation TestCoolToastUITests
16 |
17 | - (void)setUp {
18 | // Put setup code here. This method is called before the invocation of each test method in the class.
19 |
20 | // In UI tests it is usually best to stop immediately when a failure occurs.
21 | self.continueAfterFailure = NO;
22 |
23 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
24 | [[[XCUIApplication alloc] init] launch];
25 |
26 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
27 | }
28 |
29 | - (void)tearDown {
30 | // Put teardown code here. This method is called after the invocation of each test method in the class.
31 | }
32 |
33 | - (void)testExample {
34 | // Use recording to get started writing UI tests.
35 | // Use XCTAssert and related functions to verify your tests produce the correct results.
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/CoolToast/ToastWindowController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ToastWindowController.h
3 | // CoolToast
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import
10 | NS_ASSUME_NONNULL_BEGIN
11 | typedef NS_OPTIONS(NSUInteger,CTPosition){
12 | CTPositionMouse =1<<15,
13 | CTPositionCenter =1<<16,
14 | CTPositionLeft =1<<17,
15 | CTPositionTop =1<<18,
16 | CTPositionRight =1<<19,
17 | CTPositionBottom =1<<20,
18 | CTPositionOnMainWindow =1<<21,
19 | CTPositionAllWindow =1<<22,
20 | } ;
21 | typedef NS_OPTIONS(NSUInteger,CTAnimater){
22 | CTAnimaterFade =1,
23 | CTAnimaterScale =2,
24 | CTAnimaterTranslateFromLeft =3,
25 | CTAnimaterTranslateFromTop =4,
26 | CTAnimaterTranslateFromRight =5,
27 | CTAnimaterTranslateFromBottom =6,
28 | CTAnimaterNone =7,
29 | };
30 | @protocol ToastWindowDelegate
31 | -(void)onCoolToastDismiss:(id)toastWindow;
32 | -(void)onCoolToastClick:(id)toastWindow;
33 | @end
34 | @interface ToastWindowController : NSWindowController
35 | @property (weak) IBOutlet NSTextFieldCell *messageLabel;
36 | @property (weak) IBOutlet NSImageCell *iconImageCell;
37 | @property (nonatomic) NSInteger maxWidth;
38 | @property (nonatomic) NSInteger minWidth;
39 | @property (nonatomic) int minHeight;
40 | @property (nonatomic) NSInteger leftOffset;
41 | @property (nonatomic) NSInteger topOffset;
42 | @property (nonatomic) NSInteger rightOffset;
43 | @property (nonatomic) NSInteger bottomOffset;
44 | @property (nonatomic) NSInteger conerRadius;
45 | @property (nonatomic) BOOL autoDismiss;
46 | @property (nonatomic) NSUInteger autoDismissTimeInSecond;
47 | @property (nonatomic) CTPosition toastPostion;
48 | @property (nonatomic) CTAnimater animater;
49 | @property (nonatomic) float animaterTimeSecond;
50 | @property (nonatomic) BOOL hiddenIcon;
51 | @property (nonatomic) int imageMarginLeft;
52 | @property (nonatomic) NSImage *iconImage;
53 |
54 | @property (nonatomic,strong) NSColor *backgroundColor;
55 | @property (nonatomic,strong) NSColor *toastBackgroundColor;
56 | @property (nonatomic,strong) NSColor *textColor;
57 | @property (nonatomic,strong) NSFont *textFont;
58 |
59 | @property (weak) IBOutlet NSView *containerView;
60 |
61 | @property (nonatomic,strong) id delegate;
62 |
63 | +(id)getToastWindow;
64 | -(void)showCoolToast:(NSString*)message;
65 | - (IBAction)onContainerDoubleClick:(id)sender;
66 | @end
67 |
68 | NS_ASSUME_NONNULL_END
69 |
--------------------------------------------------------------------------------
/CoolToast/CTCommon.m:
--------------------------------------------------------------------------------
1 | //
2 | // CoolToast.h
3 | // CoolToast
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright � 2019 Socoolby. All rights reserved.
7 | //
8 |
9 |
10 | #import "CTCommon.h"
11 |
12 | NSBundle *CTBundle()
13 | {
14 | static dispatch_once_t onceToken;
15 | static NSBundle *Bundle = nil;
16 | dispatch_once(&onceToken, ^{
17 | Bundle = [NSBundle bundleWithIdentifier:@"com.socoolby.CoolToast"];
18 | if (!Bundle)
19 | {
20 | // Could be a CocoaPods framework with embedded resources bundle.
21 | // Look up "use_frameworks!" and "resources_bundle" in CocoaPods documentation.
22 | Bundle = [NSBundle bundleWithIdentifier:@"org.cocoapods.CoolToast"];
23 | if (!Bundle)
24 | {
25 | Class c = NSClassFromString(@"CoolToast");
26 |
27 | if (c)
28 | {
29 | Bundle = [NSBundle bundleForClass:c];
30 | }
31 | }
32 |
33 | if (Bundle)
34 | {
35 | Bundle = [NSBundle bundleWithPath:[Bundle pathForResource:@"CoolToast" ofType:@"bundle"]];
36 | }
37 | }
38 | });
39 |
40 | if (!Bundle)
41 | {
42 | @throw [NSException exceptionWithName:NSInternalInconsistencyException
43 | reason:@"Unable to find bundle with resources."
44 | userInfo:nil];
45 | }
46 | else
47 | {
48 | return Bundle;
49 | }
50 | }
51 |
52 |
53 | NSString *CTLoc(NSString *aKey)
54 | {
55 | return NSLocalizedStringFromTableInBundle(aKey, @"CoolToast", CTBundle(), nil);
56 | }
57 | @implementation CTCommon
58 | +(void)delayToRunWithSecond:(float)second Block:(dispatch_block_t)block{
59 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(second * NSEC_PER_SEC)), dispatch_get_main_queue(), block);
60 | }
61 | +(CGSize)calculateFont:(NSString*)string withFont:(NSFont*)font;
62 | {
63 | NSDictionary *attributes = @{NSFontAttributeName: font};
64 | CGSize stringBoundingBox = [string sizeWithAttributes:attributes];
65 | return stringBoundingBox;
66 | }
67 | + (int)lineCountForText:(NSString *) text font:(NSFont*)font withinWidth:(CGFloat)width
68 | {
69 | CGRect rect = [text boundingRectWithSize:CGSizeMake(width, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : font} context:nil];
70 | NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init];
71 | int lineCount=ceil(rect.size.height / [layoutManager defaultLineHeightForFont:font]);
72 | return lineCount;
73 | }
74 | @end
75 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CoolToast
2 | A toast for mac(support Dark Mode)
3 | ### Carthage
4 | ##### Installation with Carthage (iOS 8+)
5 |
6 | [Carthage](https://github.com/Carthage/Carthage) is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods.
7 |
8 | To install with Carthage, follow the instruction on [Carthage](https://github.com/Carthage/Carthage)
9 |
10 | Cartfile
11 | ```
12 | github "socoolby/CoolToast"
13 | ```
14 | ### How to use
15 | 1. Add CoolToast to your project
16 | 2. Add CoolToast.framework to Targets->Generate->Embedded Binaries
17 | 3. import `
18 | 4. code for demo
19 | ```
20 | ToastWindowController *toastWindow=[ToastWindowController getToastWindow];
21 | toastWindow.animater=CTAnimaterFade;
22 | toastWindow.animaterTimeSecond=2;
23 | toastWindow.autoDismiss=NO;
24 | toastWindow.toastPostion=CTPositionCenter;
25 | toastWindow.maxWidth=250;
26 | toastWindow.delegate=self;
27 | [toastWindow showCoolToast:@"Animater Face\n Just do it."];
28 | ```
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | Params
38 | ### toastPostion default: CTPositionTop|CTPositionLeft
39 | CTPositionMouse
40 | CTPositionCenter
41 | CTPositionLeft
42 | CTPositionTop
43 | CTPositionRight
44 | CTPositionBottom
45 | CTPositionOnMainWindow(not support yet)
46 | CTPositionAllWindow(not support yet)
47 | ### animater default: CTAnimaterFade
48 | CTAnimaterFade
49 | CTAnimaterScale
50 | CTAnimaterTranslateFromLeft
51 | CTAnimaterTranslateFromTop
52 | CTAnimaterTranslateFromRight
53 | CTAnimaterTranslateFromBottom
54 | CTAnimaterNone
55 |
56 |
57 | ### Position of margin to screen, not work for CTPositionCenter and CTPositionMouse
58 | leftOffset
59 | topOffset
60 | rightOffset
61 | bottomOffset
62 |
63 | ### autoDismiss and autoDismissTimeInSecond default :YES
64 | indicate the toast will auto dismiss and auto dismiss time
65 |
66 | ### backgroundColor default : [NSColor clearColor]
67 | Toast Color
68 |
69 | ### toastBackgroundColor
70 | Toast background color
71 |
72 | ### hiddenIcon default:NO
73 | Show or hide application icon
74 |
75 | ### iconImage
76 | the icon image, if iconImage is nil then will default display Application's icon
77 |
78 | ### Delegate for Toast
79 | ```
80 | -(void)onCoolToastDismiss:(id)toastWindow;
81 | -(void)onCoolToastClick:(id)toastWindow;
82 | ```
83 | #
84 | SourceCode:[CoolToast](https://github.com/socoolby/CoolToast)
85 | Email:[socoolby@gmail.com](mailto:socoolby@gmail.com)
86 |
--------------------------------------------------------------------------------
/CoolToast.xcodeproj/xcshareddata/xcschemes/CoolToast.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
65 |
71 |
72 |
73 |
74 |
75 |
76 |
82 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/TestCoolToast/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // TestCoolToast
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @implementation ViewController
12 |
13 | - (void)viewDidLoad {
14 | [super viewDidLoad];
15 | NSAppearance *apprance=[NSAppearance currentAppearance];
16 | if([apprance.name isEqualToString:NSAppearanceNameDarkAqua])
17 | NSLog(@"night Mode");
18 | else if([apprance.name isEqualToString:NSAppearanceNameAqua])
19 | NSLog(@"light Mode");
20 |
21 | // Do any additional setup after loading the view.
22 | }
23 | - (void)onCoolToastDismiss:(id)toastWindow{
24 | NSLog(@"dismiss");
25 | }
26 | - (void)onCoolToastClick:(id)toastWindow
27 | {
28 | NSLog(@"onCoolToastClick");
29 | }
30 | -(IBAction)testToast:(id)sender{
31 | self.toastWindow=[ToastWindowController getToastWindow];
32 | [self.toastWindow showCoolToast:@"test messsage"];
33 | }
34 | -(IBAction)testToastWithAnimaterFade:(id)sender{
35 | ToastWindowController *toastWindow=[ToastWindowController getToastWindow];
36 | toastWindow.animater=CTAnimaterFade;
37 | toastWindow.animaterTimeSecond=2;
38 | toastWindow.autoDismiss=NO;
39 | toastWindow.toastPostion=CTPositionCenter;
40 | toastWindow.maxWidth=250;
41 | toastWindow.delegate=self;
42 | [toastWindow showCoolToast:@"Animater Face\n Just do it."];
43 | }
44 |
45 | -(IBAction)testToastWithAnimaterScale:(id)sender{
46 | ToastWindowController *toastWindow=[ToastWindowController getToastWindow];
47 | toastWindow.animater=CTAnimaterScale;
48 | toastWindow.backgroundColor=[NSColor colorWithRed:0 green:0 blue:0 alpha:0.3];
49 | toastWindow.autoDismissTimeInSecond=2;
50 | toastWindow.hiddenIcon=YES;
51 | [toastWindow showCoolToast:@"Animater Scale with long long long long long logn long long long long long long logn long long text"];
52 | toastWindow.messageLabel.alignment=NSTextAlignmentLeft;//must set after showCoolText
53 | }
54 | -(IBAction)testToastWithAnimaterFromLeft:(id)sender{
55 | self.toastWindow=[ToastWindowController getToastWindow];
56 | self.toastWindow.animater=CTAnimaterTranslateFromLeft;
57 | self.toastWindow.autoDismissTimeInSecond=2;
58 | self.toastWindow.toastPostion=CTPositionLeft|CTPositionTop;
59 | [self.toastWindow showCoolToast:@"Left"];
60 | }
61 | -(IBAction)testToastWithAnimaterFromTop:(id)sender{
62 | self.toastWindow=[ToastWindowController getToastWindow];
63 | self.toastWindow.animater=CTAnimaterTranslateFromTop;
64 | self.toastWindow.autoDismissTimeInSecond=2;
65 | self.toastWindow.toastPostion=CTPositionLeft|CTPositionTop;
66 | self.toastWindow.imageMarginLeft=15;
67 | [self.toastWindow showCoolToast:@"Animater From Top flip down and the text is long long long long"];
68 | }
69 | -(IBAction)testToastWithAnimaterFromRight:(id)sender{
70 | self.toastWindow=[ToastWindowController getToastWindow];
71 | self.toastWindow.animater=CTAnimaterTranslateFromRight;
72 | self.toastWindow.autoDismissTimeInSecond=2;
73 | self.toastWindow.toastPostion=CTPositionRight|CTPositionTop;
74 | [self.toastWindow showCoolToast:@"Animater From Right"];
75 | }
76 | -(IBAction)testToastWithAnimaterFromBottom:(id)sender{
77 | self.toastWindow=[ToastWindowController getToastWindow];
78 | self.toastWindow.animater=CTAnimaterTranslateFromBottom;
79 | self.toastWindow.autoDismissTimeInSecond=2;
80 | self.toastWindow.toastPostion=CTPositionLeft|CTPositionBottom;
81 | [self.toastWindow showCoolToast:@"Animater From Bottom"];
82 | }
83 | - (IBAction)testToasPositionMouse:(id)sender {
84 | ToastWindowController *toastWindow=[ToastWindowController getToastWindow];
85 | toastWindow.animater=CTAnimaterFade;
86 | toastWindow.animaterTimeSecond=2;
87 | toastWindow.toastPostion=CTPositionMouse;
88 | toastWindow.maxWidth=250;
89 | toastWindow.delegate=self;
90 | [toastWindow showCoolToast:@"Animater Face\n Just do it."];
91 | }
92 | - (void)setRepresentedObject:(id)representedObject {
93 | [super setRepresentedObject:representedObject];
94 | // Update the view, if already loaded.
95 | }
96 |
97 |
98 | @end
99 |
--------------------------------------------------------------------------------
/CoolToast/ToastWindowController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/CoolToast/ToastWindowController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ToastWindowController.m
3 | // CoolToast
4 | //
5 | // Created by Socoolby on 2019/6/28.
6 | // Copyright © 2019 Socoolby. All rights reserved.
7 | //
8 |
9 | #import "ToastWindowController.h"
10 | #import "CTScreen.h"
11 | #import
12 | #import "CTCommon.h"
13 | static NSMutableArray *toastWindows;
14 | @interface ToastWindowController ()
15 | @property (weak) IBOutlet NSTextField *messageTextField;
16 | @property (weak) IBOutlet NSImageView *iconImageView;
17 | @property (weak) IBOutlet NSLayoutConstraint *messageLabelLeadingConstraint;
18 | @property (weak) IBOutlet NSLayoutConstraint *containerViewWidthConstraint;
19 | @property (weak) IBOutlet NSLayoutConstraint *containerViewHeightConstraint;
20 | @property (weak) IBOutlet NSLayoutConstraint *containerViewLeadingConstraint;
21 | @property (weak) IBOutlet NSLayoutConstraint *containerTopConstraint;
22 | @property (weak) IBOutlet NSLayoutConstraint *messageTextFieldTrailingConstraint;
23 | @property (weak) IBOutlet NSLayoutConstraint *messageTextFieldLeadingConstraint;
24 | @property (weak) IBOutlet NSLayoutConstraint *iconImageLeadingConstraint;
25 | @end
26 |
27 | @implementation ToastWindowController
28 | - (instancetype)initWithWindowNibName:(NSNibName)windowNibName{
29 | self=[super initWithWindowNibName:windowNibName];
30 | if(self){
31 | _leftOffset = 50;
32 | _topOffset = 50;
33 | _rightOffset = 50;
34 | _bottomOffset = 50;
35 |
36 | _maxWidth = 826;
37 | _minWidth = 320;
38 | _minHeight = 80;
39 | _toastPostion = CTPositionTop|CTPositionLeft;
40 | _backgroundColor = [NSColor clearColor];
41 | _imageMarginLeft=15;
42 |
43 | _conerRadius = 6;
44 | _autoDismiss = YES;
45 | _autoDismissTimeInSecond = 5;
46 | _animater=CTAnimaterFade;
47 | _animaterTimeSecond = 0.5;
48 | _textFont = [NSFont systemFontOfSize:15];
49 | }
50 | return self;
51 | }
52 |
53 | - (void)windowDidLoad {
54 | [super windowDidLoad];
55 | }
56 |
57 | +(id)getToastWindow{
58 | if(toastWindows == nil)
59 | toastWindows = [NSMutableArray new];
60 | ToastWindowController *toastWindow=[[ToastWindowController alloc] initWithWindowNibName:@"ToastWindowController"];
61 | [toastWindows addObject:toastWindow];
62 | return toastWindow;
63 | }
64 | -(NSPoint)getContainerPointWithWidth:(NSUInteger)width height:(NSUInteger)height currentScreen:(NSScreen*)currentScreen{
65 |
66 | NSInteger x=0;
67 | NSInteger y=0;
68 | NSRect mainScreenFrame=[CTScreen frameForScreen:currentScreen];
69 | if(self.toastPostion==CTPositionCenter){
70 | y=(mainScreenFrame.size.height-height)/2;
71 | x=(mainScreenFrame.size.width-width)/2;
72 | return NSMakePoint(x, y);
73 | }
74 | if((self.toastPostion&CTPositionLeft)==CTPositionLeft){
75 | x=self.leftOffset;
76 | }else if((self.toastPostion&CTPositionRight)==CTPositionRight){
77 | x=mainScreenFrame.size.width-self.rightOffset-width;
78 | }
79 | if((self.toastPostion&CTPositionTop)==CTPositionTop){
80 | y=self.topOffset;
81 | }else if((self.toastPostion&CTPositionBottom)==CTPositionBottom){
82 | y=mainScreenFrame.size.height-self.bottomOffset-height;
83 | }
84 | if(self.toastPostion==CTPositionMouse){
85 | NSPoint mousePoint=[self.window mouseLocationOutsideOfEventStream];
86 | x=mousePoint.x;
87 | y=mainScreenFrame.size.height-mousePoint.y;
88 | if(x+width>mainScreenFrame.size.width)
89 | x=x-width;
90 | if(y+height>mainScreenFrame.size.height)
91 | y=y-height;
92 | if(y<0)
93 | y=0;
94 | if(x<0)
95 | x=0;
96 | }
97 | return NSMakePoint(x, y);
98 | }
99 | - (void)animationDidEnd:(NSAnimation *)animation{
100 |
101 | }
102 | - (IBAction)onContainerDoubleClick:(id)sender {
103 | if(!self.autoDismiss)
104 | [self dismissWithAnimator];
105 | if(self.delegate!=nil)
106 | [self.delegate onCoolToastClick:self];
107 | }
108 | -(void)showCoolToast:(NSString*)message{
109 | [self.window setBackgroundColor:self.backgroundColor];
110 | NSScreen *focusedScreen=[CTScreen getCurrentScreen];
111 | [self.window setLevel:NSPopUpMenuWindowLevel];
112 | self.messageLabel.stringValue=message;
113 | self.containerView.wantsLayer=YES;
114 | self.iconImageLeadingConstraint.constant=_imageMarginLeft;
115 | NSClickGestureRecognizer *tap=[[NSClickGestureRecognizer alloc] initWithTarget:self action:@selector(onContainerDoubleClick:)];
116 | tap.numberOfClicksRequired=2;
117 | [self.containerView addGestureRecognizer:tap];
118 |
119 | self.containerView.layer.cornerRadius=self.conerRadius;
120 | if(self.textColor==nil)
121 | self.messageLabel.textColor=[NSColor colorNamed:@"messageTextColor" bundle:CTBundle()];
122 | else
123 | self.messageLabel.textColor=self.textColor;
124 | if(self.toastBackgroundColor==nil)
125 | self.containerView.layer.backgroundColor=[NSColor colorNamed:@"conainerBackgroundColor" bundle:CTBundle()].CGColor;
126 | else
127 | {
128 | self.containerView.layer.backgroundColor=self.toastBackgroundColor.CGColor;
129 | }
130 |
131 | [self.window setContentSize:NSMakeSize(focusedScreen.visibleFrame.size.width,focusedScreen.frame.size.height)];
132 | [self.window setFrameOrigin:NSMakePoint(focusedScreen.visibleFrame.origin.x,focusedScreen.visibleFrame.origin.y)];
133 | [self.messageLabel setFont:self.textFont];
134 | int labelMargin=30;
135 | if(self.hiddenIcon)
136 | self.iconImageView.hidden=YES;
137 | else
138 | {
139 | self.messageLabelLeadingConstraint.constant=self.iconImageView.frame.size.width+_imageMarginLeft;
140 | if(self.iconImage==nil)
141 | self.iconImageCell.image= [NSApplication sharedApplication].applicationIconImage;
142 | else
143 | self.iconImageCell.image= self.iconImage;
144 | }
145 | [self.containerView needsLayout];
146 | NSInteger iconWidth=self.iconImageView.frame.size.width;
147 | NSInteger labelMaxWidth=self.maxWidth-labelMargin*2-(self.hiddenIcon?0:iconWidth+_imageMarginLeft);
148 | NSInteger labelWidth=[CTCommon calculateFont:message withFont:self.messageLabel.font].width;
149 | int lineCount=[CTCommon lineCountForText:message font:self.messageLabel.font withinWidth:labelMaxWidth];
150 | int labelHeight=_minHeight;
151 | if(lineCount>2){
152 | labelHeight=_minHeight+(lineCount-2)*self.messageLabel.font.boundingRectForFont.size.height;
153 | labelWidth=labelMaxWidth;
154 | }
155 | NSInteger windowWidth=labelWidth+iconWidth+labelMargin*2+_imageMarginLeft;
156 | if(windowWidth<_minWidth)
157 | windowWidth=_minWidth;
158 | NSPoint windowPoint=[self getContainerPointWithWidth:windowWidth height:labelHeight currentScreen:focusedScreen];
159 |
160 | self.containerViewWidthConstraint.constant=windowWidth;
161 | self.containerViewHeightConstraint.constant=labelHeight;
162 | self.containerViewLeadingConstraint.constant=windowPoint.x;
163 | self.messageTextFieldLeadingConstraint.constant=windowWidth-labelWidth-labelWidth-(self.hiddenIcon?0:_imageMarginLeft*2+self.iconImageView.frame.size.width);
164 | self.messageLabelLeadingConstraint.constant=labelMargin;
165 | self.containerTopConstraint.constant=windowPoint.y;
166 | [self.window makeKeyAndOrderFront:nil];
167 | if(self.autoDismiss)
168 | {
169 | [CTCommon delayToRunWithSecond:self.autoDismissTimeInSecond Block:^{
170 | [self dismissWithAnimator];
171 | }];
172 | }
173 | [self showWithAnimator];
174 | }
175 | -(void)showWithAnimator{
176 | if(self.animater==CTAnimaterNone)
177 | return;
178 | if(self.animater==CTAnimaterFade){
179 | [self.containerView setAlphaValue:0.0];
180 | [NSAnimationContext runAnimationGroup:^(NSAnimationContext * _Nonnull context) {
181 | [[NSAnimationContext currentContext] setDuration:self.animaterTimeSecond];
182 | [[self.containerView animator] setAlphaValue:1.0];
183 | } completionHandler:^{
184 | }];
185 | return;
186 | }else if(self.animater==CTAnimaterScale)
187 | {
188 | NSRect originFrame=self.containerView.frame;
189 | int width=self.containerViewWidthConstraint.constant;
190 | int height=self.containerViewHeightConstraint.constant;
191 | self.containerViewWidthConstraint.constant=0;
192 | self.containerViewHeightConstraint.constant=0;
193 | self.containerView.frame=NSMakeRect(originFrame.origin.x+originFrame.size.width/2, originFrame.origin.y+originFrame.size.height/2, 0, 0);
194 | [NSAnimationContext runAnimationGroup:^(NSAnimationContext * _Nonnull context) {
195 | [[NSAnimationContext currentContext] setDuration:self.animaterTimeSecond];
196 | [[self.containerViewHeightConstraint animator] setConstant:height];
197 | [[self.containerViewWidthConstraint animator] setConstant:width];
198 | [[self.containerView animator] setFrame:originFrame];
199 |
200 | } completionHandler:^{
201 | }];
202 | return;
203 | }
204 | NSRect originFrame=self.containerView.frame;
205 | NSRect transimiteFrame=self.containerView.frame;
206 | if(self.animater==CTAnimaterTranslateFromLeft){
207 | transimiteFrame=NSMakeRect(0-originFrame.size.width, originFrame.origin.y, originFrame.size.width, originFrame.size.height);
208 | }else if(self.animater==CTAnimaterTranslateFromTop)
209 | transimiteFrame=NSMakeRect(originFrame.origin.x, self.window.frame.size.height+originFrame.size.height, originFrame.size.width, originFrame.size.height);
210 | else if(self.animater==CTAnimaterTranslateFromRight)
211 | transimiteFrame=NSMakeRect(self.window.frame.size.width+originFrame.size.width, originFrame.origin.y, originFrame.size.width, originFrame.size.height);
212 | else if(self.animater==CTAnimaterTranslateFromBottom)
213 | transimiteFrame=NSMakeRect(originFrame.origin.x, 0-originFrame.size.height, originFrame.size.width, originFrame.size.height);
214 |
215 | self.containerView.frame=transimiteFrame;
216 | [NSAnimationContext runAnimationGroup:^(NSAnimationContext * _Nonnull context) {
217 | [[NSAnimationContext currentContext] setDuration:self.animaterTimeSecond];
218 | [[self.containerView animator] setFrame:originFrame];
219 | } completionHandler:^{
220 | }];
221 |
222 | }
223 | -(void)dismiss{
224 | [self.window close];
225 | if(self.delegate!=nil)
226 | [self.delegate onCoolToastDismiss:self];
227 | [toastWindows removeObject:self];
228 |
229 | }
230 | -(void)dismissWithAnimator{
231 | if(self.animater==CTAnimaterNone)
232 | {
233 | [self dismiss];
234 | return;
235 | }
236 | if(self.animater==CTAnimaterFade){
237 | [NSAnimationContext runAnimationGroup:^(NSAnimationContext * _Nonnull context) {
238 | [[NSAnimationContext currentContext] setDuration:self.animaterTimeSecond];
239 | [[self.containerView animator] setAlphaValue:0.0];
240 | } completionHandler:^{
241 | [self dismiss];
242 | }];
243 | return;
244 | }else if(self.animater==CTAnimaterScale){
245 | [NSAnimationContext runAnimationGroup:^(NSAnimationContext * _Nonnull context) {
246 | [[NSAnimationContext currentContext] setDuration:self.animaterTimeSecond];
247 | [[self.containerViewHeightConstraint animator] setConstant:0];
248 | [[self.containerViewWidthConstraint animator] setConstant:0];
249 | } completionHandler:^{
250 | [self dismiss];
251 | }];
252 | return;
253 | }
254 | NSRect originFrame=self.containerView.frame;
255 | NSRect transimiteFrame=self.containerView.frame;
256 | if(self.animater==CTAnimaterTranslateFromLeft){
257 | transimiteFrame=NSMakeRect(0-originFrame.size.width, originFrame.origin.y, originFrame.size.width, originFrame.size.height);
258 | }else if(self.animater==CTAnimaterTranslateFromTop)
259 | transimiteFrame=NSMakeRect(originFrame.origin.x, self.window.frame.size.height+originFrame.size.height, originFrame.size.width, originFrame.size.height);
260 | else if(self.animater==CTAnimaterTranslateFromRight)
261 | transimiteFrame=NSMakeRect(self.window.frame.size.width+originFrame.size.width, originFrame.origin.y, originFrame.size.width, originFrame.size.height);
262 | else if(self.animater==CTAnimaterTranslateFromBottom)
263 | transimiteFrame=NSMakeRect(originFrame.origin.x, 0-originFrame.size.height, originFrame.size.width, originFrame.size.height);
264 |
265 | [NSAnimationContext runAnimationGroup:^(NSAnimationContext * _Nonnull context) {
266 | [[NSAnimationContext currentContext] setDuration:self.animaterTimeSecond];
267 | [[self.containerView animator] setFrame:transimiteFrame];
268 | } completionHandler:^{
269 | [self dismiss];
270 | }];
271 | }
272 |
273 | @end
274 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/CoolToast.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | AA13CBD822CC804000AD1287 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA13CBD722CC804000AD1287 /* QuartzCore.framework */; };
11 | AA13CBDA22CDAD3D00AD1287 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AA13CBD922CDAD3D00AD1287 /* Assets.xcassets */; };
12 | AA61CBD222CFA31800AAD118 /* CTView.h in Headers */ = {isa = PBXBuildFile; fileRef = AA61CBD022CFA31800AAD118 /* CTView.h */; };
13 | AA61CBD322CFA31800AAD118 /* CTView.m in Sources */ = {isa = PBXBuildFile; fileRef = AA61CBD122CFA31800AAD118 /* CTView.m */; };
14 | AAE80BAF22C64F11009C794F /* CoolToast.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAE80BA522C64F11009C794F /* CoolToast.framework */; };
15 | AAE80BB422C64F11009C794F /* CoolToastTests.m in Sources */ = {isa = PBXBuildFile; fileRef = AAE80BB322C64F11009C794F /* CoolToastTests.m */; };
16 | AAE80BB622C64F11009C794F /* CoolToast.h in Headers */ = {isa = PBXBuildFile; fileRef = AAE80BA822C64F11009C794F /* CoolToast.h */; settings = {ATTRIBUTES = (Public, ); }; };
17 | AAE80BC722C65000009C794F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AAE80BC622C65000009C794F /* AppDelegate.m */; };
18 | AAE80BCA22C65000009C794F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AAE80BC922C65000009C794F /* ViewController.m */; };
19 | AAE80BCC22C65002009C794F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AAE80BCB22C65002009C794F /* Assets.xcassets */; };
20 | AAE80BCF22C65002009C794F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AAE80BCD22C65002009C794F /* Main.storyboard */; };
21 | AAE80BD222C65002009C794F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AAE80BD122C65002009C794F /* main.m */; };
22 | AAE80BDD22C65003009C794F /* TestCoolToastTests.m in Sources */ = {isa = PBXBuildFile; fileRef = AAE80BDC22C65003009C794F /* TestCoolToastTests.m */; };
23 | AAE80BE822C65003009C794F /* TestCoolToastUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = AAE80BE722C65003009C794F /* TestCoolToastUITests.m */; };
24 | AAE80BF922C6525B009C794F /* CTCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = AAE80BF722C6525B009C794F /* CTCommon.h */; settings = {ATTRIBUTES = (Public, ); }; };
25 | AAE80BFA22C6525B009C794F /* CTCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = AAE80BF822C6525B009C794F /* CTCommon.m */; };
26 | AAE80BFE22C653F0009C794F /* ToastWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = AAE80BFB22C653F0009C794F /* ToastWindowController.h */; settings = {ATTRIBUTES = (Public, ); }; };
27 | AAE80BFF22C653F0009C794F /* ToastWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = AAE80BFC22C653F0009C794F /* ToastWindowController.m */; };
28 | AAE80C0022C653F0009C794F /* ToastWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AAE80BFD22C653F0009C794F /* ToastWindowController.xib */; };
29 | AAE80C0822C65C66009C794F /* CoolToast.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAE80BA522C64F11009C794F /* CoolToast.framework */; };
30 | AAE80C0922C65C66009C794F /* CoolToast.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = AAE80BA522C64F11009C794F /* CoolToast.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
31 | AAFF531A22C9A978004A683D /* CTScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = AAFF531822C9A978004A683D /* CTScreen.h */; };
32 | AAFF531B22C9A978004A683D /* CTScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = AAFF531922C9A978004A683D /* CTScreen.m */; };
33 | /* End PBXBuildFile section */
34 |
35 | /* Begin PBXContainerItemProxy section */
36 | AAE80BB022C64F11009C794F /* PBXContainerItemProxy */ = {
37 | isa = PBXContainerItemProxy;
38 | containerPortal = AAE80B9C22C64F11009C794F /* Project object */;
39 | proxyType = 1;
40 | remoteGlobalIDString = AAE80BA422C64F11009C794F;
41 | remoteInfo = CoolToast;
42 | };
43 | AAE80BD922C65003009C794F /* PBXContainerItemProxy */ = {
44 | isa = PBXContainerItemProxy;
45 | containerPortal = AAE80B9C22C64F11009C794F /* Project object */;
46 | proxyType = 1;
47 | remoteGlobalIDString = AAE80BC222C65000009C794F;
48 | remoteInfo = TestCoolToast;
49 | };
50 | AAE80BE422C65003009C794F /* PBXContainerItemProxy */ = {
51 | isa = PBXContainerItemProxy;
52 | containerPortal = AAE80B9C22C64F11009C794F /* Project object */;
53 | proxyType = 1;
54 | remoteGlobalIDString = AAE80BC222C65000009C794F;
55 | remoteInfo = TestCoolToast;
56 | };
57 | AAE80C0A22C65C66009C794F /* PBXContainerItemProxy */ = {
58 | isa = PBXContainerItemProxy;
59 | containerPortal = AAE80B9C22C64F11009C794F /* Project object */;
60 | proxyType = 1;
61 | remoteGlobalIDString = AAE80BA422C64F11009C794F;
62 | remoteInfo = CoolToast;
63 | };
64 | /* End PBXContainerItemProxy section */
65 |
66 | /* Begin PBXCopyFilesBuildPhase section */
67 | AAE80C0C22C65C66009C794F /* Embed Frameworks */ = {
68 | isa = PBXCopyFilesBuildPhase;
69 | buildActionMask = 2147483647;
70 | dstPath = "";
71 | dstSubfolderSpec = 10;
72 | files = (
73 | AAE80C0922C65C66009C794F /* CoolToast.framework in Embed Frameworks */,
74 | );
75 | name = "Embed Frameworks";
76 | runOnlyForDeploymentPostprocessing = 0;
77 | };
78 | /* End PBXCopyFilesBuildPhase section */
79 |
80 | /* Begin PBXFileReference section */
81 | AA13CBD722CC804000AD1287 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
82 | AA13CBD922CDAD3D00AD1287 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
83 | AA61CBD022CFA31800AAD118 /* CTView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTView.h; sourceTree = ""; };
84 | AA61CBD122CFA31800AAD118 /* CTView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTView.m; sourceTree = ""; };
85 | AAE80BA522C64F11009C794F /* CoolToast.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CoolToast.framework; sourceTree = BUILT_PRODUCTS_DIR; };
86 | AAE80BA822C64F11009C794F /* CoolToast.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoolToast.h; sourceTree = ""; };
87 | AAE80BA922C64F11009C794F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
88 | AAE80BAE22C64F11009C794F /* CoolToastTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CoolToastTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
89 | AAE80BB322C64F11009C794F /* CoolToastTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CoolToastTests.m; sourceTree = ""; };
90 | AAE80BB522C64F11009C794F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
91 | AAE80BC322C65000009C794F /* TestCoolToast.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestCoolToast.app; sourceTree = BUILT_PRODUCTS_DIR; };
92 | AAE80BC522C65000009C794F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
93 | AAE80BC622C65000009C794F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
94 | AAE80BC822C65000009C794F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
95 | AAE80BC922C65000009C794F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
96 | AAE80BCB22C65002009C794F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97 | AAE80BCE22C65002009C794F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
98 | AAE80BD022C65002009C794F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
99 | AAE80BD122C65002009C794F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
100 | AAE80BD322C65002009C794F /* TestCoolToast.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TestCoolToast.entitlements; sourceTree = ""; };
101 | AAE80BD822C65003009C794F /* TestCoolToastTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestCoolToastTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
102 | AAE80BDC22C65003009C794F /* TestCoolToastTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestCoolToastTests.m; sourceTree = ""; };
103 | AAE80BDE22C65003009C794F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
104 | AAE80BE322C65003009C794F /* TestCoolToastUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestCoolToastUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
105 | AAE80BE722C65003009C794F /* TestCoolToastUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestCoolToastUITests.m; sourceTree = ""; };
106 | AAE80BE922C65003009C794F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
107 | AAE80BF722C6525B009C794F /* CTCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTCommon.h; sourceTree = ""; };
108 | AAE80BF822C6525B009C794F /* CTCommon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTCommon.m; sourceTree = ""; };
109 | AAE80BFB22C653F0009C794F /* ToastWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ToastWindowController.h; sourceTree = ""; };
110 | AAE80BFC22C653F0009C794F /* ToastWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ToastWindowController.m; sourceTree = ""; };
111 | AAE80BFD22C653F0009C794F /* ToastWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ToastWindowController.xib; sourceTree = ""; };
112 | AAFF531822C9A978004A683D /* CTScreen.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTScreen.h; sourceTree = ""; };
113 | AAFF531922C9A978004A683D /* CTScreen.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTScreen.m; sourceTree = ""; };
114 | /* End PBXFileReference section */
115 |
116 | /* Begin PBXFrameworksBuildPhase section */
117 | AAE80BA222C64F11009C794F /* Frameworks */ = {
118 | isa = PBXFrameworksBuildPhase;
119 | buildActionMask = 2147483647;
120 | files = (
121 | );
122 | runOnlyForDeploymentPostprocessing = 0;
123 | };
124 | AAE80BAB22C64F11009C794F /* Frameworks */ = {
125 | isa = PBXFrameworksBuildPhase;
126 | buildActionMask = 2147483647;
127 | files = (
128 | AAE80BAF22C64F11009C794F /* CoolToast.framework in Frameworks */,
129 | );
130 | runOnlyForDeploymentPostprocessing = 0;
131 | };
132 | AAE80BC022C65000009C794F /* Frameworks */ = {
133 | isa = PBXFrameworksBuildPhase;
134 | buildActionMask = 2147483647;
135 | files = (
136 | AA13CBD822CC804000AD1287 /* QuartzCore.framework in Frameworks */,
137 | AAE80C0822C65C66009C794F /* CoolToast.framework in Frameworks */,
138 | );
139 | runOnlyForDeploymentPostprocessing = 0;
140 | };
141 | AAE80BD522C65003009C794F /* Frameworks */ = {
142 | isa = PBXFrameworksBuildPhase;
143 | buildActionMask = 2147483647;
144 | files = (
145 | );
146 | runOnlyForDeploymentPostprocessing = 0;
147 | };
148 | AAE80BE022C65003009C794F /* Frameworks */ = {
149 | isa = PBXFrameworksBuildPhase;
150 | buildActionMask = 2147483647;
151 | files = (
152 | );
153 | runOnlyForDeploymentPostprocessing = 0;
154 | };
155 | /* End PBXFrameworksBuildPhase section */
156 |
157 | /* Begin PBXGroup section */
158 | AAE80B9B22C64F11009C794F = {
159 | isa = PBXGroup;
160 | children = (
161 | AA13CBD922CDAD3D00AD1287 /* Assets.xcassets */,
162 | AAE80BA722C64F11009C794F /* CoolToast */,
163 | AAE80BB222C64F11009C794F /* CoolToastTests */,
164 | AAE80BC422C65000009C794F /* TestCoolToast */,
165 | AAE80BDB22C65003009C794F /* TestCoolToastTests */,
166 | AAE80BE622C65003009C794F /* TestCoolToastUITests */,
167 | AAE80BA622C64F11009C794F /* Products */,
168 | AAE80C0122C65C44009C794F /* Frameworks */,
169 | );
170 | sourceTree = "";
171 | };
172 | AAE80BA622C64F11009C794F /* Products */ = {
173 | isa = PBXGroup;
174 | children = (
175 | AAE80BA522C64F11009C794F /* CoolToast.framework */,
176 | AAE80BAE22C64F11009C794F /* CoolToastTests.xctest */,
177 | AAE80BC322C65000009C794F /* TestCoolToast.app */,
178 | AAE80BD822C65003009C794F /* TestCoolToastTests.xctest */,
179 | AAE80BE322C65003009C794F /* TestCoolToastUITests.xctest */,
180 | );
181 | name = Products;
182 | sourceTree = "";
183 | };
184 | AAE80BA722C64F11009C794F /* CoolToast */ = {
185 | isa = PBXGroup;
186 | children = (
187 | AAE80BA822C64F11009C794F /* CoolToast.h */,
188 | AAE80BF722C6525B009C794F /* CTCommon.h */,
189 | AAE80BF822C6525B009C794F /* CTCommon.m */,
190 | AAE80BFB22C653F0009C794F /* ToastWindowController.h */,
191 | AAE80BFC22C653F0009C794F /* ToastWindowController.m */,
192 | AAE80BFD22C653F0009C794F /* ToastWindowController.xib */,
193 | AAE80BA922C64F11009C794F /* Info.plist */,
194 | AAFF531822C9A978004A683D /* CTScreen.h */,
195 | AAFF531922C9A978004A683D /* CTScreen.m */,
196 | AA61CBD022CFA31800AAD118 /* CTView.h */,
197 | AA61CBD122CFA31800AAD118 /* CTView.m */,
198 | );
199 | path = CoolToast;
200 | sourceTree = "";
201 | };
202 | AAE80BB222C64F11009C794F /* CoolToastTests */ = {
203 | isa = PBXGroup;
204 | children = (
205 | AAE80BB322C64F11009C794F /* CoolToastTests.m */,
206 | AAE80BB522C64F11009C794F /* Info.plist */,
207 | );
208 | path = CoolToastTests;
209 | sourceTree = "";
210 | };
211 | AAE80BC422C65000009C794F /* TestCoolToast */ = {
212 | isa = PBXGroup;
213 | children = (
214 | AAE80BC522C65000009C794F /* AppDelegate.h */,
215 | AAE80BC622C65000009C794F /* AppDelegate.m */,
216 | AAE80BC822C65000009C794F /* ViewController.h */,
217 | AAE80BC922C65000009C794F /* ViewController.m */,
218 | AAE80BCB22C65002009C794F /* Assets.xcassets */,
219 | AAE80BCD22C65002009C794F /* Main.storyboard */,
220 | AAE80BD022C65002009C794F /* Info.plist */,
221 | AAE80BD122C65002009C794F /* main.m */,
222 | AAE80BD322C65002009C794F /* TestCoolToast.entitlements */,
223 | );
224 | path = TestCoolToast;
225 | sourceTree = "";
226 | };
227 | AAE80BDB22C65003009C794F /* TestCoolToastTests */ = {
228 | isa = PBXGroup;
229 | children = (
230 | AAE80BDC22C65003009C794F /* TestCoolToastTests.m */,
231 | AAE80BDE22C65003009C794F /* Info.plist */,
232 | );
233 | path = TestCoolToastTests;
234 | sourceTree = "";
235 | };
236 | AAE80BE622C65003009C794F /* TestCoolToastUITests */ = {
237 | isa = PBXGroup;
238 | children = (
239 | AAE80BE722C65003009C794F /* TestCoolToastUITests.m */,
240 | AAE80BE922C65003009C794F /* Info.plist */,
241 | );
242 | path = TestCoolToastUITests;
243 | sourceTree = "";
244 | };
245 | AAE80C0122C65C44009C794F /* Frameworks */ = {
246 | isa = PBXGroup;
247 | children = (
248 | AA13CBD722CC804000AD1287 /* QuartzCore.framework */,
249 | );
250 | name = Frameworks;
251 | sourceTree = "";
252 | };
253 | /* End PBXGroup section */
254 |
255 | /* Begin PBXHeadersBuildPhase section */
256 | AAE80BA022C64F11009C794F /* Headers */ = {
257 | isa = PBXHeadersBuildPhase;
258 | buildActionMask = 2147483647;
259 | files = (
260 | AAE80BF922C6525B009C794F /* CTCommon.h in Headers */,
261 | AAE80BFE22C653F0009C794F /* ToastWindowController.h in Headers */,
262 | AAE80BB622C64F11009C794F /* CoolToast.h in Headers */,
263 | AAFF531A22C9A978004A683D /* CTScreen.h in Headers */,
264 | AA61CBD222CFA31800AAD118 /* CTView.h in Headers */,
265 | );
266 | runOnlyForDeploymentPostprocessing = 0;
267 | };
268 | /* End PBXHeadersBuildPhase section */
269 |
270 | /* Begin PBXNativeTarget section */
271 | AAE80BA422C64F11009C794F /* CoolToast */ = {
272 | isa = PBXNativeTarget;
273 | buildConfigurationList = AAE80BB922C64F11009C794F /* Build configuration list for PBXNativeTarget "CoolToast" */;
274 | buildPhases = (
275 | AAE80BA022C64F11009C794F /* Headers */,
276 | AAE80BA122C64F11009C794F /* Sources */,
277 | AAE80BA222C64F11009C794F /* Frameworks */,
278 | AAE80BA322C64F11009C794F /* Resources */,
279 | );
280 | buildRules = (
281 | );
282 | dependencies = (
283 | );
284 | name = CoolToast;
285 | productName = CoolToast;
286 | productReference = AAE80BA522C64F11009C794F /* CoolToast.framework */;
287 | productType = "com.apple.product-type.framework";
288 | };
289 | AAE80BAD22C64F11009C794F /* CoolToastTests */ = {
290 | isa = PBXNativeTarget;
291 | buildConfigurationList = AAE80BBC22C64F11009C794F /* Build configuration list for PBXNativeTarget "CoolToastTests" */;
292 | buildPhases = (
293 | AAE80BAA22C64F11009C794F /* Sources */,
294 | AAE80BAB22C64F11009C794F /* Frameworks */,
295 | AAE80BAC22C64F11009C794F /* Resources */,
296 | );
297 | buildRules = (
298 | );
299 | dependencies = (
300 | AAE80BB122C64F11009C794F /* PBXTargetDependency */,
301 | );
302 | name = CoolToastTests;
303 | productName = CoolToastTests;
304 | productReference = AAE80BAE22C64F11009C794F /* CoolToastTests.xctest */;
305 | productType = "com.apple.product-type.bundle.unit-test";
306 | };
307 | AAE80BC222C65000009C794F /* TestCoolToast */ = {
308 | isa = PBXNativeTarget;
309 | buildConfigurationList = AAE80BEA22C65003009C794F /* Build configuration list for PBXNativeTarget "TestCoolToast" */;
310 | buildPhases = (
311 | AAE80BBF22C65000009C794F /* Sources */,
312 | AAE80BC022C65000009C794F /* Frameworks */,
313 | AAE80BC122C65000009C794F /* Resources */,
314 | AAE80C0C22C65C66009C794F /* Embed Frameworks */,
315 | );
316 | buildRules = (
317 | );
318 | dependencies = (
319 | AAE80C0B22C65C66009C794F /* PBXTargetDependency */,
320 | );
321 | name = TestCoolToast;
322 | productName = TestCoolToast;
323 | productReference = AAE80BC322C65000009C794F /* TestCoolToast.app */;
324 | productType = "com.apple.product-type.application";
325 | };
326 | AAE80BD722C65003009C794F /* TestCoolToastTests */ = {
327 | isa = PBXNativeTarget;
328 | buildConfigurationList = AAE80BED22C65003009C794F /* Build configuration list for PBXNativeTarget "TestCoolToastTests" */;
329 | buildPhases = (
330 | AAE80BD422C65003009C794F /* Sources */,
331 | AAE80BD522C65003009C794F /* Frameworks */,
332 | AAE80BD622C65003009C794F /* Resources */,
333 | );
334 | buildRules = (
335 | );
336 | dependencies = (
337 | AAE80BDA22C65003009C794F /* PBXTargetDependency */,
338 | );
339 | name = TestCoolToastTests;
340 | productName = TestCoolToastTests;
341 | productReference = AAE80BD822C65003009C794F /* TestCoolToastTests.xctest */;
342 | productType = "com.apple.product-type.bundle.unit-test";
343 | };
344 | AAE80BE222C65003009C794F /* TestCoolToastUITests */ = {
345 | isa = PBXNativeTarget;
346 | buildConfigurationList = AAE80BF022C65003009C794F /* Build configuration list for PBXNativeTarget "TestCoolToastUITests" */;
347 | buildPhases = (
348 | AAE80BDF22C65003009C794F /* Sources */,
349 | AAE80BE022C65003009C794F /* Frameworks */,
350 | AAE80BE122C65003009C794F /* Resources */,
351 | );
352 | buildRules = (
353 | );
354 | dependencies = (
355 | AAE80BE522C65003009C794F /* PBXTargetDependency */,
356 | );
357 | name = TestCoolToastUITests;
358 | productName = TestCoolToastUITests;
359 | productReference = AAE80BE322C65003009C794F /* TestCoolToastUITests.xctest */;
360 | productType = "com.apple.product-type.bundle.ui-testing";
361 | };
362 | /* End PBXNativeTarget section */
363 |
364 | /* Begin PBXProject section */
365 | AAE80B9C22C64F11009C794F /* Project object */ = {
366 | isa = PBXProject;
367 | attributes = {
368 | LastUpgradeCheck = 1020;
369 | ORGANIZATIONNAME = Socoolby;
370 | TargetAttributes = {
371 | AAE80BA422C64F11009C794F = {
372 | CreatedOnToolsVersion = 10.2.1;
373 | };
374 | AAE80BAD22C64F11009C794F = {
375 | CreatedOnToolsVersion = 10.2.1;
376 | };
377 | AAE80BC222C65000009C794F = {
378 | CreatedOnToolsVersion = 10.2.1;
379 | };
380 | AAE80BD722C65003009C794F = {
381 | CreatedOnToolsVersion = 10.2.1;
382 | TestTargetID = AAE80BC222C65000009C794F;
383 | };
384 | AAE80BE222C65003009C794F = {
385 | CreatedOnToolsVersion = 10.2.1;
386 | TestTargetID = AAE80BC222C65000009C794F;
387 | };
388 | };
389 | };
390 | buildConfigurationList = AAE80B9F22C64F11009C794F /* Build configuration list for PBXProject "CoolToast" */;
391 | compatibilityVersion = "Xcode 9.3";
392 | developmentRegion = en;
393 | hasScannedForEncodings = 0;
394 | knownRegions = (
395 | en,
396 | Base,
397 | );
398 | mainGroup = AAE80B9B22C64F11009C794F;
399 | productRefGroup = AAE80BA622C64F11009C794F /* Products */;
400 | projectDirPath = "";
401 | projectRoot = "";
402 | targets = (
403 | AAE80BA422C64F11009C794F /* CoolToast */,
404 | AAE80BAD22C64F11009C794F /* CoolToastTests */,
405 | AAE80BC222C65000009C794F /* TestCoolToast */,
406 | AAE80BD722C65003009C794F /* TestCoolToastTests */,
407 | AAE80BE222C65003009C794F /* TestCoolToastUITests */,
408 | );
409 | };
410 | /* End PBXProject section */
411 |
412 | /* Begin PBXResourcesBuildPhase section */
413 | AAE80BA322C64F11009C794F /* Resources */ = {
414 | isa = PBXResourcesBuildPhase;
415 | buildActionMask = 2147483647;
416 | files = (
417 | AA13CBDA22CDAD3D00AD1287 /* Assets.xcassets in Resources */,
418 | AAE80C0022C653F0009C794F /* ToastWindowController.xib in Resources */,
419 | );
420 | runOnlyForDeploymentPostprocessing = 0;
421 | };
422 | AAE80BAC22C64F11009C794F /* Resources */ = {
423 | isa = PBXResourcesBuildPhase;
424 | buildActionMask = 2147483647;
425 | files = (
426 | );
427 | runOnlyForDeploymentPostprocessing = 0;
428 | };
429 | AAE80BC122C65000009C794F /* Resources */ = {
430 | isa = PBXResourcesBuildPhase;
431 | buildActionMask = 2147483647;
432 | files = (
433 | AAE80BCC22C65002009C794F /* Assets.xcassets in Resources */,
434 | AAE80BCF22C65002009C794F /* Main.storyboard in Resources */,
435 | );
436 | runOnlyForDeploymentPostprocessing = 0;
437 | };
438 | AAE80BD622C65003009C794F /* Resources */ = {
439 | isa = PBXResourcesBuildPhase;
440 | buildActionMask = 2147483647;
441 | files = (
442 | );
443 | runOnlyForDeploymentPostprocessing = 0;
444 | };
445 | AAE80BE122C65003009C794F /* Resources */ = {
446 | isa = PBXResourcesBuildPhase;
447 | buildActionMask = 2147483647;
448 | files = (
449 | );
450 | runOnlyForDeploymentPostprocessing = 0;
451 | };
452 | /* End PBXResourcesBuildPhase section */
453 |
454 | /* Begin PBXSourcesBuildPhase section */
455 | AAE80BA122C64F11009C794F /* Sources */ = {
456 | isa = PBXSourcesBuildPhase;
457 | buildActionMask = 2147483647;
458 | files = (
459 | AAFF531B22C9A978004A683D /* CTScreen.m in Sources */,
460 | AA61CBD322CFA31800AAD118 /* CTView.m in Sources */,
461 | AAE80BFF22C653F0009C794F /* ToastWindowController.m in Sources */,
462 | AAE80BFA22C6525B009C794F /* CTCommon.m in Sources */,
463 | );
464 | runOnlyForDeploymentPostprocessing = 0;
465 | };
466 | AAE80BAA22C64F11009C794F /* Sources */ = {
467 | isa = PBXSourcesBuildPhase;
468 | buildActionMask = 2147483647;
469 | files = (
470 | AAE80BB422C64F11009C794F /* CoolToastTests.m in Sources */,
471 | );
472 | runOnlyForDeploymentPostprocessing = 0;
473 | };
474 | AAE80BBF22C65000009C794F /* Sources */ = {
475 | isa = PBXSourcesBuildPhase;
476 | buildActionMask = 2147483647;
477 | files = (
478 | AAE80BCA22C65000009C794F /* ViewController.m in Sources */,
479 | AAE80BD222C65002009C794F /* main.m in Sources */,
480 | AAE80BC722C65000009C794F /* AppDelegate.m in Sources */,
481 | );
482 | runOnlyForDeploymentPostprocessing = 0;
483 | };
484 | AAE80BD422C65003009C794F /* Sources */ = {
485 | isa = PBXSourcesBuildPhase;
486 | buildActionMask = 2147483647;
487 | files = (
488 | AAE80BDD22C65003009C794F /* TestCoolToastTests.m in Sources */,
489 | );
490 | runOnlyForDeploymentPostprocessing = 0;
491 | };
492 | AAE80BDF22C65003009C794F /* Sources */ = {
493 | isa = PBXSourcesBuildPhase;
494 | buildActionMask = 2147483647;
495 | files = (
496 | AAE80BE822C65003009C794F /* TestCoolToastUITests.m in Sources */,
497 | );
498 | runOnlyForDeploymentPostprocessing = 0;
499 | };
500 | /* End PBXSourcesBuildPhase section */
501 |
502 | /* Begin PBXTargetDependency section */
503 | AAE80BB122C64F11009C794F /* PBXTargetDependency */ = {
504 | isa = PBXTargetDependency;
505 | target = AAE80BA422C64F11009C794F /* CoolToast */;
506 | targetProxy = AAE80BB022C64F11009C794F /* PBXContainerItemProxy */;
507 | };
508 | AAE80BDA22C65003009C794F /* PBXTargetDependency */ = {
509 | isa = PBXTargetDependency;
510 | target = AAE80BC222C65000009C794F /* TestCoolToast */;
511 | targetProxy = AAE80BD922C65003009C794F /* PBXContainerItemProxy */;
512 | };
513 | AAE80BE522C65003009C794F /* PBXTargetDependency */ = {
514 | isa = PBXTargetDependency;
515 | target = AAE80BC222C65000009C794F /* TestCoolToast */;
516 | targetProxy = AAE80BE422C65003009C794F /* PBXContainerItemProxy */;
517 | };
518 | AAE80C0B22C65C66009C794F /* PBXTargetDependency */ = {
519 | isa = PBXTargetDependency;
520 | target = AAE80BA422C64F11009C794F /* CoolToast */;
521 | targetProxy = AAE80C0A22C65C66009C794F /* PBXContainerItemProxy */;
522 | };
523 | /* End PBXTargetDependency section */
524 |
525 | /* Begin PBXVariantGroup section */
526 | AAE80BCD22C65002009C794F /* Main.storyboard */ = {
527 | isa = PBXVariantGroup;
528 | children = (
529 | AAE80BCE22C65002009C794F /* Base */,
530 | );
531 | name = Main.storyboard;
532 | sourceTree = "";
533 | };
534 | /* End PBXVariantGroup section */
535 |
536 | /* Begin XCBuildConfiguration section */
537 | AAE80BB722C64F11009C794F /* Debug */ = {
538 | isa = XCBuildConfiguration;
539 | buildSettings = {
540 | ALWAYS_SEARCH_USER_PATHS = NO;
541 | CLANG_ANALYZER_NONNULL = YES;
542 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
543 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
544 | CLANG_CXX_LIBRARY = "libc++";
545 | CLANG_ENABLE_MODULES = YES;
546 | CLANG_ENABLE_OBJC_ARC = YES;
547 | CLANG_ENABLE_OBJC_WEAK = YES;
548 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
549 | CLANG_WARN_BOOL_CONVERSION = YES;
550 | CLANG_WARN_COMMA = YES;
551 | CLANG_WARN_CONSTANT_CONVERSION = YES;
552 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
553 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
554 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
555 | CLANG_WARN_EMPTY_BODY = YES;
556 | CLANG_WARN_ENUM_CONVERSION = YES;
557 | CLANG_WARN_INFINITE_RECURSION = YES;
558 | CLANG_WARN_INT_CONVERSION = YES;
559 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
560 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
561 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
562 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
563 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
564 | CLANG_WARN_STRICT_PROTOTYPES = YES;
565 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
566 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
567 | CLANG_WARN_UNREACHABLE_CODE = YES;
568 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
569 | CODE_SIGN_IDENTITY = "-";
570 | COPY_PHASE_STRIP = NO;
571 | CURRENT_PROJECT_VERSION = 1;
572 | DEBUG_INFORMATION_FORMAT = dwarf;
573 | ENABLE_STRICT_OBJC_MSGSEND = YES;
574 | ENABLE_TESTABILITY = YES;
575 | GCC_C_LANGUAGE_STANDARD = gnu11;
576 | GCC_DYNAMIC_NO_PIC = NO;
577 | GCC_NO_COMMON_BLOCKS = YES;
578 | GCC_OPTIMIZATION_LEVEL = 0;
579 | GCC_PREPROCESSOR_DEFINITIONS = (
580 | "DEBUG=1",
581 | "$(inherited)",
582 | );
583 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
584 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
585 | GCC_WARN_UNDECLARED_SELECTOR = YES;
586 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
587 | GCC_WARN_UNUSED_FUNCTION = YES;
588 | GCC_WARN_UNUSED_VARIABLE = YES;
589 | MACOSX_DEPLOYMENT_TARGET = 10.14;
590 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
591 | MTL_FAST_MATH = YES;
592 | ONLY_ACTIVE_ARCH = YES;
593 | SDKROOT = macosx;
594 | VERSIONING_SYSTEM = "apple-generic";
595 | VERSION_INFO_PREFIX = "";
596 | };
597 | name = Debug;
598 | };
599 | AAE80BB822C64F11009C794F /* Release */ = {
600 | isa = XCBuildConfiguration;
601 | buildSettings = {
602 | ALWAYS_SEARCH_USER_PATHS = NO;
603 | CLANG_ANALYZER_NONNULL = YES;
604 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
605 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
606 | CLANG_CXX_LIBRARY = "libc++";
607 | CLANG_ENABLE_MODULES = YES;
608 | CLANG_ENABLE_OBJC_ARC = YES;
609 | CLANG_ENABLE_OBJC_WEAK = YES;
610 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
611 | CLANG_WARN_BOOL_CONVERSION = YES;
612 | CLANG_WARN_COMMA = YES;
613 | CLANG_WARN_CONSTANT_CONVERSION = YES;
614 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
615 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
616 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
617 | CLANG_WARN_EMPTY_BODY = YES;
618 | CLANG_WARN_ENUM_CONVERSION = YES;
619 | CLANG_WARN_INFINITE_RECURSION = YES;
620 | CLANG_WARN_INT_CONVERSION = YES;
621 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
622 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
623 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
624 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
625 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
626 | CLANG_WARN_STRICT_PROTOTYPES = YES;
627 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
628 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
629 | CLANG_WARN_UNREACHABLE_CODE = YES;
630 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
631 | CODE_SIGN_IDENTITY = "-";
632 | COPY_PHASE_STRIP = NO;
633 | CURRENT_PROJECT_VERSION = 1;
634 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
635 | ENABLE_NS_ASSERTIONS = NO;
636 | ENABLE_STRICT_OBJC_MSGSEND = YES;
637 | GCC_C_LANGUAGE_STANDARD = gnu11;
638 | GCC_NO_COMMON_BLOCKS = YES;
639 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
640 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
641 | GCC_WARN_UNDECLARED_SELECTOR = YES;
642 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
643 | GCC_WARN_UNUSED_FUNCTION = YES;
644 | GCC_WARN_UNUSED_VARIABLE = YES;
645 | MACOSX_DEPLOYMENT_TARGET = 10.14;
646 | MTL_ENABLE_DEBUG_INFO = NO;
647 | MTL_FAST_MATH = YES;
648 | SDKROOT = macosx;
649 | VERSIONING_SYSTEM = "apple-generic";
650 | VERSION_INFO_PREFIX = "";
651 | };
652 | name = Release;
653 | };
654 | AAE80BBA22C64F11009C794F /* Debug */ = {
655 | isa = XCBuildConfiguration;
656 | buildSettings = {
657 | CODE_SIGN_IDENTITY = "";
658 | CODE_SIGN_STYLE = Automatic;
659 | COMBINE_HIDPI_IMAGES = YES;
660 | DEFINES_MODULE = YES;
661 | DYLIB_COMPATIBILITY_VERSION = 1;
662 | DYLIB_CURRENT_VERSION = 1;
663 | DYLIB_INSTALL_NAME_BASE = "@rpath";
664 | FRAMEWORK_VERSION = A;
665 | INFOPLIST_FILE = CoolToast/Info.plist;
666 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
667 | LD_RUNPATH_SEARCH_PATHS = (
668 | "$(inherited)",
669 | "@executable_path/../Frameworks",
670 | "@loader_path/Frameworks",
671 | );
672 | PRODUCT_BUNDLE_IDENTIFIER = com.socoolby.CoolToast;
673 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
674 | SKIP_INSTALL = YES;
675 | };
676 | name = Debug;
677 | };
678 | AAE80BBB22C64F11009C794F /* Release */ = {
679 | isa = XCBuildConfiguration;
680 | buildSettings = {
681 | CODE_SIGN_IDENTITY = "";
682 | CODE_SIGN_STYLE = Automatic;
683 | COMBINE_HIDPI_IMAGES = YES;
684 | DEFINES_MODULE = YES;
685 | DYLIB_COMPATIBILITY_VERSION = 1;
686 | DYLIB_CURRENT_VERSION = 1;
687 | DYLIB_INSTALL_NAME_BASE = "@rpath";
688 | FRAMEWORK_VERSION = A;
689 | INFOPLIST_FILE = CoolToast/Info.plist;
690 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
691 | LD_RUNPATH_SEARCH_PATHS = (
692 | "$(inherited)",
693 | "@executable_path/../Frameworks",
694 | "@loader_path/Frameworks",
695 | );
696 | PRODUCT_BUNDLE_IDENTIFIER = com.socoolby.CoolToast;
697 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
698 | SKIP_INSTALL = YES;
699 | };
700 | name = Release;
701 | };
702 | AAE80BBD22C64F11009C794F /* Debug */ = {
703 | isa = XCBuildConfiguration;
704 | buildSettings = {
705 | CODE_SIGN_STYLE = Automatic;
706 | COMBINE_HIDPI_IMAGES = YES;
707 | INFOPLIST_FILE = CoolToastTests/Info.plist;
708 | LD_RUNPATH_SEARCH_PATHS = (
709 | "$(inherited)",
710 | "@executable_path/../Frameworks",
711 | "@loader_path/../Frameworks",
712 | );
713 | PRODUCT_BUNDLE_IDENTIFIER = com.socoolby.CoolToastTests;
714 | PRODUCT_NAME = "$(TARGET_NAME)";
715 | };
716 | name = Debug;
717 | };
718 | AAE80BBE22C64F11009C794F /* Release */ = {
719 | isa = XCBuildConfiguration;
720 | buildSettings = {
721 | CODE_SIGN_STYLE = Automatic;
722 | COMBINE_HIDPI_IMAGES = YES;
723 | INFOPLIST_FILE = CoolToastTests/Info.plist;
724 | LD_RUNPATH_SEARCH_PATHS = (
725 | "$(inherited)",
726 | "@executable_path/../Frameworks",
727 | "@loader_path/../Frameworks",
728 | );
729 | PRODUCT_BUNDLE_IDENTIFIER = com.socoolby.CoolToastTests;
730 | PRODUCT_NAME = "$(TARGET_NAME)";
731 | };
732 | name = Release;
733 | };
734 | AAE80BEB22C65003009C794F /* Debug */ = {
735 | isa = XCBuildConfiguration;
736 | buildSettings = {
737 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
738 | CODE_SIGN_ENTITLEMENTS = TestCoolToast/TestCoolToast.entitlements;
739 | CODE_SIGN_STYLE = Automatic;
740 | COMBINE_HIDPI_IMAGES = YES;
741 | INFOPLIST_FILE = TestCoolToast/Info.plist;
742 | LD_RUNPATH_SEARCH_PATHS = (
743 | "$(inherited)",
744 | "@executable_path/../Frameworks",
745 | );
746 | PRODUCT_BUNDLE_IDENTIFIER = com.socoolby.TestCoolToast;
747 | PRODUCT_NAME = "$(TARGET_NAME)";
748 | };
749 | name = Debug;
750 | };
751 | AAE80BEC22C65003009C794F /* Release */ = {
752 | isa = XCBuildConfiguration;
753 | buildSettings = {
754 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
755 | CODE_SIGN_ENTITLEMENTS = TestCoolToast/TestCoolToast.entitlements;
756 | CODE_SIGN_STYLE = Automatic;
757 | COMBINE_HIDPI_IMAGES = YES;
758 | INFOPLIST_FILE = TestCoolToast/Info.plist;
759 | LD_RUNPATH_SEARCH_PATHS = (
760 | "$(inherited)",
761 | "@executable_path/../Frameworks",
762 | );
763 | PRODUCT_BUNDLE_IDENTIFIER = com.socoolby.TestCoolToast;
764 | PRODUCT_NAME = "$(TARGET_NAME)";
765 | };
766 | name = Release;
767 | };
768 | AAE80BEE22C65003009C794F /* Debug */ = {
769 | isa = XCBuildConfiguration;
770 | buildSettings = {
771 | BUNDLE_LOADER = "$(TEST_HOST)";
772 | CODE_SIGN_STYLE = Automatic;
773 | COMBINE_HIDPI_IMAGES = YES;
774 | INFOPLIST_FILE = TestCoolToastTests/Info.plist;
775 | LD_RUNPATH_SEARCH_PATHS = (
776 | "$(inherited)",
777 | "@executable_path/../Frameworks",
778 | "@loader_path/../Frameworks",
779 | );
780 | PRODUCT_BUNDLE_IDENTIFIER = com.socoolby.TestCoolToastTests;
781 | PRODUCT_NAME = "$(TARGET_NAME)";
782 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestCoolToast.app/Contents/MacOS/TestCoolToast";
783 | };
784 | name = Debug;
785 | };
786 | AAE80BEF22C65003009C794F /* Release */ = {
787 | isa = XCBuildConfiguration;
788 | buildSettings = {
789 | BUNDLE_LOADER = "$(TEST_HOST)";
790 | CODE_SIGN_STYLE = Automatic;
791 | COMBINE_HIDPI_IMAGES = YES;
792 | INFOPLIST_FILE = TestCoolToastTests/Info.plist;
793 | LD_RUNPATH_SEARCH_PATHS = (
794 | "$(inherited)",
795 | "@executable_path/../Frameworks",
796 | "@loader_path/../Frameworks",
797 | );
798 | PRODUCT_BUNDLE_IDENTIFIER = com.socoolby.TestCoolToastTests;
799 | PRODUCT_NAME = "$(TARGET_NAME)";
800 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestCoolToast.app/Contents/MacOS/TestCoolToast";
801 | };
802 | name = Release;
803 | };
804 | AAE80BF122C65003009C794F /* Debug */ = {
805 | isa = XCBuildConfiguration;
806 | buildSettings = {
807 | CODE_SIGN_STYLE = Automatic;
808 | COMBINE_HIDPI_IMAGES = YES;
809 | INFOPLIST_FILE = TestCoolToastUITests/Info.plist;
810 | LD_RUNPATH_SEARCH_PATHS = (
811 | "$(inherited)",
812 | "@executable_path/../Frameworks",
813 | "@loader_path/../Frameworks",
814 | );
815 | PRODUCT_BUNDLE_IDENTIFIER = com.socoolby.TestCoolToastUITests;
816 | PRODUCT_NAME = "$(TARGET_NAME)";
817 | TEST_TARGET_NAME = TestCoolToast;
818 | };
819 | name = Debug;
820 | };
821 | AAE80BF222C65003009C794F /* Release */ = {
822 | isa = XCBuildConfiguration;
823 | buildSettings = {
824 | CODE_SIGN_STYLE = Automatic;
825 | COMBINE_HIDPI_IMAGES = YES;
826 | INFOPLIST_FILE = TestCoolToastUITests/Info.plist;
827 | LD_RUNPATH_SEARCH_PATHS = (
828 | "$(inherited)",
829 | "@executable_path/../Frameworks",
830 | "@loader_path/../Frameworks",
831 | );
832 | PRODUCT_BUNDLE_IDENTIFIER = com.socoolby.TestCoolToastUITests;
833 | PRODUCT_NAME = "$(TARGET_NAME)";
834 | TEST_TARGET_NAME = TestCoolToast;
835 | };
836 | name = Release;
837 | };
838 | /* End XCBuildConfiguration section */
839 |
840 | /* Begin XCConfigurationList section */
841 | AAE80B9F22C64F11009C794F /* Build configuration list for PBXProject "CoolToast" */ = {
842 | isa = XCConfigurationList;
843 | buildConfigurations = (
844 | AAE80BB722C64F11009C794F /* Debug */,
845 | AAE80BB822C64F11009C794F /* Release */,
846 | );
847 | defaultConfigurationIsVisible = 0;
848 | defaultConfigurationName = Release;
849 | };
850 | AAE80BB922C64F11009C794F /* Build configuration list for PBXNativeTarget "CoolToast" */ = {
851 | isa = XCConfigurationList;
852 | buildConfigurations = (
853 | AAE80BBA22C64F11009C794F /* Debug */,
854 | AAE80BBB22C64F11009C794F /* Release */,
855 | );
856 | defaultConfigurationIsVisible = 0;
857 | defaultConfigurationName = Release;
858 | };
859 | AAE80BBC22C64F11009C794F /* Build configuration list for PBXNativeTarget "CoolToastTests" */ = {
860 | isa = XCConfigurationList;
861 | buildConfigurations = (
862 | AAE80BBD22C64F11009C794F /* Debug */,
863 | AAE80BBE22C64F11009C794F /* Release */,
864 | );
865 | defaultConfigurationIsVisible = 0;
866 | defaultConfigurationName = Release;
867 | };
868 | AAE80BEA22C65003009C794F /* Build configuration list for PBXNativeTarget "TestCoolToast" */ = {
869 | isa = XCConfigurationList;
870 | buildConfigurations = (
871 | AAE80BEB22C65003009C794F /* Debug */,
872 | AAE80BEC22C65003009C794F /* Release */,
873 | );
874 | defaultConfigurationIsVisible = 0;
875 | defaultConfigurationName = Release;
876 | };
877 | AAE80BED22C65003009C794F /* Build configuration list for PBXNativeTarget "TestCoolToastTests" */ = {
878 | isa = XCConfigurationList;
879 | buildConfigurations = (
880 | AAE80BEE22C65003009C794F /* Debug */,
881 | AAE80BEF22C65003009C794F /* Release */,
882 | );
883 | defaultConfigurationIsVisible = 0;
884 | defaultConfigurationName = Release;
885 | };
886 | AAE80BF022C65003009C794F /* Build configuration list for PBXNativeTarget "TestCoolToastUITests" */ = {
887 | isa = XCConfigurationList;
888 | buildConfigurations = (
889 | AAE80BF122C65003009C794F /* Debug */,
890 | AAE80BF222C65003009C794F /* Release */,
891 | );
892 | defaultConfigurationIsVisible = 0;
893 | defaultConfigurationName = Release;
894 | };
895 | /* End XCConfigurationList section */
896 | };
897 | rootObject = AAE80B9C22C64F11009C794F /* Project object */;
898 | }
899 |
--------------------------------------------------------------------------------
/TestCoolToast/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 |
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
723 |
734 |
745 |
756 |
767 |
778 |
789 |
790 |
791 |
792 |
793 |
794 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
--------------------------------------------------------------------------------