├── WAYAppStoreWindowDemo
├── ADD INAppStoreWindow AND WAYWindow
├── main.m
├── AppDelegate.h
├── AppDelegate.m
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
└── Base.lproj
│ └── MainMenu.xib
├── WAYAppStoreWindowDemo.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── WAYAppStoreWindowDemo.xccheckout
└── project.pbxproj
├── LICENSE
├── README.md
├── WAYAppStoreWindow
├── WAYAppStoreWindow.m
└── WAYAppStoreWindow.h
└── .gitignore
/WAYAppStoreWindowDemo/ADD INAppStoreWindow AND WAYWindow:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/WAYAppStoreWindowDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/WAYAppStoreWindowDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // WAYAppStoreWindowDemo
4 | //
5 | // Created by Raffael Hannemann on 16.11.14.
6 | // Copyright (c) 2014 We Are Yeah!. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, const char * argv[]) {
12 | return NSApplicationMain(argc, argv);
13 | }
14 |
--------------------------------------------------------------------------------
/WAYAppStoreWindowDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // WAYAppStoreWindowDemo
4 | //
5 | // Created by Raffael Hannemann on 16.11.14.
6 | // Copyright (c) 2014 We Are Yeah!. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : NSObject
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | WAYAppStoreWindow
2 | by Raffael Hannemann (@raffael_me, @weAreYeah)
3 |
4 | Licensed under the BSD License http://www.opensource.org/licenses/bsd-license THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/WAYAppStoreWindowDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // WAYAppStoreWindowDemo
4 | //
5 | // Created by Raffael Hannemann on 16.11.14.
6 | // Copyright (c) 2014 We Are Yeah!. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "WAYAppStoreWindow.h"
11 |
12 | @interface AppDelegate ()
13 |
14 | @property (weak) IBOutlet WAYAppStoreWindow *window;
15 | @end
16 |
17 | @implementation AppDelegate
18 |
19 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
20 | // Insert code here to initialize your application
21 | [_window setTitleBarHeight:100];
22 |
23 | NSButton *button = [[NSButton alloc] initWithFrame:NSMakeRect(NSWidth(self.window.frame)-160, 38, 150, 22)];
24 | [button setTitle:@"Titlebar Subview"];
25 | [button setAutoresizingMask:NSViewMinXMargin|NSViewMinYMargin];
26 | [_window.titleBarView addSubview:button];
27 | }
28 |
29 | - (void)applicationWillTerminate:(NSNotification *)aNotification {
30 | // Insert code here to tear down your application
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/WAYAppStoreWindowDemo/Images.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 | }
--------------------------------------------------------------------------------
/WAYAppStoreWindowDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | com.weareyeah.$(PRODUCT_NAME:rfc1034identifier)
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 © 2014 We Are Yeah!. All rights reserved.
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/WAYAppStoreWindowDemo.xcodeproj/project.xcworkspace/xcshareddata/WAYAppStoreWindowDemo.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | A98C7B22-479C-4E2D-A996-F4C00102A414
9 | IDESourceControlProjectName
10 | WAYAppStoreWindowDemo
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 03D856B95C25AEAA4DB5A2AE02CE3F03ACC83D58
14 | https://github.com/raffael/WAYAppStoreWindow.git
15 | C1421C99D055D3A535089DA2BBEC5EFC9A0200F0
16 | https://github.com/weAreYeah/WAYWindow.git
17 |
18 | IDESourceControlProjectPath
19 | WAYAppStoreWindowDemo.xcodeproj
20 | IDESourceControlProjectRelativeInstallPathDictionary
21 |
22 | 03D856B95C25AEAA4DB5A2AE02CE3F03ACC83D58
23 | ../..
24 | C1421C99D055D3A535089DA2BBEC5EFC9A0200F0
25 | ../../../WAYWindow
26 |
27 | IDESourceControlProjectURL
28 | https://github.com/raffael/WAYAppStoreWindow.git
29 | IDESourceControlProjectVersion
30 | 111
31 | IDESourceControlProjectWCCIdentifier
32 | 03D856B95C25AEAA4DB5A2AE02CE3F03ACC83D58
33 | IDESourceControlProjectWCConfigurations
34 |
35 |
36 | IDESourceControlRepositoryExtensionIdentifierKey
37 | public.vcs.git
38 | IDESourceControlWCCIdentifierKey
39 | 03D856B95C25AEAA4DB5A2AE02CE3F03ACC83D58
40 | IDESourceControlWCCName
41 | WAYAppStoreWindow
42 |
43 |
44 | IDESourceControlRepositoryExtensionIdentifierKey
45 | public.vcs.git
46 | IDESourceControlWCCIdentifierKey
47 | C1421C99D055D3A535089DA2BBEC5EFC9A0200F0
48 | IDESourceControlWCCName
49 | WAYWindow
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | WAYAppStoreWindow
2 | =================
3 |
4 | WAYAppStoreWindow is our approach to let you use INAppStoreWindow like features in OS X Yosemite without the warnings.
5 |
6 | It's a drop-in replacement for **INAppStoreWindow**, which switches its class implementation at runtime between **WAYWindow** and **INAppStoreWindow**, depending on the OS X version.
7 |
8 | The motivation behind this class is the following warning while running applications using *INAppStoreWindow* in OS X 10.10 Yosemite:
9 |
10 | NSWindow warning: adding an unknown subview:
11 | 2014-11-16 14:26:45.245 WAYAppStoreWindowDemo[12114:305020] Call stack:
12 | [...]
13 |
14 | We introduced ```WAYWindow``` which provides the same interface, to a certain extent, as INAppStoreWindow. ```WAYWindow``` lets you specify a custom window titlebar height and add subviews to the titlebar. You can also define custom margins for the standard window buttons and center them. However ```WAYWindow``` has been built to work on OS X Yosemite only.
15 |
16 | This class, ```WAYAppStoreWindow``` switches its internal implementation at runtime. If the app is running on pre-Yosemite OS X versions, ```INAppStoreWindow``` will be used, otherwise ```WAYWindow``` will be used.
17 |
18 | Note that you need to add both of the following dependencies:
19 |
20 | * [WAYWindow](https://github.com/weAreYeah/WAYWindow/)
21 | * [INAppStoreWindow](https://github.com/indragiek/INAppStoreWindow/)
22 |
23 | The interface of this class is highly constrained. Not all of the properties you can customize for ```INAppStoreWindow``` instances are supported, and you should use this approach with care. Make sure to test before you deploy.
24 |
25 | Many thanks to [@indragie](http://twitter.com/indragie) for his [INAppStoreWindow](https://github.com/indragiek/INAppStoreWindow/).
26 |
27 | Usage
28 | -----
29 |
30 | 1. Drag a new NSWindow instance to your XIB
31 | 2. Set the class of the instance to WAYAppStoreWindow
32 |
33 | **Migrating from INAppStoreWindow:**
34 |
35 | 1. Change the class of your ```INAppStoreWindow``` instance to ```WAYAppStoreWindow```.
36 | 2. Test a lot.
37 |
38 | Interesting
39 | -----------
40 | We are new, weAreYeah.com.
41 | Follow us on [@weAreYeah](http://twitter.com/weAreYeah) for upcoming goodies.
42 |
43 | License
44 | -------
45 | Licensed under the BSD License
46 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
47 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
48 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
49 | SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
50 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
51 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
52 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
53 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
54 | THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55 |
56 |
57 |
--------------------------------------------------------------------------------
/WAYAppStoreWindow/WAYAppStoreWindow.m:
--------------------------------------------------------------------------------
1 | //
2 | // WAYAppStoreWindow.m
3 | // WAYAppStoreWindow
4 | //
5 | // Created by Raffael Hannemann on 15.11.14.
6 | // Copyright (c) 2014 Raffael Hannemann. All rights reserved.
7 | // Visit weAreYeah.com or follow @weareYeah for updates.
8 | //
9 | // Licensed under the BSD License
10 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
11 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
12 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
13 | // SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
14 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
15 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
16 | // BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
18 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19 | //
20 |
21 | #import "WAYAppStoreWindow.h"
22 | #import
23 | #import "WAYWindow.h"
24 | #import "INAppStoreWindow.h"
25 |
26 | // Set this flag to 1, if you want to force the usage of INAppStoreWindow
27 | #define SIMULATE_PRE_YOSEMITE 0
28 |
29 | #pragma mark - WAYDefensiveWindow
30 | /** Internally, if the class decides to use WAYWindow instead of INAppStoreWindow, we won't use WAYWindow directly, but its subclass WAYDefensiveWindow instead, which logs warnings, if the developer calls a method, which is only implemented by INAppStoreWindow. This may happen if the developer tries to make use of features of INAppStoreWindow, which have not been ported yet to WAYWindow. */
31 | @interface WAYDefensiveWindow : WAYWindow
32 | @end
33 |
34 | // DUMMY FUNCTION
35 | void WAYDefensiveWindowDummyIMP(id self, SEL _cmd) {
36 | // This function will be used as method implementation for
37 | // methods which are available in INAppStoreWindow, but not
38 | // in WAYWindow
39 | NSLog(@"WARNING: Instances of '%@' do not implement %@; yet. Prevented an exception for sending unrecognized selector.",
40 | [self superclass],
41 | NSStringFromSelector(_cmd));
42 | }
43 |
44 | @implementation WAYDefensiveWindow : WAYWindow
45 |
46 | + (BOOL) resolveInstanceMethod:(SEL)aSelector {
47 | // If INAppStoreWindow implements this method, and WAYWindow does not, add a new dummy method, which does nothing but logging a warning.
48 | if ([INAppStoreWindow instancesRespondToSelector:aSelector] && ![WAYWindow instancesRespondToSelector:aSelector]) {
49 | class_addMethod([self class], aSelector, (IMP)WAYDefensiveWindowDummyIMP, "v@:");
50 | return YES;
51 | }
52 | return [super resolveInstanceMethod:aSelector];
53 | }
54 |
55 | @end
56 |
57 | /** We need to add private properties of the NSWindow subclasses here. */
58 | @class WAYWindowDelegateProxy;
59 | @interface WAYAppStoreWindow ()
60 | @property (strong) WAYWindowDelegateProxy* delegateProxy;
61 | @property (strong) NSArray* standardButtons;
62 | @property (strong) NSTitlebarAccessoryViewController *dummyTitlebarAccessoryViewController;
63 | @end
64 |
65 | static int isYosemiteOrGreater = -1;
66 |
67 | // Let's suppress Incomplete Implementation warnings
68 | #pragma clang diagnostic ignored "-Wincomplete-implementation"
69 | @implementation WAYAppStoreWindow
70 |
71 | + (BOOL) isYosemiteOrGreater {
72 | if (isYosemiteOrGreater==-1) {
73 | isYosemiteOrGreater = NSClassFromString(@"NSVisualEffectView")!=nil ? 1 : 0;
74 | #if SIMULATE_PRE_YOSEMITE
75 | isYosemiteOrGreater = 0;
76 | #endif
77 | }
78 | return isYosemiteOrGreater;
79 | }
80 |
81 | /** All we do is to swap the class implementation at runtime. */
82 | + (instancetype)alloc {
83 | id instance = [super alloc];
84 | object_setClass(instance, ([self isYosemiteOrGreater]) ? [WAYDefensiveWindow class] : [INAppStoreWindow class]);
85 | return instance;
86 | }
87 |
88 | + (instancetype) allocWithZone:(struct _NSZone *)zone {
89 | id instance = [super allocWithZone:zone];
90 | object_setClass(instance, ([self isYosemiteOrGreater]) ? [WAYDefensiveWindow class] : [INAppStoreWindow class]);
91 | return instance;
92 | }
93 |
94 | @end
95 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | #####
3 | # OS X temporary files that should never be committed
4 | #
5 | # c.f. http://www.westwind.com/reference/os-x/invisibles.html
6 |
7 | .DS_Store
8 |
9 | # c.f. http://www.westwind.com/reference/os-x/invisibles.html
10 |
11 | .Trashes
12 |
13 | # c.f. http://www.westwind.com/reference/os-x/invisibles.html
14 |
15 | *.swp
16 |
17 | #
18 | # *.lock - this is used and abused by many editors for many different things.
19 | # For the main ones I use (e.g. Eclipse), it should be excluded
20 | # from source-control, but YMMV.
21 | # (lock files are usually local-only file-synchronization on the local FS that should NOT go in git)
22 | # c.f. the "OPTIONAL" section at bottom though, for tool-specific variations!
23 |
24 | *.lock
25 |
26 |
27 | #
28 | # profile - REMOVED temporarily (on double-checking, I can't find it in OS X docs?)
29 | #profile
30 |
31 |
32 | ####
33 | # Xcode temporary files that should never be committed
34 | #
35 | # NB: NIB/XIB files still exist even on Storyboard projects, so we want this...
36 |
37 | *~.nib
38 |
39 |
40 | ####
41 | # Xcode build files -
42 | #
43 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData"
44 |
45 | DerivedData/
46 |
47 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build"
48 |
49 | build/
50 |
51 |
52 | #####
53 | # Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)
54 | #
55 | # This is complicated:
56 | #
57 | # SOMETIMES you need to put this file in version control.
58 | # Apple designed it poorly - if you use "custom executables", they are
59 | # saved in this file.
60 | # 99% of projects do NOT use those, so they do NOT want to version control this file.
61 | # ..but if you're in the 1%, comment out the line "*.pbxuser"
62 |
63 | # .pbxuser: http://lists.apple.com/archives/xcode-users/2004/Jan/msg00193.html
64 |
65 | *.pbxuser
66 |
67 | # .mode1v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html
68 |
69 | *.mode1v3
70 |
71 | # .mode2v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html
72 |
73 | *.mode2v3
74 |
75 | # .perspectivev3: http://stackoverflow.com/questions/5223297/xcode-projects-what-is-a-perspectivev3-file
76 |
77 | *.perspectivev3
78 |
79 | # NB: also, whitelist the default ones, some projects need to use these
80 | !default.pbxuser
81 | !default.mode1v3
82 | !default.mode2v3
83 | !default.perspectivev3
84 |
85 |
86 | ####
87 | # Xcode 4 - semi-personal settings
88 | #
89 | #
90 | # OPTION 1: ---------------------------------
91 | # throw away ALL personal settings (including custom schemes!
92 | # - unless they are "shared")
93 | #
94 | # NB: this is exclusive with OPTION 2 below
95 | xcuserdata
96 |
97 | # OPTION 2: ---------------------------------
98 | # get rid of ALL personal settings, but KEEP SOME OF THEM
99 | # - NB: you must manually uncomment the bits you want to keep
100 | #
101 | # NB: this *requires* git v1.8.2 or above; you may need to upgrade to latest OS X,
102 | # or manually install git over the top of the OS X version
103 | # NB: this is exclusive with OPTION 1 above
104 | #
105 | #xcuserdata/**/*
106 |
107 | # (requires option 2 above): Personal Schemes
108 | #
109 | #!xcuserdata/**/xcschemes/*
110 |
111 | ####
112 | # XCode 4 workspaces - more detailed
113 | #
114 | # Workspaces are important! They are a core feature of Xcode - don't exclude them :)
115 | #
116 | # Workspace layout is quite spammy. For reference:
117 | #
118 | # /(root)/
119 | # /(project-name).xcodeproj/
120 | # project.pbxproj
121 | # /project.xcworkspace/
122 | # contents.xcworkspacedata
123 | # /xcuserdata/
124 | # /(your name)/xcuserdatad/
125 | # UserInterfaceState.xcuserstate
126 | # /xcsshareddata/
127 | # /xcschemes/
128 | # (shared scheme name).xcscheme
129 | # /xcuserdata/
130 | # /(your name)/xcuserdatad/
131 | # (private scheme).xcscheme
132 | # xcschememanagement.plist
133 | #
134 | #
135 |
136 | ####
137 | # Xcode 4 - Deprecated classes
138 | #
139 | # Allegedly, if you manually "deprecate" your classes, they get moved here.
140 | #
141 | # We're using source-control, so this is a "feature" that we do not want!
142 |
143 | *.moved-aside
144 |
145 | ####
146 | # OPTIONAL: Some well-known tools that people use side-by-side with Xcode / iOS development
147 | #
148 | # NB: I'd rather not include these here, but gitignore's design is weak and doesn't allow
149 | # modular gitignore: you have to put EVERYTHING in one file.
150 | #
151 | # COCOAPODS:
152 | #
153 | # c.f. http://guides.cocoapods.org/using/using-cocoapods.html#what-is-a-podfilelock
154 | # c.f. http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
155 | #
156 | #!Podfile.lock
157 | #
158 | # RUBY:
159 | #
160 | # c.f. http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
161 | #
162 | #!Gemfile.lock
163 | #
164 | # IDEA:
165 | #
166 | #.idea
167 | #
168 | # TEXTMATE:
169 | #
170 | # -- UNVERIFIED: c.f. http://stackoverflow.com/a/50283/153422
171 | #
172 | #tm_build_errors
173 |
174 | ####
175 | # UNKNOWN: recommended by others, but I can't discover what these files are
176 | #
177 | # Community suggestions (unverified, no evidence available - DISABLED by default)
178 | #
179 | # 1. Xcode 5 - VCS file
180 | #
181 | # "The data in this file not represent state of your project.
182 | # If you'll leave this file in git - you will have merge conflicts during
183 | # pull your cahnges to other's repo"
184 | #
185 | #*.xccheckout
--------------------------------------------------------------------------------
/WAYAppStoreWindow/WAYAppStoreWindow.h:
--------------------------------------------------------------------------------
1 | //
2 | // WAYAppStoreWindow.h
3 | // WAYAppStoreWindow
4 | //
5 | // Created by Raffael Hannemann on 15.11.14.
6 | // Copyright (c) 2014 Raffael Hannemann. All rights reserved.
7 | // Visit weAreYeah.com or follow @weareYeah for updates.
8 | //
9 | // Licensed under the BSD License
10 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
11 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
12 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
13 | // SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
14 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
15 | // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
16 | // BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
18 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19 | //
20 |
21 | // Please note: lots of the following code is copied from INAppStoreWindow by Indragie Karunaratne, et al.
22 |
23 | #import
24 |
25 | @class INWindowButton;
26 |
27 | /** This NSWindow subclass allows you to use create NSWindow that provide INAppStoreWindow like capabilities. The class switches between either WAYWindow or INAppStoreWindow at runtime based on the OS version. The way it is done is kind of experimental and currently only basic functionality of the original INAppStoreWindow is supported. Lots of INAppStoreWindow's properties probably do not work. Basically, only the functions that WAYWindow is implementing, are currently supported.
28 | */
29 | @interface WAYAppStoreWindow : NSWindow
30 |
31 | /** Note: The following properties are shamelessly copied from INAppStoreWindow. All credits to the author. We need to copy these properties here in order to get the same ivar layout in the class façade class. Please note that not all of the listed properties have an effect on OS X Yosemite, where WAYWindow will be used internally. */
32 |
33 | /**
34 | Prototype for a block used to implement custom drawing code for a window's title bar or bottom bar.
35 | @param drawsAsMainWindow Whether the window should be drawn in main state.
36 | @param drawingRect Drawing area of the window's title bar.
37 | @param edge NSMinYEdge to draw a bottom bar, NSMaxYEdge to draw a title bar.
38 | @param clippingPath Path to clip drawing according to window's rounded corners.
39 | */
40 | typedef void (^INAppStoreWindowBackgroundDrawingBlock)(BOOL drawsAsMainWindow, CGRect drawingRect,
41 | CGRectEdge edge, CGPathRef clippingPath);
42 |
43 | /**
44 | The height of the title bar. By default, this is set to the standard title bar height.
45 | */
46 | @property (nonatomic) CGFloat titleBarHeight;
47 |
48 | /**
49 | Container view for custom views added to the title bar.
50 |
51 | Add subviews to this view that you want to show in the title bar (e.g. buttons, a toolbar, etc.).
52 | This view can also be set if you want to use a different style title bar from the default one
53 | (textured, etc.).
54 | */
55 | @property (nonatomic, strong) NSView *titleBarView;
56 |
57 | /**
58 | The height of the bottom bar. By default, this is set to 0.
59 | */
60 | @property (nonatomic) CGFloat bottomBarHeight;
61 |
62 | /**
63 | Container view for custom views added to the bottom bar.
64 |
65 | Add subviews to this view that you want to show in the bottom bar (e.g. labels, sliders, etc.).
66 | This view can also be set if you want to use a different style bottom bar from the default one
67 | (textured, etc.).
68 | */
69 | @property (nonatomic, strong) NSView *bottomBarView;
70 |
71 | /**
72 | Whether the fullscreen button is vertically centered.
73 | */
74 | @property (nonatomic) BOOL centerFullScreenButton;
75 |
76 | /**
77 | Whether the traffic light buttons are vertically centered.
78 | */
79 | @property (nonatomic) BOOL centerTrafficLightButtons;
80 |
81 | /**
82 | Whether the traffic light buttons are displayed in vertical orientation.
83 | */
84 | @property (nonatomic) BOOL verticalTrafficLightButtons;
85 |
86 | /**
87 | Whether the title is centered vertically.
88 | */
89 | @property (nonatomic) BOOL verticallyCenterTitle;
90 |
91 | /**
92 | Whether to hide the title bar in fullscreen mode.
93 | */
94 | @property (nonatomic) BOOL hideTitleBarInFullScreen;
95 |
96 | /**
97 | Whether to display the baseline separator between the window's title bar and content area.
98 | */
99 | @property (nonatomic) BOOL showsBaselineSeparator;
100 |
101 | /**
102 | Whether to display the bottom separator between the window's bottom bar and content area.
103 | */
104 | @property (nonatomic) BOOL showsBottomBarSeparator;
105 |
106 | /**
107 | Distance between the traffic light buttons and the left edge of the window.
108 | */
109 | @property (nonatomic) CGFloat trafficLightButtonsLeftMargin;
110 |
111 | /**
112 | * Distance between the traffic light buttons and the top edge of the window.
113 | */
114 | @property (nonatomic) CGFloat trafficLightButtonsTopMargin;
115 |
116 | /**
117 | Distance between the fullscreen button and the right edge of the window.
118 | */
119 | @property (nonatomic) CGFloat fullScreenButtonRightMargin;
120 |
121 | /**
122 | Distance between the fullscreen button and the top edge of the window.
123 | */
124 | @property (nonatomic) CGFloat fullScreenButtonTopMargin;
125 |
126 | /**
127 | Spacing between the traffic light buttons.
128 | */
129 | @property (nonatomic) CGFloat trafficLightSeparation;
130 |
131 | /**
132 | Number of points in any direction above which the window will be allowed to reposition.
133 | A Higher value indicates coarser movements but much reduced CPU overhead. Defaults to 1.
134 | */
135 | @property (nonatomic) CGFloat mouseDragDetectionThreshold;
136 |
137 | /**
138 | Whether to show the window's title text. If \c YES, the title will be shown even if
139 | \a titleBarDrawingBlock is set. To draw the title manually, set this property to \c NO
140 | and draw the title using \a titleBarDrawingBlock.
141 | */
142 | @property (nonatomic) BOOL showsTitle;
143 |
144 | /**
145 | Whether to show the window's title text in fullscreen mode.
146 | */
147 | @property (nonatomic) BOOL showsTitleInFullscreen;
148 |
149 | /**
150 | Whether the window displays the document proxy icon (for document-based applications).
151 | */
152 | @property (nonatomic) BOOL showsDocumentProxyIcon;
153 |
154 | /**
155 | The button to use as the window's close button.
156 | If this property is nil, the default button will be used.
157 | */
158 | @property (nonatomic, strong) INWindowButton *closeButton;
159 |
160 | /**
161 | The button to use as the window's minimize button.
162 | If this property is nil, the default button will be used.
163 | */
164 | @property (nonatomic, strong) INWindowButton *minimizeButton;
165 |
166 | /**
167 | The button to use as the window's zoom button.
168 | If this property is nil, the default button will be used.
169 | */
170 | @property (nonatomic, strong) INWindowButton *zoomButton;
171 |
172 | /**
173 | The button to use as the window's fullscreen button.
174 | If this property is nil, the default button will be used.
175 | */
176 | @property (nonatomic, strong) INWindowButton *fullScreenButton;
177 |
178 | /**
179 | The divider line between the window title and document versions button.
180 | */
181 | @property (nonatomic, readonly) NSTextField *titleDivider;
182 |
183 | /**
184 | The font used to draw the window's title text.
185 | */
186 | @property (nonatomic, strong) NSFont *titleFont;
187 |
188 | /**
189 | Gradient used to draw the window's title bar, when the window is main.
190 |
191 | If this property is \c nil, the system gradient will be used.
192 | */
193 | @property (nonatomic, strong) NSGradient *titleBarGradient;
194 |
195 | /**
196 | Gradient used to draw the window's bottom bar, when the window is main.
197 |
198 | If this property is \c nil, the system gradient will be used.
199 | */
200 | @property (nonatomic, strong) NSGradient *bottomBarGradient;
201 |
202 | /**
203 | Color of the separator line between a window's title bar and content area,
204 | when the window is main.
205 |
206 | If this property is \c nil, the default color will be used.
207 | */
208 | @property (nonatomic, strong) NSColor *baselineSeparatorColor;
209 |
210 | /**
211 | Color of the window's title text, when the window is main.
212 |
213 | If this property is \c nil, the default color will be used.
214 | */
215 | @property (nonatomic, strong) NSColor *titleTextColor;
216 |
217 | /**
218 | Drop shadow under the window's title text, when the window is main.
219 |
220 | If this property is \c nil, the default shadow will be used.
221 | */
222 | @property (nonatomic, strong) NSShadow *titleTextShadow;
223 |
224 | /**
225 | Gradient used to draw the window's title bar, when the window is not main.
226 |
227 | If this property is \c nil, the system gradient will be used.
228 | */
229 | @property (nonatomic, strong) NSGradient *inactiveTitleBarGradient;
230 |
231 | /**
232 | Gradient used to draw the window's bottom bar, when the window is not main.
233 |
234 | If this property is \c nil, the system gradient will be used.
235 | */
236 | @property (nonatomic, strong) NSGradient *inactiveBottomBarGradient;
237 |
238 | /**
239 | Color of the separator line between a window's title bar and content area,
240 | when the window is not main.
241 |
242 | If this property is \c nil, the default color will be used.
243 | */
244 | @property (nonatomic, strong) NSColor *inactiveBaselineSeparatorColor;
245 |
246 | /**
247 | Color of the window's title text, when the window is not main.
248 |
249 | If this property is \c nil, the default color will be used.
250 | */
251 | @property (nonatomic, strong) NSColor *inactiveTitleTextColor;
252 |
253 | /**
254 | Drop shadow under the window's title text, when the window is not main.
255 |
256 | If this property is \c nil, the default shadow will be used.
257 | */
258 | @property (nonatomic, strong) NSShadow *inactiveTitleTextShadow;
259 |
260 | /**
261 | Block to override the drawing of the window title bar with a custom implementation.
262 | */
263 | @property (nonatomic, copy) INAppStoreWindowBackgroundDrawingBlock titleBarDrawingBlock;
264 |
265 | /**
266 | Block to override the drawing of the window bottom bar with a custom implementation.
267 | */
268 | @property (nonatomic, copy) INAppStoreWindowBackgroundDrawingBlock bottomBarDrawingBlock;
269 |
270 | /**
271 | Whether to draw a noise pattern overlay on the title bar on OS X 10.7-10.9. This
272 | property has no effect when running on OS X 10.10 or higher.
273 | */
274 | @property (nonatomic) BOOL drawsTitlePatternOverlay;
275 |
276 | @end
277 |
278 |
279 | @interface WAYAppStoreWindow (WAYWindowAdditionalInterfaces)
280 |
281 | /// Returns YES, if the class supports vibrant appearances. Can be used to determine if running on OS X 10.10+
282 | + (BOOL) supportsVibrantAppearances;
283 | /// If set to YES, the title of the window will be hidden.
284 | @property (nonatomic) IBInspectable BOOL hidesTitle;
285 |
286 | /// Replaces the window's content view with an instance of NSVisualEffectView and applies the Vibrant Dark look. Transfers all subviews to the new content view.
287 | - (void) setContentViewAppearanceVibrantDark;
288 |
289 | /// Replaces the window's content view with an instance of NSVisualEffectView and applies the Vibrant Light look. Transfers all subviews to the new content view.
290 | - (void) setContentViewAppearanceVibrantLight;
291 |
292 | /// Convenient method to set the NSAppearance of the window to NSAppearanceNameVibrantDark
293 | - (void) setVibrantDarkAppearance;
294 |
295 | /// Convenient method to set the NSAppearance of the window to NSAppearanceNameVibrantLight
296 | - (void) setVibrantLightAppearance;
297 |
298 | /// Convenient method to set the NSAppearance of the window to NSAppearanceNameVibrantAqua
299 | - (void) setAquaAppearance;
300 |
301 | /// Replaces a view of the window subview hierarchy with the specified view, and transfers all current subviews to the new one. The frame of the new view will be set to the frame of the old view, if flag is YES.
302 | - (void) replaceSubview: (NSView *) aView withView: (NSView *) newView resizing: (BOOL) flag;
303 |
304 | /// Replaces a view of the window subview hierarchy with a new view of the specified NSView class, and transfers all current subviews to the new one.
305 | - (NSView *) replaceSubview: (NSView *) aView withViewOfClass: (Class) newViewClass;
306 |
307 | /// Returns YES if the window is currently in full-screen.
308 | - (BOOL) isFullScreen;
309 |
310 | @end
--------------------------------------------------------------------------------
/WAYAppStoreWindowDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 4D06F6661A18CFC000B725C6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D06F6651A18CFC000B725C6 /* AppDelegate.m */; };
11 | 4D06F6681A18CFC000B725C6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D06F6671A18CFC000B725C6 /* main.m */; };
12 | 4D06F66A1A18CFC000B725C6 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4D06F6691A18CFC000B725C6 /* Images.xcassets */; };
13 | 4D06F66D1A18CFC000B725C6 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4D06F66B1A18CFC000B725C6 /* MainMenu.xib */; };
14 | 4D06F6961A18D1E100B725C6 /* INAppStoreWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D06F68F1A18D1E100B725C6 /* INAppStoreWindow.m */; };
15 | 4D06F6971A18D1E100B725C6 /* INWindowButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D06F6921A18D1E100B725C6 /* INWindowButton.m */; };
16 | 4D06F69B1A18D1FB00B725C6 /* WAYWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D06F69A1A18D1FB00B725C6 /* WAYWindow.m */; };
17 | 4D06F69F1A18D76E00B725C6 /* WAYAppStoreWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D06F69E1A18D76E00B725C6 /* WAYAppStoreWindow.m */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXFileReference section */
21 | 4D06F65F1A18CFC000B725C6 /* WAYAppStoreWindowDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WAYAppStoreWindowDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
22 | 4D06F6631A18CFC000B725C6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
23 | 4D06F6641A18CFC000B725C6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
24 | 4D06F6651A18CFC000B725C6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
25 | 4D06F6671A18CFC000B725C6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
26 | 4D06F6691A18CFC000B725C6 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
27 | 4D06F66C1A18CFC000B725C6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
28 | 4D06F68E1A18D1E100B725C6 /* INAppStoreWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INAppStoreWindow.h; sourceTree = ""; };
29 | 4D06F68F1A18D1E100B725C6 /* INAppStoreWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INAppStoreWindow.m; sourceTree = ""; };
30 | 4D06F6901A18D1E100B725C6 /* INAppStoreWindowCompatibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INAppStoreWindowCompatibility.h; sourceTree = ""; };
31 | 4D06F6911A18D1E100B725C6 /* INWindowButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = INWindowButton.h; sourceTree = ""; };
32 | 4D06F6921A18D1E100B725C6 /* INWindowButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = INWindowButton.m; sourceTree = ""; };
33 | 4D06F6991A18D1FB00B725C6 /* WAYWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WAYWindow.h; sourceTree = ""; };
34 | 4D06F69A1A18D1FB00B725C6 /* WAYWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WAYWindow.m; sourceTree = ""; };
35 | 4D06F69D1A18D76E00B725C6 /* WAYAppStoreWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WAYAppStoreWindow.h; sourceTree = ""; };
36 | 4D06F69E1A18D76E00B725C6 /* WAYAppStoreWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WAYAppStoreWindow.m; sourceTree = ""; };
37 | 4D06F6A01A18DC6D00B725C6 /* ADD INAppStoreWindow AND WAYWindow */ = {isa = PBXFileReference; lastKnownFileType = text; name = "ADD INAppStoreWindow AND WAYWindow"; path = "WAYAppStoreWindowDemo/ADD INAppStoreWindow AND WAYWindow"; sourceTree = ""; };
38 | /* End PBXFileReference section */
39 |
40 | /* Begin PBXFrameworksBuildPhase section */
41 | 4D06F65C1A18CFC000B725C6 /* Frameworks */ = {
42 | isa = PBXFrameworksBuildPhase;
43 | buildActionMask = 2147483647;
44 | files = (
45 | );
46 | runOnlyForDeploymentPostprocessing = 0;
47 | };
48 | /* End PBXFrameworksBuildPhase section */
49 |
50 | /* Begin PBXGroup section */
51 | 4D06F6561A18CFC000B725C6 = {
52 | isa = PBXGroup;
53 | children = (
54 | 4D06F6A01A18DC6D00B725C6 /* ADD INAppStoreWindow AND WAYWindow */,
55 | 4D06F6611A18CFC000B725C6 /* WAYAppStoreWindowDemo */,
56 | 4D06F6601A18CFC000B725C6 /* Products */,
57 | );
58 | sourceTree = "";
59 | };
60 | 4D06F6601A18CFC000B725C6 /* Products */ = {
61 | isa = PBXGroup;
62 | children = (
63 | 4D06F65F1A18CFC000B725C6 /* WAYAppStoreWindowDemo.app */,
64 | );
65 | name = Products;
66 | sourceTree = "";
67 | };
68 | 4D06F6611A18CFC000B725C6 /* WAYAppStoreWindowDemo */ = {
69 | isa = PBXGroup;
70 | children = (
71 | 4D06F69C1A18D76E00B725C6 /* WAYAppStoreWindow */,
72 | 4D06F6981A18D1FB00B725C6 /* WAYWindow */,
73 | 4D06F6861A18D1E100B725C6 /* INAppStoreWindow */,
74 | 4D06F6641A18CFC000B725C6 /* AppDelegate.h */,
75 | 4D06F6651A18CFC000B725C6 /* AppDelegate.m */,
76 | 4D06F6691A18CFC000B725C6 /* Images.xcassets */,
77 | 4D06F66B1A18CFC000B725C6 /* MainMenu.xib */,
78 | 4D06F6621A18CFC000B725C6 /* Supporting Files */,
79 | );
80 | path = WAYAppStoreWindowDemo;
81 | sourceTree = "";
82 | };
83 | 4D06F6621A18CFC000B725C6 /* Supporting Files */ = {
84 | isa = PBXGroup;
85 | children = (
86 | 4D06F6631A18CFC000B725C6 /* Info.plist */,
87 | 4D06F6671A18CFC000B725C6 /* main.m */,
88 | );
89 | name = "Supporting Files";
90 | sourceTree = "";
91 | };
92 | 4D06F6861A18D1E100B725C6 /* INAppStoreWindow */ = {
93 | isa = PBXGroup;
94 | children = (
95 | 4D06F68E1A18D1E100B725C6 /* INAppStoreWindow.h */,
96 | 4D06F68F1A18D1E100B725C6 /* INAppStoreWindow.m */,
97 | 4D06F6901A18D1E100B725C6 /* INAppStoreWindowCompatibility.h */,
98 | 4D06F6911A18D1E100B725C6 /* INWindowButton.h */,
99 | 4D06F6921A18D1E100B725C6 /* INWindowButton.m */,
100 | );
101 | name = INAppStoreWindow;
102 | path = "../../../../../Downloads/INAppStoreWindow-master/INAppStoreWindow";
103 | sourceTree = "";
104 | };
105 | 4D06F6981A18D1FB00B725C6 /* WAYWindow */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 4D06F6991A18D1FB00B725C6 /* WAYWindow.h */,
109 | 4D06F69A1A18D1FB00B725C6 /* WAYWindow.m */,
110 | );
111 | name = WAYWindow;
112 | path = ../../WAYWindow/WAYWindow;
113 | sourceTree = "";
114 | };
115 | 4D06F69C1A18D76E00B725C6 /* WAYAppStoreWindow */ = {
116 | isa = PBXGroup;
117 | children = (
118 | 4D06F69D1A18D76E00B725C6 /* WAYAppStoreWindow.h */,
119 | 4D06F69E1A18D76E00B725C6 /* WAYAppStoreWindow.m */,
120 | );
121 | path = WAYAppStoreWindow;
122 | sourceTree = SOURCE_ROOT;
123 | };
124 | /* End PBXGroup section */
125 |
126 | /* Begin PBXNativeTarget section */
127 | 4D06F65E1A18CFC000B725C6 /* WAYAppStoreWindowDemo */ = {
128 | isa = PBXNativeTarget;
129 | buildConfigurationList = 4D06F67C1A18CFC100B725C6 /* Build configuration list for PBXNativeTarget "WAYAppStoreWindowDemo" */;
130 | buildPhases = (
131 | 4D06F65B1A18CFC000B725C6 /* Sources */,
132 | 4D06F65C1A18CFC000B725C6 /* Frameworks */,
133 | 4D06F65D1A18CFC000B725C6 /* Resources */,
134 | );
135 | buildRules = (
136 | );
137 | dependencies = (
138 | );
139 | name = WAYAppStoreWindowDemo;
140 | productName = WAYAppStoreWindowDemo;
141 | productReference = 4D06F65F1A18CFC000B725C6 /* WAYAppStoreWindowDemo.app */;
142 | productType = "com.apple.product-type.application";
143 | };
144 | /* End PBXNativeTarget section */
145 |
146 | /* Begin PBXProject section */
147 | 4D06F6571A18CFC000B725C6 /* Project object */ = {
148 | isa = PBXProject;
149 | attributes = {
150 | LastUpgradeCheck = 0610;
151 | ORGANIZATIONNAME = "We Are Yeah!";
152 | TargetAttributes = {
153 | 4D06F65E1A18CFC000B725C6 = {
154 | CreatedOnToolsVersion = 6.1;
155 | };
156 | };
157 | };
158 | buildConfigurationList = 4D06F65A1A18CFC000B725C6 /* Build configuration list for PBXProject "WAYAppStoreWindowDemo" */;
159 | compatibilityVersion = "Xcode 3.2";
160 | developmentRegion = English;
161 | hasScannedForEncodings = 0;
162 | knownRegions = (
163 | en,
164 | Base,
165 | );
166 | mainGroup = 4D06F6561A18CFC000B725C6;
167 | productRefGroup = 4D06F6601A18CFC000B725C6 /* Products */;
168 | projectDirPath = "";
169 | projectRoot = "";
170 | targets = (
171 | 4D06F65E1A18CFC000B725C6 /* WAYAppStoreWindowDemo */,
172 | );
173 | };
174 | /* End PBXProject section */
175 |
176 | /* Begin PBXResourcesBuildPhase section */
177 | 4D06F65D1A18CFC000B725C6 /* Resources */ = {
178 | isa = PBXResourcesBuildPhase;
179 | buildActionMask = 2147483647;
180 | files = (
181 | 4D06F66A1A18CFC000B725C6 /* Images.xcassets in Resources */,
182 | 4D06F66D1A18CFC000B725C6 /* MainMenu.xib in Resources */,
183 | );
184 | runOnlyForDeploymentPostprocessing = 0;
185 | };
186 | /* End PBXResourcesBuildPhase section */
187 |
188 | /* Begin PBXSourcesBuildPhase section */
189 | 4D06F65B1A18CFC000B725C6 /* Sources */ = {
190 | isa = PBXSourcesBuildPhase;
191 | buildActionMask = 2147483647;
192 | files = (
193 | 4D06F69F1A18D76E00B725C6 /* WAYAppStoreWindow.m in Sources */,
194 | 4D06F69B1A18D1FB00B725C6 /* WAYWindow.m in Sources */,
195 | 4D06F6681A18CFC000B725C6 /* main.m in Sources */,
196 | 4D06F6961A18D1E100B725C6 /* INAppStoreWindow.m in Sources */,
197 | 4D06F6971A18D1E100B725C6 /* INWindowButton.m in Sources */,
198 | 4D06F6661A18CFC000B725C6 /* AppDelegate.m in Sources */,
199 | );
200 | runOnlyForDeploymentPostprocessing = 0;
201 | };
202 | /* End PBXSourcesBuildPhase section */
203 |
204 | /* Begin PBXVariantGroup section */
205 | 4D06F66B1A18CFC000B725C6 /* MainMenu.xib */ = {
206 | isa = PBXVariantGroup;
207 | children = (
208 | 4D06F66C1A18CFC000B725C6 /* Base */,
209 | );
210 | name = MainMenu.xib;
211 | sourceTree = "";
212 | };
213 | /* End PBXVariantGroup section */
214 |
215 | /* Begin XCBuildConfiguration section */
216 | 4D06F67A1A18CFC100B725C6 /* Debug */ = {
217 | isa = XCBuildConfiguration;
218 | buildSettings = {
219 | ALWAYS_SEARCH_USER_PATHS = NO;
220 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
221 | CLANG_CXX_LIBRARY = "libc++";
222 | CLANG_ENABLE_MODULES = YES;
223 | CLANG_ENABLE_OBJC_ARC = YES;
224 | CLANG_WARN_BOOL_CONVERSION = YES;
225 | CLANG_WARN_CONSTANT_CONVERSION = YES;
226 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
227 | CLANG_WARN_EMPTY_BODY = YES;
228 | CLANG_WARN_ENUM_CONVERSION = YES;
229 | CLANG_WARN_INT_CONVERSION = YES;
230 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
231 | CLANG_WARN_UNREACHABLE_CODE = YES;
232 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
233 | CODE_SIGN_IDENTITY = "-";
234 | COPY_PHASE_STRIP = NO;
235 | ENABLE_STRICT_OBJC_MSGSEND = YES;
236 | GCC_C_LANGUAGE_STANDARD = gnu99;
237 | GCC_DYNAMIC_NO_PIC = NO;
238 | GCC_OPTIMIZATION_LEVEL = 0;
239 | GCC_PREPROCESSOR_DEFINITIONS = (
240 | "DEBUG=1",
241 | "$(inherited)",
242 | );
243 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
244 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
245 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
246 | GCC_WARN_UNDECLARED_SELECTOR = YES;
247 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
248 | GCC_WARN_UNUSED_FUNCTION = YES;
249 | GCC_WARN_UNUSED_VARIABLE = YES;
250 | MACOSX_DEPLOYMENT_TARGET = 10.10;
251 | MTL_ENABLE_DEBUG_INFO = YES;
252 | ONLY_ACTIVE_ARCH = YES;
253 | SDKROOT = macosx;
254 | };
255 | name = Debug;
256 | };
257 | 4D06F67B1A18CFC100B725C6 /* Release */ = {
258 | isa = XCBuildConfiguration;
259 | buildSettings = {
260 | ALWAYS_SEARCH_USER_PATHS = NO;
261 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
262 | CLANG_CXX_LIBRARY = "libc++";
263 | CLANG_ENABLE_MODULES = YES;
264 | CLANG_ENABLE_OBJC_ARC = YES;
265 | CLANG_WARN_BOOL_CONVERSION = YES;
266 | CLANG_WARN_CONSTANT_CONVERSION = YES;
267 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
268 | CLANG_WARN_EMPTY_BODY = YES;
269 | CLANG_WARN_ENUM_CONVERSION = YES;
270 | CLANG_WARN_INT_CONVERSION = YES;
271 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
272 | CLANG_WARN_UNREACHABLE_CODE = YES;
273 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
274 | CODE_SIGN_IDENTITY = "-";
275 | COPY_PHASE_STRIP = YES;
276 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
277 | ENABLE_NS_ASSERTIONS = NO;
278 | ENABLE_STRICT_OBJC_MSGSEND = YES;
279 | GCC_C_LANGUAGE_STANDARD = gnu99;
280 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
281 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
282 | GCC_WARN_UNDECLARED_SELECTOR = YES;
283 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
284 | GCC_WARN_UNUSED_FUNCTION = YES;
285 | GCC_WARN_UNUSED_VARIABLE = YES;
286 | MACOSX_DEPLOYMENT_TARGET = 10.10;
287 | MTL_ENABLE_DEBUG_INFO = NO;
288 | SDKROOT = macosx;
289 | };
290 | name = Release;
291 | };
292 | 4D06F67D1A18CFC100B725C6 /* Debug */ = {
293 | isa = XCBuildConfiguration;
294 | buildSettings = {
295 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
296 | COMBINE_HIDPI_IMAGES = YES;
297 | INFOPLIST_FILE = WAYAppStoreWindowDemo/Info.plist;
298 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
299 | PRODUCT_NAME = "$(TARGET_NAME)";
300 | };
301 | name = Debug;
302 | };
303 | 4D06F67E1A18CFC100B725C6 /* Release */ = {
304 | isa = XCBuildConfiguration;
305 | buildSettings = {
306 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
307 | COMBINE_HIDPI_IMAGES = YES;
308 | INFOPLIST_FILE = WAYAppStoreWindowDemo/Info.plist;
309 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
310 | PRODUCT_NAME = "$(TARGET_NAME)";
311 | };
312 | name = Release;
313 | };
314 | /* End XCBuildConfiguration section */
315 |
316 | /* Begin XCConfigurationList section */
317 | 4D06F65A1A18CFC000B725C6 /* Build configuration list for PBXProject "WAYAppStoreWindowDemo" */ = {
318 | isa = XCConfigurationList;
319 | buildConfigurations = (
320 | 4D06F67A1A18CFC100B725C6 /* Debug */,
321 | 4D06F67B1A18CFC100B725C6 /* Release */,
322 | );
323 | defaultConfigurationIsVisible = 0;
324 | defaultConfigurationName = Release;
325 | };
326 | 4D06F67C1A18CFC100B725C6 /* Build configuration list for PBXNativeTarget "WAYAppStoreWindowDemo" */ = {
327 | isa = XCConfigurationList;
328 | buildConfigurations = (
329 | 4D06F67D1A18CFC100B725C6 /* Debug */,
330 | 4D06F67E1A18CFC100B725C6 /* Release */,
331 | );
332 | defaultConfigurationIsVisible = 0;
333 | defaultConfigurationName = Release;
334 | };
335 | /* End XCConfigurationList section */
336 | };
337 | rootObject = 4D06F6571A18CFC000B725C6 /* Project object */;
338 | }
339 |
--------------------------------------------------------------------------------
/WAYAppStoreWindowDemo/Base.lproj/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
--------------------------------------------------------------------------------