Skip to content

Commit abca01e

Browse files
committed
PureLayout initial commit
0 parents  commit abca01e

File tree

59 files changed

+6407
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+6407
-0
lines changed

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: objective-c
2+
xcode_project: Example/Example.xcodeproj
3+
matrix:
4+
include:
5+
- xcode_sdk: iphonesimulator
6+
xcode_scheme: Example-iOS
7+
- xcode_sdk: macosx
8+
xcode_scheme: Example-Mac
9+
before_install:
10+
- brew update
11+
- brew upgrade xctool
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//
2+
// ALMacAppDelegate.h
3+
// PureLayout Example-Mac
4+
//
5+
// Copyright (c) 2014 Tyler Fox
6+
// https://github.com/smileyborg/PureLayout
7+
//
8+
9+
@interface ALMacAppDelegate : NSResponder <NSApplicationDelegate, NSWindowDelegate>
10+
11+
@end
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
//
2+
// ALMacAppDelegate.m
3+
// PureLayout Example-Mac
4+
//
5+
// Copyright (c) 2014 Tyler Fox
6+
// https://github.com/smileyborg/PureLayout
7+
//
8+
9+
#import "ALMacAppDelegate.h"
10+
#import "ALMacViewController.h"
11+
12+
@interface ALMacAppDelegate ()
13+
14+
@property (weak, nonatomic) IBOutlet NSWindow *window;
15+
@property (strong, nonatomic) ALMacViewController *viewController;
16+
17+
@end
18+
19+
@implementation ALMacAppDelegate
20+
21+
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
22+
{
23+
self.viewController = [[ALMacViewController alloc] initWithNibName:nil bundle:nil];
24+
self.viewController.view.frame = CGRectMake(0, 0, CGRectGetWidth(self.window.frame), CGRectGetHeight(self.window.frame));
25+
[self.window.contentView addSubview:self.viewController.view];
26+
[self.window makeFirstResponder:self];
27+
self.window.delegate = self;
28+
}
29+
30+
- (void)applicationWillTerminate:(NSNotification *)aNotification
31+
{
32+
// Insert code here to tear down your application
33+
}
34+
35+
- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize
36+
{
37+
self.viewController.view.frame = CGRectMake(0, 0, frameSize.width, frameSize.height);
38+
return frameSize;
39+
}
40+
41+
- (void)keyDown:(NSEvent *)theEvent
42+
{
43+
// Press any key to advance to the next demo
44+
[self.viewController nextDemo];
45+
}
46+
47+
@end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// ALMacViewController.h
3+
// PureLayout Example-Mac
4+
//
5+
// Copyright (c) 2014 Tyler Fox
6+
// https://github.com/smileyborg/PureLayout
7+
//
8+
9+
@interface ALMacViewController : NSViewController
10+
11+
- (void)nextDemo;
12+
13+
@end

0 commit comments

Comments
 (0)