Created
November 28, 2012 04:25
-
-
Save mayoff/4159014 to your computer and use it in GitHub Desktop.
UIView subclass that draws an inner shadow in a rounded rectangle
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
// For an explanation of this code, see: | |
// http://stackoverflow.com/questions/13595284/cgcontextcliptomask-not-clipping | |
#import <UIKit/UIKit.h> | |
@interface InnerShadowView : UIView | |
@property (nonatomic, strong) UIColor *fillColor; | |
@property (nonatomic) CGFloat cornerRadius; | |
@property (nonatomic, strong) UIColor *shadowColor; | |
@property (nonatomic) CGSize shadowOffset; | |
@property (nonatomic) CGFloat shadowBlur; | |
@end |
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
#import "InnerShadowView.h" | |
@implementation InnerShadowView | |
- (UIViewContentMode)contentMode { | |
return UIViewContentModeRedraw; | |
} | |
- (void)setFillColor:(UIColor *)fillColor { | |
_fillColor = fillColor; | |
[self setNeedsDisplay]; | |
} | |
- (void)setCornerRadius:(CGFloat)cornerRadius { | |
_cornerRadius = cornerRadius; | |
[self setNeedsDisplay]; | |
} | |
- (void)setShadowBlur:(CGFloat)shadowBlur { | |
_shadowBlur = shadowBlur; | |
[self setNeedsDisplay]; | |
} | |
- (void)setShadowColor:(UIColor *)shadowColor { | |
_shadowColor = shadowColor; | |
[self setNeedsDisplay]; | |
} | |
- (void)setShadowOffset:(CGSize)shadowOffset { | |
_shadowOffset = shadowOffset; | |
[self setNeedsDisplay]; | |
} | |
- (void)drawRect:(CGRect)rect { | |
[self fillIfNeeded]; | |
[self drawShadowIfNeeded]; | |
} | |
- (void)fillIfNeeded { | |
UIColor *color = self.fillColor; | |
if (!color) | |
return; | |
[color setFill]; | |
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:self.bounds | |
cornerRadius:self.cornerRadius]; | |
[path fill]; | |
} | |
- (void)drawShadowIfNeeded { | |
UIColor *color = self.shadowColor; | |
if (!color) | |
return; | |
CGContextRef gc = UIGraphicsGetCurrentContext(); | |
CGContextSaveGState(gc); { | |
[[UIBezierPath bezierPathWithRoundedRect:self.bounds | |
cornerRadius:self.cornerRadius] addClip]; | |
UIBezierPath *invertedPath = [UIBezierPath bezierPathWithRect:CGRectInfinite]; | |
[invertedPath appendPath:[UIBezierPath bezierPathWithRoundedRect: | |
CGRectInset(self.bounds, -1, -1) cornerRadius:self.cornerRadius]]; | |
invertedPath.usesEvenOddFillRule = YES; | |
CGContextSetShadowWithColor(UIGraphicsGetCurrentContext(), | |
self.shadowOffset, self.shadowBlur, color.CGColor); | |
[[UIColor blackColor] setFill]; | |
[invertedPath fill]; | |
} CGContextRestoreGState(gc); | |
} | |
@end |
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
#import "ViewController.h" | |
#import "InnerShadowView.h" | |
@interface ViewController () | |
@end | |
@implementation ViewController { | |
IBOutlet InnerShadowView *innerShadowView_; | |
IBOutlet UISlider *cornerRadiusSlider_; | |
IBOutlet UISlider *shadowBlurSlider_; | |
IBOutlet UISlider *shadowXOffsetSlider_; | |
IBOutlet UISlider *shadowYOffsetSlider_; | |
IBOutlet UISlider *shadowAlphaSlider_; | |
} | |
- (void)viewDidLoad { | |
innerShadowView_.fillColor = [UIColor whiteColor]; | |
[self updateInnerShadowViewPropertiesFromControls]; | |
} | |
- (IBAction)controlDidChange { | |
[self updateInnerShadowViewPropertiesFromControls]; | |
} | |
- (void)updateInnerShadowViewPropertiesFromControls { | |
innerShadowView_.cornerRadius = cornerRadiusSlider_.value; | |
innerShadowView_.shadowBlur = shadowBlurSlider_.value; | |
innerShadowView_.shadowOffset = CGSizeMake(shadowXOffsetSlider_.value, shadowYOffsetSlider_.value); | |
innerShadowView_.shadowColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:shadowAlphaSlider_.value]; | |
} | |
@end |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00"> | |
<data> | |
<int key="IBDocument.SystemTarget">1536</int> | |
<string key="IBDocument.SystemVersion">12C60</string> | |
<string key="IBDocument.InterfaceBuilderVersion">2844</string> | |
<string key="IBDocument.AppKitVersion">1187.34</string> | |
<string key="IBDocument.HIToolboxVersion">625.00</string> | |
<object class="NSMutableDictionary" key="IBDocument.PluginVersions"> | |
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="NS.object.0">1930</string> | |
</object> | |
<array key="IBDocument.IntegratedClassDependencies"> | |
<string>IBNSLayoutConstraint</string> | |
<string>IBProxyObject</string> | |
<string>IBUISlider</string> | |
<string>IBUIView</string> | |
</array> | |
<array key="IBDocument.PluginDependencies"> | |
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
</array> | |
<object class="NSMutableDictionary" key="IBDocument.Metadata"> | |
<string key="NS.key.0">PluginDependencyRecalculationVersion</string> | |
<integer value="1" key="NS.object.0"/> | |
</object> | |
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> | |
<object class="IBProxyObject" id="372490531"> | |
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string> | |
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | |
</object> | |
<object class="IBProxyObject" id="843779117"> | |
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string> | |
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | |
</object> | |
<object class="IBUIView" id="774585933"> | |
<reference key="NSNextResponder"/> | |
<int key="NSvFlags">274</int> | |
<array class="NSMutableArray" key="NSSubviews"> | |
<object class="IBUIView" id="865902466"> | |
<reference key="NSNextResponder" ref="774585933"/> | |
<int key="NSvFlags">274</int> | |
<string key="NSFrame">{{20, 20}, {280, 270}}</string> | |
<reference key="NSSuperview" ref="774585933"/> | |
<reference key="NSWindow"/> | |
<reference key="NSNextKeyView" ref="284473550"/> | |
<string key="NSReuseIdentifierKey">_NS:9</string> | |
<object class="NSColor" key="IBUIBackgroundColor"> | |
<int key="NSColorSpace">3</int> | |
<bytes key="NSWhite">MCAwAA</bytes> | |
</object> | |
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | |
</object> | |
<object class="IBUISlider" id="920642888"> | |
<reference key="NSNextResponder" ref="774585933"/> | |
<int key="NSvFlags">292</int> | |
<string key="NSFrame">{{18, 418}, {284, 23}}</string> | |
<reference key="NSSuperview" ref="774585933"/> | |
<reference key="NSWindow"/> | |
<reference key="NSNextKeyView"/> | |
<string key="NSReuseIdentifierKey">_NS:9</string> | |
<bool key="IBUIOpaque">NO</bool> | |
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | |
<int key="IBUIContentHorizontalAlignment">0</int> | |
<int key="IBUIContentVerticalAlignment">0</int> | |
<float key="IBUIMinValue">-20</float> | |
<float key="IBUIMaxValue">20</float> | |
</object> | |
<object class="IBUISlider" id="507123824"> | |
<reference key="NSNextResponder" ref="774585933"/> | |
<int key="NSvFlags">292</int> | |
<string key="NSFrame">{{18, 388}, {284, 23}}</string> | |
<reference key="NSSuperview" ref="774585933"/> | |
<reference key="NSWindow"/> | |
<reference key="NSNextKeyView" ref="920642888"/> | |
<string key="NSReuseIdentifierKey">_NS:9</string> | |
<bool key="IBUIOpaque">NO</bool> | |
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | |
<int key="IBUIContentHorizontalAlignment">0</int> | |
<int key="IBUIContentVerticalAlignment">0</int> | |
<float key="IBUIMinValue">-20</float> | |
<float key="IBUIMaxValue">20</float> | |
</object> | |
<object class="IBUISlider" id="914872164"> | |
<reference key="NSNextResponder" ref="774585933"/> | |
<int key="NSvFlags">292</int> | |
<string key="NSFrame">{{18, 358}, {284, 23}}</string> | |
<reference key="NSSuperview" ref="774585933"/> | |
<reference key="NSWindow"/> | |
<reference key="NSNextKeyView" ref="507123824"/> | |
<string key="NSReuseIdentifierKey">_NS:9</string> | |
<bool key="IBUIOpaque">NO</bool> | |
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | |
<int key="IBUIContentHorizontalAlignment">0</int> | |
<int key="IBUIContentVerticalAlignment">0</int> | |
<float key="IBUIValue">8</float> | |
<float key="IBUIMaxValue">20</float> | |
</object> | |
<object class="IBUISlider" id="1018721691"> | |
<reference key="NSNextResponder" ref="774585933"/> | |
<int key="NSvFlags">292</int> | |
<string key="NSFrame">{{18, 328}, {284, 23}}</string> | |
<reference key="NSSuperview" ref="774585933"/> | |
<reference key="NSWindow"/> | |
<reference key="NSNextKeyView" ref="914872164"/> | |
<string key="NSReuseIdentifierKey">_NS:9</string> | |
<bool key="IBUIOpaque">NO</bool> | |
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | |
<int key="IBUIContentHorizontalAlignment">0</int> | |
<int key="IBUIContentVerticalAlignment">0</int> | |
<float key="IBUIValue">8</float> | |
<float key="IBUIMaxValue">40</float> | |
</object> | |
<object class="IBUISlider" id="284473550"> | |
<reference key="NSNextResponder" ref="774585933"/> | |
<int key="NSvFlags">292</int> | |
<string key="NSFrame">{{18, 298}, {284, 23}}</string> | |
<reference key="NSSuperview" ref="774585933"/> | |
<reference key="NSWindow"/> | |
<reference key="NSNextKeyView" ref="1018721691"/> | |
<string key="NSReuseIdentifierKey">_NS:9</string> | |
<bool key="IBUIOpaque">NO</bool> | |
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | |
<int key="IBUIContentHorizontalAlignment">0</int> | |
<int key="IBUIContentVerticalAlignment">0</int> | |
<float key="IBUIValue">0.40000000596046448</float> | |
</object> | |
</array> | |
<string key="NSFrame">{{0, 20}, {320, 460}}</string> | |
<reference key="NSSuperview"/> | |
<reference key="NSWindow"/> | |
<reference key="NSNextKeyView" ref="865902466"/> | |
<object class="NSColor" key="IBUIBackgroundColor"> | |
<int key="NSColorSpace">3</int> | |
<bytes key="NSWhite">MC43NQA</bytes> | |
<object class="NSColorSpace" key="NSCustomColorSpace"> | |
<int key="NSID">2</int> | |
</object> | |
</object> | |
<bool key="IBUIClearsContextBeforeDrawing">NO</bool> | |
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> | |
<object class="IBUIScreenMetrics" key="IBUISimulatedDestinationMetrics"> | |
<string key="IBUISimulatedSizeMetricsClass">IBUIScreenMetrics</string> | |
<object class="NSMutableDictionary" key="IBUINormalizedOrientationToSizeMap"> | |
<bool key="EncodedWithXMLCoder">YES</bool> | |
<array key="dict.sortedKeys"> | |
<integer value="1"/> | |
<integer value="3"/> | |
</array> | |
<array key="dict.values"> | |
<string>{320, 480}</string> | |
<string>{480, 320}</string> | |
</array> | |
</object> | |
<string key="IBUITargetRuntime">IBCocoaTouchFramework</string> | |
<string key="IBUIDisplayName">Retina 3.5 Full Screen</string> | |
<int key="IBUIType">0</int> | |
</object> | |
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | |
</object> | |
</array> | |
<object class="IBObjectContainer" key="IBDocument.Objects"> | |
<array class="NSMutableArray" key="connectionRecords"> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchOutletConnection" key="connection"> | |
<string key="label">view</string> | |
<reference key="source" ref="372490531"/> | |
<reference key="destination" ref="774585933"/> | |
</object> | |
<int key="connectionID">7</int> | |
</object> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchOutletConnection" key="connection"> | |
<string key="label">innerShadowView_</string> | |
<reference key="source" ref="372490531"/> | |
<reference key="destination" ref="865902466"/> | |
</object> | |
<int key="connectionID">40</int> | |
</object> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchOutletConnection" key="connection"> | |
<string key="label">cornerRadiusSlider_</string> | |
<reference key="source" ref="372490531"/> | |
<reference key="destination" ref="1018721691"/> | |
</object> | |
<int key="connectionID">41</int> | |
</object> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchOutletConnection" key="connection"> | |
<string key="label">shadowBlurSlider_</string> | |
<reference key="source" ref="372490531"/> | |
<reference key="destination" ref="914872164"/> | |
</object> | |
<int key="connectionID">42</int> | |
</object> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchOutletConnection" key="connection"> | |
<string key="label">shadowXOffsetSlider_</string> | |
<reference key="source" ref="372490531"/> | |
<reference key="destination" ref="507123824"/> | |
</object> | |
<int key="connectionID">43</int> | |
</object> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchOutletConnection" key="connection"> | |
<string key="label">shadowYOffsetSlider_</string> | |
<reference key="source" ref="372490531"/> | |
<reference key="destination" ref="920642888"/> | |
</object> | |
<int key="connectionID">44</int> | |
</object> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchOutletConnection" key="connection"> | |
<string key="label">shadowAlphaSlider_</string> | |
<reference key="source" ref="372490531"/> | |
<reference key="destination" ref="284473550"/> | |
</object> | |
<int key="connectionID">58</int> | |
</object> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchEventConnection" key="connection"> | |
<string key="label">controlDidChange</string> | |
<reference key="source" ref="920642888"/> | |
<reference key="destination" ref="372490531"/> | |
<int key="IBEventType">13</int> | |
</object> | |
<int key="connectionID">48</int> | |
</object> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchEventConnection" key="connection"> | |
<string key="label">controlDidChange</string> | |
<reference key="source" ref="507123824"/> | |
<reference key="destination" ref="372490531"/> | |
<int key="IBEventType">13</int> | |
</object> | |
<int key="connectionID">47</int> | |
</object> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchEventConnection" key="connection"> | |
<string key="label">controlDidChange</string> | |
<reference key="source" ref="914872164"/> | |
<reference key="destination" ref="372490531"/> | |
<int key="IBEventType">13</int> | |
</object> | |
<int key="connectionID">46</int> | |
</object> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchEventConnection" key="connection"> | |
<string key="label">controlDidChange</string> | |
<reference key="source" ref="1018721691"/> | |
<reference key="destination" ref="372490531"/> | |
<int key="IBEventType">13</int> | |
</object> | |
<int key="connectionID">45</int> | |
</object> | |
<object class="IBConnectionRecord"> | |
<object class="IBCocoaTouchEventConnection" key="connection"> | |
<string key="label">controlDidChange</string> | |
<reference key="source" ref="284473550"/> | |
<reference key="destination" ref="372490531"/> | |
<int key="IBEventType">13</int> | |
</object> | |
<int key="connectionID">51</int> | |
</object> | |
</array> | |
<object class="IBMutableOrderedSet" key="objectRecords"> | |
<array key="orderedObjects"> | |
<object class="IBObjectRecord"> | |
<int key="objectID">0</int> | |
<array key="object" id="0"/> | |
<reference key="children" ref="1000"/> | |
<nil key="parent"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">-1</int> | |
<reference key="object" ref="372490531"/> | |
<reference key="parent" ref="0"/> | |
<string key="objectName">File's Owner</string> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">-2</int> | |
<reference key="object" ref="843779117"/> | |
<reference key="parent" ref="0"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">6</int> | |
<reference key="object" ref="774585933"/> | |
<array class="NSMutableArray" key="children"> | |
<object class="IBNSLayoutConstraint" id="704804072"> | |
<reference key="firstItem" ref="920642888"/> | |
<int key="firstAttribute">3</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="507123824"/> | |
<int key="secondAttribute">4</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">8</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">6</int> | |
<float key="scoringTypeFloat">24</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="271345452"> | |
<reference key="firstItem" ref="774585933"/> | |
<int key="firstAttribute">4</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="920642888"/> | |
<int key="secondAttribute">4</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="488309750"> | |
<reference key="firstItem" ref="774585933"/> | |
<int key="firstAttribute">6</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="920642888"/> | |
<int key="secondAttribute">6</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="834285420"> | |
<reference key="firstItem" ref="920642888"/> | |
<int key="firstAttribute">5</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="774585933"/> | |
<int key="secondAttribute">5</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="8043151"> | |
<reference key="firstItem" ref="507123824"/> | |
<int key="firstAttribute">3</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="914872164"/> | |
<int key="secondAttribute">4</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">8</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">6</int> | |
<float key="scoringTypeFloat">24</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="311791479"> | |
<reference key="firstItem" ref="774585933"/> | |
<int key="firstAttribute">6</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="507123824"/> | |
<int key="secondAttribute">6</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="539818182"> | |
<reference key="firstItem" ref="507123824"/> | |
<int key="firstAttribute">5</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="774585933"/> | |
<int key="secondAttribute">5</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="815452465"> | |
<reference key="firstItem" ref="914872164"/> | |
<int key="firstAttribute">3</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="1018721691"/> | |
<int key="secondAttribute">4</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">8</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">6</int> | |
<float key="scoringTypeFloat">24</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="571865150"> | |
<reference key="firstItem" ref="774585933"/> | |
<int key="firstAttribute">6</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="914872164"/> | |
<int key="secondAttribute">6</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="24803293"> | |
<reference key="firstItem" ref="914872164"/> | |
<int key="firstAttribute">5</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="774585933"/> | |
<int key="secondAttribute">5</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="182107642"> | |
<reference key="firstItem" ref="1018721691"/> | |
<int key="firstAttribute">3</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="284473550"/> | |
<int key="secondAttribute">4</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">8</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">6</int> | |
<float key="scoringTypeFloat">24</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="921281125"> | |
<reference key="firstItem" ref="774585933"/> | |
<int key="firstAttribute">6</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="1018721691"/> | |
<int key="secondAttribute">6</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="692713408"> | |
<reference key="firstItem" ref="1018721691"/> | |
<int key="firstAttribute">5</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="774585933"/> | |
<int key="secondAttribute">5</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="799485025"> | |
<reference key="firstItem" ref="284473550"/> | |
<int key="firstAttribute">3</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="865902466"/> | |
<int key="secondAttribute">4</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">8</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">6</int> | |
<float key="scoringTypeFloat">24</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="665609453"> | |
<reference key="firstItem" ref="284473550"/> | |
<int key="firstAttribute">5</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="774585933"/> | |
<int key="secondAttribute">5</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="720792593"> | |
<reference key="firstItem" ref="774585933"/> | |
<int key="firstAttribute">6</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="284473550"/> | |
<int key="secondAttribute">6</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="784328494"> | |
<reference key="firstItem" ref="774585933"/> | |
<int key="firstAttribute">6</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="865902466"/> | |
<int key="secondAttribute">6</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="528612361"> | |
<reference key="firstItem" ref="865902466"/> | |
<int key="firstAttribute">3</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="774585933"/> | |
<int key="secondAttribute">3</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<object class="IBNSLayoutConstraint" id="112257781"> | |
<reference key="firstItem" ref="865902466"/> | |
<int key="firstAttribute">5</int> | |
<int key="relation">0</int> | |
<reference key="secondItem" ref="774585933"/> | |
<int key="secondAttribute">5</int> | |
<float key="multiplier">1</float> | |
<object class="IBNSLayoutSymbolicConstant" key="constant"> | |
<double key="value">20</double> | |
</object> | |
<float key="priority">1000</float> | |
<reference key="containingView" ref="774585933"/> | |
<int key="scoringType">8</int> | |
<float key="scoringTypeFloat">29</float> | |
<int key="contentType">3</int> | |
</object> | |
<reference ref="865902466"/> | |
<reference ref="920642888"/> | |
<reference ref="914872164"/> | |
<reference ref="1018721691"/> | |
<reference ref="507123824"/> | |
<reference ref="284473550"/> | |
</array> | |
<reference key="parent" ref="0"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">8</int> | |
<reference key="object" ref="865902466"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">16</int> | |
<reference key="object" ref="112257781"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">18</int> | |
<reference key="object" ref="528612361"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">19</int> | |
<reference key="object" ref="784328494"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">21</int> | |
<reference key="object" ref="920642888"/> | |
<array class="NSMutableArray" key="children"/> | |
<reference key="parent" ref="774585933"/> | |
<string key="objectName">Slider - Shadow Y Offset</string> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">22</int> | |
<reference key="object" ref="834285420"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">25</int> | |
<reference key="object" ref="488309750"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">26</int> | |
<reference key="object" ref="271345452"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">27</int> | |
<reference key="object" ref="507123824"/> | |
<reference key="parent" ref="774585933"/> | |
<string key="objectName">Slider - Shadow X Offset</string> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">28</int> | |
<reference key="object" ref="539818182"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">29</int> | |
<reference key="object" ref="311791479"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">30</int> | |
<reference key="object" ref="704804072"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">31</int> | |
<reference key="object" ref="914872164"/> | |
<reference key="parent" ref="774585933"/> | |
<string key="objectName">Slider - Shadow Blur</string> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">32</int> | |
<reference key="object" ref="8043151"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">33</int> | |
<reference key="object" ref="24803293"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">34</int> | |
<reference key="object" ref="571865150"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">35</int> | |
<reference key="object" ref="1018721691"/> | |
<reference key="parent" ref="774585933"/> | |
<string key="objectName">Slider - Corner Radius</string> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">36</int> | |
<reference key="object" ref="692713408"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">37</int> | |
<reference key="object" ref="815452465"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">38</int> | |
<reference key="object" ref="921281125"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">50</int> | |
<reference key="object" ref="284473550"/> | |
<reference key="parent" ref="774585933"/> | |
<string key="objectName">Slider - Shadow Alpha</string> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">52</int> | |
<reference key="object" ref="720792593"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">53</int> | |
<reference key="object" ref="665609453"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">54</int> | |
<reference key="object" ref="182107642"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
<object class="IBObjectRecord"> | |
<int key="objectID">56</int> | |
<reference key="object" ref="799485025"/> | |
<reference key="parent" ref="774585933"/> | |
</object> | |
</array> | |
</object> | |
<dictionary class="NSMutableDictionary" key="flattenedProperties"> | |
<string key="-1.CustomClassName">ViewController</string> | |
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="-2.CustomClassName">UIResponder</string> | |
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="16.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="18.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="19.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<boolean value="NO" key="21.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> | |
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="25.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="26.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="27.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<boolean value="NO" key="27.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> | |
<string key="28.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="29.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="30.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="31.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<boolean value="NO" key="31.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> | |
<string key="32.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="33.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="34.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="35.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<boolean value="NO" key="35.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> | |
<string key="36.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="37.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="38.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="50.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<boolean value="NO" key="50.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> | |
<string key="52.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="53.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="54.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="56.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<array class="NSMutableArray" key="6.IBViewMetadataConstraints"> | |
<reference ref="112257781"/> | |
<reference ref="528612361"/> | |
<reference ref="784328494"/> | |
<reference ref="720792593"/> | |
<reference ref="665609453"/> | |
<reference ref="799485025"/> | |
<reference ref="692713408"/> | |
<reference ref="921281125"/> | |
<reference ref="182107642"/> | |
<reference ref="24803293"/> | |
<reference ref="571865150"/> | |
<reference ref="815452465"/> | |
<reference ref="539818182"/> | |
<reference ref="311791479"/> | |
<reference ref="8043151"/> | |
<reference ref="834285420"/> | |
<reference ref="488309750"/> | |
<reference ref="271345452"/> | |
<reference ref="704804072"/> | |
</array> | |
<string key="8.CustomClassName">InnerShadowView</string> | |
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | |
<boolean value="NO" key="8.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> | |
</dictionary> | |
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/> | |
<nil key="activeLocalization"/> | |
<dictionary class="NSMutableDictionary" key="localizations"/> | |
<nil key="sourceID"/> | |
<int key="maxID">58</int> | |
</object> | |
<object class="IBClassDescriber" key="IBDocument.Classes"> | |
<array class="NSMutableArray" key="referencedPartialClassDescriptions"> | |
<object class="IBPartialClassDescription"> | |
<string key="className">InnerShadowView</string> | |
<string key="superclassName">UIView</string> | |
<object class="IBClassDescriptionSource" key="sourceIdentifier"> | |
<string key="majorKey">IBProjectSource</string> | |
<string key="minorKey">./Classes/InnerShadowView.h</string> | |
</object> | |
</object> | |
<object class="IBPartialClassDescription"> | |
<string key="className">NSLayoutConstraint</string> | |
<string key="superclassName">NSObject</string> | |
<object class="IBClassDescriptionSource" key="sourceIdentifier"> | |
<string key="majorKey">IBProjectSource</string> | |
<string key="minorKey">./Classes/NSLayoutConstraint.h</string> | |
</object> | |
</object> | |
<object class="IBPartialClassDescription"> | |
<string key="className">ViewController</string> | |
<string key="superclassName">UIViewController</string> | |
<dictionary class="NSMutableDictionary" key="outlets"> | |
<string key="cornerRadiusSlider_">UISlider</string> | |
<string key="innerShadowView_">InnerShadowView</string> | |
<string key="shadowAlphaSlider_">UISlider</string> | |
<string key="shadowBlurSlider_">UISlider</string> | |
<string key="shadowXOffsetSlider_">UISlider</string> | |
<string key="shadowYOffsetSlider_">UISlider</string> | |
</dictionary> | |
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> | |
<object class="IBToOneOutletInfo" key="cornerRadiusSlider_"> | |
<string key="name">cornerRadiusSlider_</string> | |
<string key="candidateClassName">UISlider</string> | |
</object> | |
<object class="IBToOneOutletInfo" key="innerShadowView_"> | |
<string key="name">innerShadowView_</string> | |
<string key="candidateClassName">InnerShadowView</string> | |
</object> | |
<object class="IBToOneOutletInfo" key="shadowAlphaSlider_"> | |
<string key="name">shadowAlphaSlider_</string> | |
<string key="candidateClassName">UISlider</string> | |
</object> | |
<object class="IBToOneOutletInfo" key="shadowBlurSlider_"> | |
<string key="name">shadowBlurSlider_</string> | |
<string key="candidateClassName">UISlider</string> | |
</object> | |
<object class="IBToOneOutletInfo" key="shadowXOffsetSlider_"> | |
<string key="name">shadowXOffsetSlider_</string> | |
<string key="candidateClassName">UISlider</string> | |
</object> | |
<object class="IBToOneOutletInfo" key="shadowYOffsetSlider_"> | |
<string key="name">shadowYOffsetSlider_</string> | |
<string key="candidateClassName">UISlider</string> | |
</object> | |
</dictionary> | |
<object class="IBClassDescriptionSource" key="sourceIdentifier"> | |
<string key="majorKey">IBProjectSource</string> | |
<string key="minorKey">./Classes/ViewController.h</string> | |
</object> | |
</object> | |
</array> | |
</object> | |
<int key="IBDocument.localizationMode">0</int> | |
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> | |
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> | |
<int key="IBDocument.defaultPropertyAccessControl">3</int> | |
<bool key="IBDocument.UseAutolayout">YES</bool> | |
<string key="IBCocoaTouchPluginVersion">1930</string> | |
</data> | |
</archive> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment