forked from SnapKit/Masonry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
702 additions
and
223 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
69 changes: 69 additions & 0 deletions
69
Masonry.xcodeproj/xcshareddata/xcschemes/Masonry Mac.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "0460" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "DDA4D6EA17C0253B0076BD87" | ||
BuildableName = "Masonry Mac.framework" | ||
BlueprintName = "Masonry Mac" | ||
ReferencedContainer = "container:Masonry.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
buildConfiguration = "Debug"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "DDA4D70017C0253B0076BD87" | ||
BuildableName = "Masonry Mac Tests.octest" | ||
BlueprintName = "Masonry Mac Tests" | ||
ReferencedContainer = "container:Masonry.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
buildConfiguration = "Debug" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
allowLocationSimulation = "YES"> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
buildConfiguration = "Release" | ||
debugDocumentVersioning = "YES"> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// | ||
// MASUtilities.h | ||
// Masonry | ||
// | ||
// Created by Jonas Budelmann on 19/08/13. | ||
// Copyright (c) 2013 Jonas Budelmann. All rights reserved. | ||
// | ||
|
||
#if TARGET_OS_IPHONE | ||
|
||
#import <UIKit/UIKit.h> | ||
#define MAS_VIEW UIView | ||
#define MASEdgeInsets UIEdgeInsets | ||
|
||
enum { | ||
MASLayoutPriorityRequired = UILayoutPriorityRequired, | ||
MASLayoutPriorityDefaultHigh = UILayoutPriorityDefaultHigh, | ||
MASLayoutPriorityDefaultMedium = 500, | ||
MASLayoutPriorityDefaultLow = UILayoutPriorityDefaultLow, | ||
MASLayoutPriorityFittingSizeLevel = UILayoutPriorityFittingSizeLevel, | ||
}; | ||
typedef float MASLayoutPriority; | ||
|
||
#elif TARGET_OS_MAC | ||
|
||
#import <AppKit/AppKit.h> | ||
#define MAS_VIEW NSView | ||
#define MASEdgeInsets NSEdgeInsets | ||
|
||
enum { | ||
MASLayoutPriorityRequired = NSLayoutPriorityRequired, | ||
MASLayoutPriorityDefaultHigh = NSLayoutPriorityDefaultHigh, | ||
MASLayoutPriorityDragThatCanResizeWindow = NSLayoutPriorityDragThatCanResizeWindow, | ||
MASLayoutPriorityDefaultMedium = 501, | ||
MASLayoutPriorityWindowSizeStayPut = NSLayoutPriorityWindowSizeStayPut, | ||
MASLayoutPriorityDragThatCannotResizeWindow = NSLayoutPriorityDragThatCannotResizeWindow, | ||
MASLayoutPriorityDefaultLow = NSLayoutPriorityDefaultLow, | ||
MASLayoutPriorityFittingSizeCompression = NSLayoutPriorityFittingSizeCompression, | ||
}; | ||
typedef float MASLayoutPriority; | ||
|
||
#endif | ||
|
||
/** | ||
* Allows you to attach keys to objects matching the variable names passed. | ||
* | ||
* view1.mas_key = @"view1", view2.mas_key = @"view2"; | ||
* | ||
* is equivalent to: | ||
* | ||
* MASAttachKeys(view1, view2); | ||
*/ | ||
#define MASAttachKeys(...) \ | ||
NSDictionary *keyPairs = NSDictionaryOfVariableBindings(__VA_ARGS__); \ | ||
for (id key in keyPairs.allKeys) { \ | ||
id obj = keyPairs[key]; \ | ||
NSAssert([obj respondsToSelector:@selector(setMas_key:)], \ | ||
@"Cannot attach mas_key to %@", obj); \ | ||
[obj setMas_key:key]; \ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.