├── Window.png
├── README.md
├── Custom Window.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcuserdata
│ └── shouding.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── Custom Window.xcscheme
└── project.pbxproj
├── Custom Window
├── CCView.h
├── AppDelegate.h
├── main.m
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── CCView.m
├── AppDelegate.m
└── Base.lproj
│ └── MainMenu.xib
├── .gitignore
├── Custom WindowTests
├── Info.plist
└── Custom_WindowTests.m
├── Custom WindowUITests
├── Info.plist
└── Custom_WindowUITests.m
└── LICENSE
/Window.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oxUnd/Custom-NSView/master/Window.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Custom Window
2 |
3 | Use NSView for custom window like
4 |
5 | 
6 |
7 | done.
8 |
--------------------------------------------------------------------------------
/Custom Window.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Custom Window/CCView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCView.h
3 | // Custom Window
4 | //
5 | // Created by shouding on 9/24/15.
6 | // Copyright © 2015 shouding. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CCView : NSView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Custom Window/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Custom Window
4 | //
5 | // Created by shouding on 9/24/15.
6 | // Copyright © 2015 shouding. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : NSObject
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Custom Window/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Custom Window
4 | //
5 | // Created by shouding on 9/24/15.
6 | // Copyright © 2015 shouding. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, const char * argv[]) {
12 | return NSApplicationMain(argc, argv);
13 | }
14 |
--------------------------------------------------------------------------------
/.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 |
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 |
--------------------------------------------------------------------------------
/Custom WindowTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Custom WindowUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Custom Window.xcodeproj/xcuserdata/shouding.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Custom Window.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 93055D231BB386D800ABD2E9
16 |
17 | primary
18 |
19 |
20 | 93055D361BB386D800ABD2E9
21 |
22 | primary
23 |
24 |
25 | 93055D411BB386D800ABD2E9
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Custom WindowTests/Custom_WindowTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Custom_WindowTests.m
3 | // Custom WindowTests
4 | //
5 | // Created by shouding on 9/24/15.
6 | // Copyright © 2015 shouding. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface Custom_WindowTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation Custom_WindowTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 fansekey
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/Custom Window/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 | }
--------------------------------------------------------------------------------
/Custom Window/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSHumanReadableCopyright
28 | Copyright © 2015 shouding. All rights reserved.
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Custom WindowUITests/Custom_WindowUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Custom_WindowUITests.m
3 | // Custom WindowUITests
4 | //
5 | // Created by shouding on 9/24/15.
6 | // Copyright © 2015 shouding. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface Custom_WindowUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation Custom_WindowUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // 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.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Custom Window/CCView.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCView.m
3 | // Custom Window
4 | //
5 | // Created by shouding on 9/24/15.
6 | // Copyright © 2015 shouding. All rights reserved.
7 | //
8 |
9 | #import "CCView.h"
10 |
11 | @implementation CCView
12 |
13 | - (void)drawRect:(NSRect)dirtyRect {
14 | // [super drawRect:dirtyRect];
15 |
16 | // NSLog(@"draw dirtyRect.");
17 |
18 | // Drawing code here.
19 | // If you plan to do more drawing later, it's a good idea
20 | // to save the graphics state before clipping.
21 | [NSGraphicsContext saveGraphicsState];
22 |
23 | long r = random();
24 | long g = random();
25 | long b = random();
26 | NSColor *color = [NSColor colorWithRed: (r * 1.0/(r + g + b)) green: (g * 1.0 / (r + g + b)) blue: (b * 1.0 / (r + g + b)) alpha: 1.0];
27 | [color set];
28 |
29 | NSBezierPath *path = [NSBezierPath bezierPath];
30 | int zeroOne = 0;
31 | float x, y;
32 |
33 | [path moveToPoint: NSMakePoint(0, dirtyRect.size.height)];
34 | for (int i = 0; i < (int) dirtyRect.size.width / 10; i++) {
35 | if (zeroOne == 1) {
36 | y = 0;
37 | zeroOne = 0;
38 | } else {
39 | zeroOne = 1;
40 | y = 10;
41 | }
42 | x = 10 * i;
43 | [path lineToPoint: NSMakePoint(x, y)];
44 | }
45 |
46 | [path lineToPoint:NSMakePoint(dirtyRect.size.width, (zeroOne == 0 ? 10 : 0))];
47 | [path lineToPoint:NSMakePoint(dirtyRect.size.width, dirtyRect.size.height)];
48 | // NSShadow * shadow = [[NSShadow alloc] init];
49 | // [shadow setShadowColor:[NSColor grayColor]];
50 | // [shadow setShadowBlurRadius:10.0];
51 | // [shadow set];
52 | [path fill];
53 |
54 | [NSGraphicsContext restoreGraphicsState];
55 | }
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/Custom Window/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // Custom Window
4 | //
5 | // Created by shouding on 9/24/15.
6 | // Copyright © 2015 shouding. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "CCView.h"
11 |
12 | @interface AppDelegate ()
13 |
14 | @property (weak) IBOutlet NSWindow *window;
15 | @property (weak) IBOutlet CCView *keyView;
16 | @end
17 |
18 | @implementation AppDelegate
19 | - (IBAction)alertHello:(id)sender {
20 | NSAlert *alert = [[NSAlert alloc] init];
21 | [alert setMessageText: @"Hello, World"];
22 | [alert runModal];
23 | }
24 |
25 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
26 | // Insert code here to initialize your application
27 | [self.window setStyleMask: NSBorderlessWindowMask];
28 | [self.window setMovableByWindowBackground: YES];
29 | [self.window setMovable: YES];
30 | [self.window setOpaque: NO];
31 | [self.window setBackgroundColor: [NSColor clearColor]];
32 | [self.window setLevel: 1];
33 |
34 | NSButton *btn = [NSWindow standardWindowButton: NSWindowCloseButton forStyleMask:[self.window styleMask]];
35 | [btn setAction:@selector(closeWindow:)];
36 | NSRect frame = [btn frame];
37 | [btn setFrame: NSMakeRect(5, [self.keyView frame].size.height - frame.size.height - 5 , frame.size.width, frame.size.height)];
38 |
39 | [self.keyView addSubview: btn];
40 | NSLog(@"%@", [btn cell]);
41 | }
42 |
43 | - (void)applicationWillTerminate:(NSNotification *)aNotification {
44 | // Insert code here to tear down your application
45 | }
46 |
47 | - (void) closeWindow: (id) sender {
48 | [[sender window] close];
49 | }
50 |
51 | - (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL) flag {
52 | if(!flag) {
53 | [self.window makeKeyAndOrderFront:self];
54 | }
55 | return YES;
56 | }
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/Custom Window.xcodeproj/xcuserdata/shouding.xcuserdatad/xcschemes/Custom Window.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
76 |
82 |
83 |
84 |
85 |
89 |
90 |
91 |
92 |
93 |
94 |
100 |
102 |
108 |
109 |
110 |
111 |
113 |
114 |
117 |
118 |
119 |
--------------------------------------------------------------------------------
/Custom Window.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 93055D291BB386D800ABD2E9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 93055D281BB386D800ABD2E9 /* AppDelegate.m */; };
11 | 93055D2C1BB386D800ABD2E9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 93055D2B1BB386D800ABD2E9 /* main.m */; };
12 | 93055D2E1BB386D800ABD2E9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 93055D2D1BB386D800ABD2E9 /* Assets.xcassets */; };
13 | 93055D311BB386D800ABD2E9 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93055D2F1BB386D800ABD2E9 /* MainMenu.xib */; };
14 | 93055D3C1BB386D800ABD2E9 /* Custom_WindowTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 93055D3B1BB386D800ABD2E9 /* Custom_WindowTests.m */; };
15 | 93055D471BB386D800ABD2E9 /* Custom_WindowUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 93055D461BB386D800ABD2E9 /* Custom_WindowUITests.m */; };
16 | 93111F571BB3E63E00414CA5 /* CCView.m in Sources */ = {isa = PBXBuildFile; fileRef = 93111F561BB3E63E00414CA5 /* CCView.m */; settings = {ASSET_TAGS = (); }; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 93055D381BB386D800ABD2E9 /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 93055D1C1BB386D800ABD2E9 /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 93055D231BB386D800ABD2E9;
25 | remoteInfo = "Custom Window";
26 | };
27 | 93055D431BB386D800ABD2E9 /* PBXContainerItemProxy */ = {
28 | isa = PBXContainerItemProxy;
29 | containerPortal = 93055D1C1BB386D800ABD2E9 /* Project object */;
30 | proxyType = 1;
31 | remoteGlobalIDString = 93055D231BB386D800ABD2E9;
32 | remoteInfo = "Custom Window";
33 | };
34 | /* End PBXContainerItemProxy section */
35 |
36 | /* Begin PBXFileReference section */
37 | 93055D241BB386D800ABD2E9 /* Custom Window.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Custom Window.app"; sourceTree = BUILT_PRODUCTS_DIR; };
38 | 93055D271BB386D800ABD2E9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
39 | 93055D281BB386D800ABD2E9 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
40 | 93055D2B1BB386D800ABD2E9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
41 | 93055D2D1BB386D800ABD2E9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
42 | 93055D301BB386D800ABD2E9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
43 | 93055D321BB386D800ABD2E9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
44 | 93055D371BB386D800ABD2E9 /* Custom WindowTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Custom WindowTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
45 | 93055D3B1BB386D800ABD2E9 /* Custom_WindowTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Custom_WindowTests.m; sourceTree = ""; };
46 | 93055D3D1BB386D800ABD2E9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
47 | 93055D421BB386D800ABD2E9 /* Custom WindowUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Custom WindowUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
48 | 93055D461BB386D800ABD2E9 /* Custom_WindowUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Custom_WindowUITests.m; sourceTree = ""; };
49 | 93055D481BB386D800ABD2E9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
50 | 93111F551BB3E63E00414CA5 /* CCView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCView.h; sourceTree = ""; };
51 | 93111F561BB3E63E00414CA5 /* CCView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCView.m; sourceTree = ""; };
52 | /* End PBXFileReference section */
53 |
54 | /* Begin PBXFrameworksBuildPhase section */
55 | 93055D211BB386D800ABD2E9 /* Frameworks */ = {
56 | isa = PBXFrameworksBuildPhase;
57 | buildActionMask = 2147483647;
58 | files = (
59 | );
60 | runOnlyForDeploymentPostprocessing = 0;
61 | };
62 | 93055D341BB386D800ABD2E9 /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | );
67 | runOnlyForDeploymentPostprocessing = 0;
68 | };
69 | 93055D3F1BB386D800ABD2E9 /* Frameworks */ = {
70 | isa = PBXFrameworksBuildPhase;
71 | buildActionMask = 2147483647;
72 | files = (
73 | );
74 | runOnlyForDeploymentPostprocessing = 0;
75 | };
76 | /* End PBXFrameworksBuildPhase section */
77 |
78 | /* Begin PBXGroup section */
79 | 93055D1B1BB386D800ABD2E9 = {
80 | isa = PBXGroup;
81 | children = (
82 | 93055D261BB386D800ABD2E9 /* Custom Window */,
83 | 93055D3A1BB386D800ABD2E9 /* Custom WindowTests */,
84 | 93055D451BB386D800ABD2E9 /* Custom WindowUITests */,
85 | 93055D251BB386D800ABD2E9 /* Products */,
86 | );
87 | sourceTree = "";
88 | };
89 | 93055D251BB386D800ABD2E9 /* Products */ = {
90 | isa = PBXGroup;
91 | children = (
92 | 93055D241BB386D800ABD2E9 /* Custom Window.app */,
93 | 93055D371BB386D800ABD2E9 /* Custom WindowTests.xctest */,
94 | 93055D421BB386D800ABD2E9 /* Custom WindowUITests.xctest */,
95 | );
96 | name = Products;
97 | sourceTree = "";
98 | };
99 | 93055D261BB386D800ABD2E9 /* Custom Window */ = {
100 | isa = PBXGroup;
101 | children = (
102 | 93111F551BB3E63E00414CA5 /* CCView.h */,
103 | 93111F561BB3E63E00414CA5 /* CCView.m */,
104 | 93055D271BB386D800ABD2E9 /* AppDelegate.h */,
105 | 93055D281BB386D800ABD2E9 /* AppDelegate.m */,
106 | 93055D2D1BB386D800ABD2E9 /* Assets.xcassets */,
107 | 93055D2F1BB386D800ABD2E9 /* MainMenu.xib */,
108 | 93055D321BB386D800ABD2E9 /* Info.plist */,
109 | 93055D2A1BB386D800ABD2E9 /* Supporting Files */,
110 | );
111 | path = "Custom Window";
112 | sourceTree = "";
113 | };
114 | 93055D2A1BB386D800ABD2E9 /* Supporting Files */ = {
115 | isa = PBXGroup;
116 | children = (
117 | 93055D2B1BB386D800ABD2E9 /* main.m */,
118 | );
119 | name = "Supporting Files";
120 | sourceTree = "";
121 | };
122 | 93055D3A1BB386D800ABD2E9 /* Custom WindowTests */ = {
123 | isa = PBXGroup;
124 | children = (
125 | 93055D3B1BB386D800ABD2E9 /* Custom_WindowTests.m */,
126 | 93055D3D1BB386D800ABD2E9 /* Info.plist */,
127 | );
128 | path = "Custom WindowTests";
129 | sourceTree = "";
130 | };
131 | 93055D451BB386D800ABD2E9 /* Custom WindowUITests */ = {
132 | isa = PBXGroup;
133 | children = (
134 | 93055D461BB386D800ABD2E9 /* Custom_WindowUITests.m */,
135 | 93055D481BB386D800ABD2E9 /* Info.plist */,
136 | );
137 | path = "Custom WindowUITests";
138 | sourceTree = "";
139 | };
140 | /* End PBXGroup section */
141 |
142 | /* Begin PBXNativeTarget section */
143 | 93055D231BB386D800ABD2E9 /* Custom Window */ = {
144 | isa = PBXNativeTarget;
145 | buildConfigurationList = 93055D4B1BB386D800ABD2E9 /* Build configuration list for PBXNativeTarget "Custom Window" */;
146 | buildPhases = (
147 | 93055D201BB386D800ABD2E9 /* Sources */,
148 | 93055D211BB386D800ABD2E9 /* Frameworks */,
149 | 93055D221BB386D800ABD2E9 /* Resources */,
150 | );
151 | buildRules = (
152 | );
153 | dependencies = (
154 | );
155 | name = "Custom Window";
156 | productName = "Custom Window";
157 | productReference = 93055D241BB386D800ABD2E9 /* Custom Window.app */;
158 | productType = "com.apple.product-type.application";
159 | };
160 | 93055D361BB386D800ABD2E9 /* Custom WindowTests */ = {
161 | isa = PBXNativeTarget;
162 | buildConfigurationList = 93055D4E1BB386D800ABD2E9 /* Build configuration list for PBXNativeTarget "Custom WindowTests" */;
163 | buildPhases = (
164 | 93055D331BB386D800ABD2E9 /* Sources */,
165 | 93055D341BB386D800ABD2E9 /* Frameworks */,
166 | 93055D351BB386D800ABD2E9 /* Resources */,
167 | );
168 | buildRules = (
169 | );
170 | dependencies = (
171 | 93055D391BB386D800ABD2E9 /* PBXTargetDependency */,
172 | );
173 | name = "Custom WindowTests";
174 | productName = "Custom WindowTests";
175 | productReference = 93055D371BB386D800ABD2E9 /* Custom WindowTests.xctest */;
176 | productType = "com.apple.product-type.bundle.unit-test";
177 | };
178 | 93055D411BB386D800ABD2E9 /* Custom WindowUITests */ = {
179 | isa = PBXNativeTarget;
180 | buildConfigurationList = 93055D511BB386D800ABD2E9 /* Build configuration list for PBXNativeTarget "Custom WindowUITests" */;
181 | buildPhases = (
182 | 93055D3E1BB386D800ABD2E9 /* Sources */,
183 | 93055D3F1BB386D800ABD2E9 /* Frameworks */,
184 | 93055D401BB386D800ABD2E9 /* Resources */,
185 | );
186 | buildRules = (
187 | );
188 | dependencies = (
189 | 93055D441BB386D800ABD2E9 /* PBXTargetDependency */,
190 | );
191 | name = "Custom WindowUITests";
192 | productName = "Custom WindowUITests";
193 | productReference = 93055D421BB386D800ABD2E9 /* Custom WindowUITests.xctest */;
194 | productType = "com.apple.product-type.bundle.ui-testing";
195 | };
196 | /* End PBXNativeTarget section */
197 |
198 | /* Begin PBXProject section */
199 | 93055D1C1BB386D800ABD2E9 /* Project object */ = {
200 | isa = PBXProject;
201 | attributes = {
202 | LastUpgradeCheck = 0700;
203 | ORGANIZATIONNAME = shouding;
204 | TargetAttributes = {
205 | 93055D231BB386D800ABD2E9 = {
206 | CreatedOnToolsVersion = 7.0;
207 | };
208 | 93055D361BB386D800ABD2E9 = {
209 | CreatedOnToolsVersion = 7.0;
210 | TestTargetID = 93055D231BB386D800ABD2E9;
211 | };
212 | 93055D411BB386D800ABD2E9 = {
213 | CreatedOnToolsVersion = 7.0;
214 | TestTargetID = 93055D231BB386D800ABD2E9;
215 | };
216 | };
217 | };
218 | buildConfigurationList = 93055D1F1BB386D800ABD2E9 /* Build configuration list for PBXProject "Custom Window" */;
219 | compatibilityVersion = "Xcode 3.2";
220 | developmentRegion = English;
221 | hasScannedForEncodings = 0;
222 | knownRegions = (
223 | en,
224 | Base,
225 | );
226 | mainGroup = 93055D1B1BB386D800ABD2E9;
227 | productRefGroup = 93055D251BB386D800ABD2E9 /* Products */;
228 | projectDirPath = "";
229 | projectRoot = "";
230 | targets = (
231 | 93055D231BB386D800ABD2E9 /* Custom Window */,
232 | 93055D361BB386D800ABD2E9 /* Custom WindowTests */,
233 | 93055D411BB386D800ABD2E9 /* Custom WindowUITests */,
234 | );
235 | };
236 | /* End PBXProject section */
237 |
238 | /* Begin PBXResourcesBuildPhase section */
239 | 93055D221BB386D800ABD2E9 /* Resources */ = {
240 | isa = PBXResourcesBuildPhase;
241 | buildActionMask = 2147483647;
242 | files = (
243 | 93055D2E1BB386D800ABD2E9 /* Assets.xcassets in Resources */,
244 | 93055D311BB386D800ABD2E9 /* MainMenu.xib in Resources */,
245 | );
246 | runOnlyForDeploymentPostprocessing = 0;
247 | };
248 | 93055D351BB386D800ABD2E9 /* Resources */ = {
249 | isa = PBXResourcesBuildPhase;
250 | buildActionMask = 2147483647;
251 | files = (
252 | );
253 | runOnlyForDeploymentPostprocessing = 0;
254 | };
255 | 93055D401BB386D800ABD2E9 /* Resources */ = {
256 | isa = PBXResourcesBuildPhase;
257 | buildActionMask = 2147483647;
258 | files = (
259 | );
260 | runOnlyForDeploymentPostprocessing = 0;
261 | };
262 | /* End PBXResourcesBuildPhase section */
263 |
264 | /* Begin PBXSourcesBuildPhase section */
265 | 93055D201BB386D800ABD2E9 /* Sources */ = {
266 | isa = PBXSourcesBuildPhase;
267 | buildActionMask = 2147483647;
268 | files = (
269 | 93055D2C1BB386D800ABD2E9 /* main.m in Sources */,
270 | 93055D291BB386D800ABD2E9 /* AppDelegate.m in Sources */,
271 | 93111F571BB3E63E00414CA5 /* CCView.m in Sources */,
272 | );
273 | runOnlyForDeploymentPostprocessing = 0;
274 | };
275 | 93055D331BB386D800ABD2E9 /* Sources */ = {
276 | isa = PBXSourcesBuildPhase;
277 | buildActionMask = 2147483647;
278 | files = (
279 | 93055D3C1BB386D800ABD2E9 /* Custom_WindowTests.m in Sources */,
280 | );
281 | runOnlyForDeploymentPostprocessing = 0;
282 | };
283 | 93055D3E1BB386D800ABD2E9 /* Sources */ = {
284 | isa = PBXSourcesBuildPhase;
285 | buildActionMask = 2147483647;
286 | files = (
287 | 93055D471BB386D800ABD2E9 /* Custom_WindowUITests.m in Sources */,
288 | );
289 | runOnlyForDeploymentPostprocessing = 0;
290 | };
291 | /* End PBXSourcesBuildPhase section */
292 |
293 | /* Begin PBXTargetDependency section */
294 | 93055D391BB386D800ABD2E9 /* PBXTargetDependency */ = {
295 | isa = PBXTargetDependency;
296 | target = 93055D231BB386D800ABD2E9 /* Custom Window */;
297 | targetProxy = 93055D381BB386D800ABD2E9 /* PBXContainerItemProxy */;
298 | };
299 | 93055D441BB386D800ABD2E9 /* PBXTargetDependency */ = {
300 | isa = PBXTargetDependency;
301 | target = 93055D231BB386D800ABD2E9 /* Custom Window */;
302 | targetProxy = 93055D431BB386D800ABD2E9 /* PBXContainerItemProxy */;
303 | };
304 | /* End PBXTargetDependency section */
305 |
306 | /* Begin PBXVariantGroup section */
307 | 93055D2F1BB386D800ABD2E9 /* MainMenu.xib */ = {
308 | isa = PBXVariantGroup;
309 | children = (
310 | 93055D301BB386D800ABD2E9 /* Base */,
311 | );
312 | name = MainMenu.xib;
313 | sourceTree = "";
314 | };
315 | /* End PBXVariantGroup section */
316 |
317 | /* Begin XCBuildConfiguration section */
318 | 93055D491BB386D800ABD2E9 /* Debug */ = {
319 | isa = XCBuildConfiguration;
320 | buildSettings = {
321 | ALWAYS_SEARCH_USER_PATHS = NO;
322 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
323 | CLANG_CXX_LIBRARY = "libc++";
324 | CLANG_ENABLE_MODULES = YES;
325 | CLANG_ENABLE_OBJC_ARC = YES;
326 | CLANG_WARN_BOOL_CONVERSION = YES;
327 | CLANG_WARN_CONSTANT_CONVERSION = YES;
328 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
329 | CLANG_WARN_EMPTY_BODY = YES;
330 | CLANG_WARN_ENUM_CONVERSION = YES;
331 | CLANG_WARN_INT_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_UNREACHABLE_CODE = YES;
334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
335 | CODE_SIGN_IDENTITY = "-";
336 | COPY_PHASE_STRIP = NO;
337 | DEBUG_INFORMATION_FORMAT = dwarf;
338 | ENABLE_STRICT_OBJC_MSGSEND = YES;
339 | ENABLE_TESTABILITY = YES;
340 | GCC_C_LANGUAGE_STANDARD = gnu99;
341 | GCC_DYNAMIC_NO_PIC = NO;
342 | GCC_NO_COMMON_BLOCKS = YES;
343 | GCC_OPTIMIZATION_LEVEL = 0;
344 | GCC_PREPROCESSOR_DEFINITIONS = (
345 | "DEBUG=1",
346 | "$(inherited)",
347 | );
348 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
349 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
350 | GCC_WARN_UNDECLARED_SELECTOR = YES;
351 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
352 | GCC_WARN_UNUSED_FUNCTION = YES;
353 | GCC_WARN_UNUSED_VARIABLE = YES;
354 | MACOSX_DEPLOYMENT_TARGET = 10.11;
355 | MTL_ENABLE_DEBUG_INFO = YES;
356 | ONLY_ACTIVE_ARCH = YES;
357 | SDKROOT = macosx;
358 | };
359 | name = Debug;
360 | };
361 | 93055D4A1BB386D800ABD2E9 /* Release */ = {
362 | isa = XCBuildConfiguration;
363 | buildSettings = {
364 | ALWAYS_SEARCH_USER_PATHS = NO;
365 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
366 | CLANG_CXX_LIBRARY = "libc++";
367 | CLANG_ENABLE_MODULES = YES;
368 | CLANG_ENABLE_OBJC_ARC = YES;
369 | CLANG_WARN_BOOL_CONVERSION = YES;
370 | CLANG_WARN_CONSTANT_CONVERSION = YES;
371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
372 | CLANG_WARN_EMPTY_BODY = YES;
373 | CLANG_WARN_ENUM_CONVERSION = YES;
374 | CLANG_WARN_INT_CONVERSION = YES;
375 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
376 | CLANG_WARN_UNREACHABLE_CODE = YES;
377 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
378 | CODE_SIGN_IDENTITY = "-";
379 | COPY_PHASE_STRIP = NO;
380 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
381 | ENABLE_NS_ASSERTIONS = NO;
382 | ENABLE_STRICT_OBJC_MSGSEND = YES;
383 | GCC_C_LANGUAGE_STANDARD = gnu99;
384 | GCC_NO_COMMON_BLOCKS = YES;
385 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
386 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
387 | GCC_WARN_UNDECLARED_SELECTOR = YES;
388 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
389 | GCC_WARN_UNUSED_FUNCTION = YES;
390 | GCC_WARN_UNUSED_VARIABLE = YES;
391 | MACOSX_DEPLOYMENT_TARGET = 10.11;
392 | MTL_ENABLE_DEBUG_INFO = NO;
393 | SDKROOT = macosx;
394 | };
395 | name = Release;
396 | };
397 | 93055D4C1BB386D800ABD2E9 /* Debug */ = {
398 | isa = XCBuildConfiguration;
399 | buildSettings = {
400 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
401 | COMBINE_HIDPI_IMAGES = YES;
402 | INFOPLIST_FILE = "Custom Window/Info.plist";
403 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
404 | PRODUCT_BUNDLE_IDENTIFIER = "com.first-learning.Custom-Window";
405 | PRODUCT_NAME = "$(TARGET_NAME)";
406 | };
407 | name = Debug;
408 | };
409 | 93055D4D1BB386D800ABD2E9 /* Release */ = {
410 | isa = XCBuildConfiguration;
411 | buildSettings = {
412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
413 | COMBINE_HIDPI_IMAGES = YES;
414 | INFOPLIST_FILE = "Custom Window/Info.plist";
415 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
416 | PRODUCT_BUNDLE_IDENTIFIER = "com.first-learning.Custom-Window";
417 | PRODUCT_NAME = "$(TARGET_NAME)";
418 | };
419 | name = Release;
420 | };
421 | 93055D4F1BB386D800ABD2E9 /* Debug */ = {
422 | isa = XCBuildConfiguration;
423 | buildSettings = {
424 | BUNDLE_LOADER = "$(TEST_HOST)";
425 | COMBINE_HIDPI_IMAGES = YES;
426 | INFOPLIST_FILE = "Custom WindowTests/Info.plist";
427 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
428 | PRODUCT_BUNDLE_IDENTIFIER = "com.first-learning.Custom-WindowTests";
429 | PRODUCT_NAME = "$(TARGET_NAME)";
430 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Custom Window.app/Contents/MacOS/Custom Window";
431 | };
432 | name = Debug;
433 | };
434 | 93055D501BB386D800ABD2E9 /* Release */ = {
435 | isa = XCBuildConfiguration;
436 | buildSettings = {
437 | BUNDLE_LOADER = "$(TEST_HOST)";
438 | COMBINE_HIDPI_IMAGES = YES;
439 | INFOPLIST_FILE = "Custom WindowTests/Info.plist";
440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
441 | PRODUCT_BUNDLE_IDENTIFIER = "com.first-learning.Custom-WindowTests";
442 | PRODUCT_NAME = "$(TARGET_NAME)";
443 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Custom Window.app/Contents/MacOS/Custom Window";
444 | };
445 | name = Release;
446 | };
447 | 93055D521BB386D800ABD2E9 /* Debug */ = {
448 | isa = XCBuildConfiguration;
449 | buildSettings = {
450 | COMBINE_HIDPI_IMAGES = YES;
451 | INFOPLIST_FILE = "Custom WindowUITests/Info.plist";
452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
453 | PRODUCT_BUNDLE_IDENTIFIER = "com.first-learning.Custom-WindowUITests";
454 | PRODUCT_NAME = "$(TARGET_NAME)";
455 | TEST_TARGET_NAME = "Custom Window";
456 | USES_XCTRUNNER = YES;
457 | };
458 | name = Debug;
459 | };
460 | 93055D531BB386D800ABD2E9 /* Release */ = {
461 | isa = XCBuildConfiguration;
462 | buildSettings = {
463 | COMBINE_HIDPI_IMAGES = YES;
464 | INFOPLIST_FILE = "Custom WindowUITests/Info.plist";
465 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
466 | PRODUCT_BUNDLE_IDENTIFIER = "com.first-learning.Custom-WindowUITests";
467 | PRODUCT_NAME = "$(TARGET_NAME)";
468 | TEST_TARGET_NAME = "Custom Window";
469 | USES_XCTRUNNER = YES;
470 | };
471 | name = Release;
472 | };
473 | /* End XCBuildConfiguration section */
474 |
475 | /* Begin XCConfigurationList section */
476 | 93055D1F1BB386D800ABD2E9 /* Build configuration list for PBXProject "Custom Window" */ = {
477 | isa = XCConfigurationList;
478 | buildConfigurations = (
479 | 93055D491BB386D800ABD2E9 /* Debug */,
480 | 93055D4A1BB386D800ABD2E9 /* Release */,
481 | );
482 | defaultConfigurationIsVisible = 0;
483 | defaultConfigurationName = Release;
484 | };
485 | 93055D4B1BB386D800ABD2E9 /* Build configuration list for PBXNativeTarget "Custom Window" */ = {
486 | isa = XCConfigurationList;
487 | buildConfigurations = (
488 | 93055D4C1BB386D800ABD2E9 /* Debug */,
489 | 93055D4D1BB386D800ABD2E9 /* Release */,
490 | );
491 | defaultConfigurationIsVisible = 0;
492 | defaultConfigurationName = Release;
493 | };
494 | 93055D4E1BB386D800ABD2E9 /* Build configuration list for PBXNativeTarget "Custom WindowTests" */ = {
495 | isa = XCConfigurationList;
496 | buildConfigurations = (
497 | 93055D4F1BB386D800ABD2E9 /* Debug */,
498 | 93055D501BB386D800ABD2E9 /* Release */,
499 | );
500 | defaultConfigurationIsVisible = 0;
501 | defaultConfigurationName = Release;
502 | };
503 | 93055D511BB386D800ABD2E9 /* Build configuration list for PBXNativeTarget "Custom WindowUITests" */ = {
504 | isa = XCConfigurationList;
505 | buildConfigurations = (
506 | 93055D521BB386D800ABD2E9 /* Debug */,
507 | 93055D531BB386D800ABD2E9 /* Release */,
508 | );
509 | defaultConfigurationIsVisible = 0;
510 | defaultConfigurationName = Release;
511 | };
512 | /* End XCConfigurationList section */
513 | };
514 | rootObject = 93055D1C1BB386D800ABD2E9 /* Project object */;
515 | }
516 |
--------------------------------------------------------------------------------
/Custom Window/Base.lproj/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
--------------------------------------------------------------------------------