Skip to content
This repository has been archived by the owner on Aug 31, 2019. It is now read-only.

Commit

Permalink
Pixate button
Browse files Browse the repository at this point in the history
  • Loading branch information
Reda Lemeden committed Jan 21, 2013
1 parent c5c875c commit 9a99c66
Show file tree
Hide file tree
Showing 78 changed files with 3,981 additions and 23 deletions.
43 changes: 43 additions & 0 deletions Custom UIButtons.xcodeproj/project.pbxproj
Expand Up @@ -42,11 +42,27 @@
9D9738F6162834C500F1E992 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D9738EC162834C500F1E992 /* Icon@2x.png */; };
9D9738F7162834C500F1E992 /* iTunesArtwork.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D9738ED162834C500F1E992 /* iTunesArtwork.png */; };
9D9738F8162834C500F1E992 /* iTunesArtwork@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D9738EE162834C500F1E992 /* iTunesArtwork@2x.png */; };
9DA9096F16ADD4CE0029BA1B /* PXEngine.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DA9096E16ADD4CE0029BA1B /* PXEngine.framework */; };
9DA9097616ADDDD30029BA1B /* default.scss in Resources */ = {isa = PBXBuildFile; fileRef = 9DA9097516ADDDD30029BA1B /* default.scss */; };
9DAEF93E1621E71B002B0242 /* CBBezier.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DAEF93D1621E71B002B0242 /* CBBezier.m */; };
9DDA94DF161F4B0F0099D9C3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DDA94DE161F4B0F0099D9C3 /* QuartzCore.framework */; };
9DDA94F5161F68C90099D9C3 /* CBLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DDA94F4161F68C90099D9C3 /* CBLayer.m */; };
/* End PBXBuildFile section */

/* Begin PBXBuildRule section */
9DA9097416ADDC3E0029BA1B /* PBXBuildRule */ = {
isa = PBXBuildRule;
compilerSpec = com.apple.compilers.proxy.script;
filePatterns = "*.scss";
fileType = pattern.proxy;
isEditable = 1;
outputFiles = (
"${TARGET_BUILD_DIR}/${INPUT_FILE_BASE}.css",
);
script = "source /Users/reda/.rvm/environments/default\n${GEM_HOME}/bin/sass \"${INPUT_FILE_PATH}\" ${TARGET_BUILD_DIR}/${INPUT_FILE_BASE}.css";
};
/* End PBXBuildRule section */

/* Begin PBXContainerItemProxy section */
9D5AADB21618F5F90000EF26 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
Expand Down Expand Up @@ -100,6 +116,9 @@
9D9738EC162834C500F1E992 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
9D9738ED162834C500F1E992 /* iTunesArtwork.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = iTunesArtwork.png; sourceTree = "<group>"; };
9D9738EE162834C500F1E992 /* iTunesArtwork@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "iTunesArtwork@2x.png"; sourceTree = "<group>"; };
9DA9096E16ADD4CE0029BA1B /* PXEngine.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PXEngine.framework; sourceTree = "<group>"; };
9DA9097116ADD6110029BA1B /* LicenseInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LicenseInfo.h; sourceTree = "<group>"; };
9DA9097516ADDDD30029BA1B /* default.scss */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = default.scss; sourceTree = "<group>"; };
9DAEF93C1621E71B002B0242 /* CBBezier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CBBezier.h; sourceTree = "<group>"; };
9DAEF93D1621E71B002B0242 /* CBBezier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CBBezier.m; sourceTree = "<group>"; };
9DDA94DE161F4B0F0099D9C3 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
Expand All @@ -116,6 +135,7 @@
9D5AAD8B1618F5F90000EF26 /* UIKit.framework in Frameworks */,
9D5AAD8D1618F5F90000EF26 /* Foundation.framework in Frameworks */,
9D5AAD8F1618F5F90000EF26 /* CoreGraphics.framework in Frameworks */,
9DA9096F16ADD4CE0029BA1B /* PXEngine.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -154,6 +174,7 @@
9D5AAD891618F5F90000EF26 /* Frameworks */ = {
isa = PBXGroup;
children = (
9DA9096E16ADD4CE0029BA1B /* PXEngine.framework */,
9DDA94DE161F4B0F0099D9C3 /* QuartzCore.framework */,
9D5AAD8A1618F5F90000EF26 /* UIKit.framework */,
9D5AAD8C1618F5F90000EF26 /* Foundation.framework */,
Expand Down Expand Up @@ -185,11 +206,13 @@
9D5AAD911618F5F90000EF26 /* Supporting Files */ = {
isa = PBXGroup;
children = (
9DA9097716ADDDE00029BA1B /* Sass */,
9D9738E4162834B400F1E992 /* Images */,
9D5AAD921618F5F90000EF26 /* Custom UIButtons-Info.plist */,
9D5AAD931618F5F90000EF26 /* InfoPlist.strings */,
9D5AAD961618F5F90000EF26 /* main.m */,
9D5AAD981618F5F90000EF26 /* Custom UIButtons-Prefix.pch */,
9DA9097116ADD6110029BA1B /* LicenseInfo.h */,
);
name = "Supporting Files";
sourceTree = "<group>";
Expand Down Expand Up @@ -241,6 +264,14 @@
name = Images;
sourceTree = "<group>";
};
9DA9097716ADDDE00029BA1B /* Sass */ = {
isa = PBXGroup;
children = (
9DA9097516ADDDD30029BA1B /* default.scss */,
);
name = Sass;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -253,6 +284,7 @@
9D5AAD841618F5F90000EF26 /* Resources */,
);
buildRules = (
9DA9097416ADDC3E0029BA1B /* PBXBuildRule */,
);
dependencies = (
);
Expand Down Expand Up @@ -336,6 +368,7 @@
9D9738F6162834C500F1E992 /* Icon@2x.png in Resources */,
9D9738F7162834C500F1E992 /* iTunesArtwork.png in Resources */,
9D9738F8162834C500F1E992 /* iTunesArtwork@2x.png in Resources */,
9DA9097616ADDDD30029BA1B /* default.scss in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -448,6 +481,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
OTHER_LDFLAGS = "-ObjC";
SDKROOT = iphoneos;
};
name = Debug;
Expand All @@ -469,6 +503,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
OTHER_LDFLAGS = "-ObjC";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
Expand All @@ -477,6 +512,10 @@
9D5AADC01618F5F90000EF26 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Custom UIButtons/Custom UIButtons-Prefix.pch";
INFOPLIST_FILE = "Custom UIButtons/Custom UIButtons-Info.plist";
Expand All @@ -488,6 +527,10 @@
9D5AADC11618F5F90000EF26 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Custom UIButtons/Custom UIButtons-Prefix.pch";
INFOPLIST_FILE = "Custom UIButtons/Custom UIButtons-Info.plist";
Expand Down
5 changes: 5 additions & 0 deletions Custom UIButtons/CBAppDelegate.m
Expand Up @@ -7,12 +7,17 @@
//

#import "CBAppDelegate.h"
#import <PXEngine/PXEngine.h>
#import "LicenseInfo.h"

@implementation CBAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[PXEngine licenseKey:@LICENSE_SERIAL forUser:@LICENSE_EMAIL];
[PXStylesheet currentApplicationStylesheet].monitorChanges = YES;
NSLog(@"%@", [PXStylesheet currentApplicationStylesheet].filePath);
return YES;
}

Expand Down
4 changes: 4 additions & 0 deletions Custom UIButtons/LicenseInfo.h
@@ -0,0 +1,4 @@

#define LICENSE_EMAIL "Pixate_Engine_RC"

#define LICENSE_SERIAL "BPHH1-P6IJG-EAT0R-9IL2J-4K70S-8E5GO-JHD1V-GO6AP-6C0U0-J621U-9ATQ7-C0SP7-SE6I3-9G6F2-JQ71R-VK" // Exp 2/1/13
22 changes: 22 additions & 0 deletions Custom UIButtons/default.scss
@@ -0,0 +1,22 @@
%button-style {
border-color: rgba(190.00, 103.00, 0.00, 1.00);
border-radius: 5px;
border-width: 1px;
box-shadow: inset 0 1.5px 0 rgba(255.00, 255.00, 255.00, 0.5), inset 0 -1.5px 0 rgba(255.00, 255.00, 255.00, 0.5), inset -1.5px 0 0 rgba(255.00, 255.00, 255.00, 0.5), inset 1.5px 0 0 rgba(255.00, 255.00, 255.00, 0.5);
font-family: "Avenir Next Condensed";
color: rgba(128.00, 64.00, 0.00, 1.00);
font-size: 19px;
font-weight: bold;
height: 37px;
}

#pixateButton {
@extend %button-style;
background-color: linear-gradient(rgba(222.00, 141.00, 0.00, 1.00), rgba(234.00, 201.00, 71.00, 1.00));


&:highlighted {
@extend %button-style;
background-color: linear-gradient(rgba(234.00, 201.00, 71.00, 1.00), rgba(222.00, 141.00, 0.00, 1.00));
}
}
63 changes: 40 additions & 23 deletions Custom UIButtons/en.lproj/MainStoryboard.storyboard
Expand Up @@ -19,24 +19,11 @@
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="wDh-la-ziX">
<rect key="frame" x="20" y="108" width="280" height="37"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-DemiBold" family="Avenir Next Condensed" pointSize="19"/>
<size key="titleShadowOffset" width="0.0" height="1"/>
<state key="normal" title="Full sized image" backgroundImage="button.png">
<color key="titleColor" red="0.50196081400000003" green="0.25098040700000002" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted" backgroundImage="buttonHighlighted.png">
<color key="titleColor" red="0.50196081400000003" green="0.25098040700000002" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" red="1" green="0.80000001190000003" blue="0.40000000600000002" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="uIT-MX-1PF">
<rect key="frame" x="20" y="164" width="280" height="37"/>
<rect key="frame" x="20" y="106" width="280" height="37"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-DemiBold" family="Avenir Next Condensed" pointSize="19"/>
<size key="titleShadowOffset" width="0.0" height="1"/>
<state key="normal" title="Full sized image (code)">
<state key="normal" title="Full sized image">
<color key="titleColor" red="0.50196081400000003" green="0.25098040700000002" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
Expand All @@ -46,7 +33,7 @@
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="XCA-Kj-Jbf">
<rect key="frame" x="20" y="219" width="280" height="37"/>
<rect key="frame" x="20" y="161" width="280" height="37"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-DemiBold" family="Avenir Next Condensed" pointSize="19"/>
<size key="titleShadowOffset" width="0.0" height="1"/>
<state key="normal" title="Resizable Image">
Expand All @@ -59,7 +46,7 @@
</state>
</button>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="lme-0S-ubJ" customClass="CBLayer">
<rect key="frame" x="20" y="293" width="280" height="37"/>
<rect key="frame" x="20" y="235" width="280" height="37"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-DemiBold" family="Avenir Next Condensed" pointSize="19"/>
<size key="titleShadowOffset" width="0.0" height="1"/>
<state key="normal" title="CALayer">
Expand All @@ -72,7 +59,7 @@
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="0gz-0a-1GT" customClass="CBBezier">
<rect key="frame" x="20" y="348" width="280" height="37"/>
<rect key="frame" x="20" y="290" width="280" height="37"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-DemiBold" family="Avenir Next Condensed" pointSize="19"/>
<size key="titleShadowOffset" width="0.0" height="1"/>
<state key="normal" title="drawRect &amp; CGContext">
Expand All @@ -85,7 +72,7 @@
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="5Ep-or-v8B" customClass="CBHybrid">
<rect key="frame" x="20" y="404" width="280" height="37"/>
<rect key="frame" x="20" y="346" width="280" height="37"/>
<fontDescription key="fontDescription" name="AvenirNextCondensed-DemiBold" family="Avenir Next Condensed" pointSize="19"/>
<size key="titleShadowOffset" width="0.0" height="1"/>
<state key="normal" title="CGContext-generated image">
Expand All @@ -97,6 +84,22 @@
<color key="titleShadowColor" red="1" green="0.80000001190000003" blue="0.40000000600000002" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="thz-uI-CtR">
<rect key="frame" x="20" y="405" width="280" height="37"/>
<fontDescription key="fontDescription" type="boldSystem" size="button"/>
<size key="titleShadowOffset" width="0.0" height="1"/>
<state key="normal" title="Pixate">
<color key="titleColor" red="0.19607843137254902" green="0.30980392156862746" blue="0.52156862745098043" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" red="1" green="0.96563622329999999" blue="0.74741437980000003" alpha="1" colorSpace="calibratedRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleId" value="pixateButton"/>
</userDefinedRuntimeAttributes>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
Expand All @@ -109,10 +112,24 @@
</objects>
</scene>
</scenes>
<resources>
<image name="button.png" width="280" height="36"/>
<image name="buttonHighlighted.png" width="280" height="36"/>
</resources>
<classes>
<class className="CBBezier" superclassName="UIButton">
<source key="sourceIdentifier" type="project" relativePath="./Classes/CBBezier.h"/>
</class>
<class className="CBHybrid" superclassName="UIButton">
<source key="sourceIdentifier" type="project" relativePath="./Classes/CBHybrid.h"/>
</class>
<class className="CBLayer" superclassName="UIButton">
<source key="sourceIdentifier" type="project" relativePath="./Classes/CBLayer.h"/>
</class>
<class className="CBViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/CBViewController.h"/>
<relationships>
<relationship kind="outlet" name="fullSizeImage" candidateClass="UIButton"/>
<relationship kind="outlet" name="resizableImage" candidateClass="UIButton"/>
</relationships>
</class>
</classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
Expand Down
1 change: 1 addition & 0 deletions PXEngine.framework/Headers
1 change: 1 addition & 0 deletions PXEngine.framework/PXEngine
1 change: 1 addition & 0 deletions PXEngine.framework/PrivateHeaders
1 change: 1 addition & 0 deletions PXEngine.framework/Resources
@@ -0,0 +1,16 @@
//
// NSDictionary+PXCSSEncoding.h
// PXEngine
//
// !WARNING! Do not include this header file directly in your application.
// This file is not part of the public Pixate API and will likely change.
//
// Created by Paul Colton on 12/18/12.
// Copyright (c) 2012 Pixate, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDictionary (PXCSSEncoding)
-(NSString *)toCSS;
@end
38 changes: 38 additions & 0 deletions PXEngine.framework/Versions/0.1/Headers/PXArc.h
@@ -0,0 +1,38 @@
//
// PXArc.h
// PXEngine
//
// Created by Kevin Lindsey on 9/4/12.
// Copyright (c) 2012 Pixate, Inc. All rights reserved.
//

#import "PXShape.h"

/**
* A PXShape subclass used to render arcs
*/
@interface PXArc : PXShape

/**
* A point indicating the location of the center of this arc.
*/
@property (nonatomic) CGPoint center;

/**
* A value indicating the size of the radius of this arc.
*
* This value may be negative, but it will be normalized to a positive value.
*/
@property (nonatomic) CGFloat radius;

/**
* A value indicating the starting angle for this arc
*/
@property (nonatomic) CGFloat startingAngle;

/**
* A value indicating the ending angle for this arc
*/
@property (nonatomic) CGFloat endingAngle;

@end
21 changes: 21 additions & 0 deletions PXEngine.framework/Versions/0.1/Headers/PXBoundable.h
@@ -0,0 +1,21 @@
//
// PXBoundable.h
// PXEngine
//
// Created by Kevin Lindsey on 12/19/12.
// Copyright (c) 2012 Pixate, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
* The PXBoundable interface indicates that a class conforming to this protcol can have its bounds set and retrieved
*/
@protocol PXBoundable <NSObject>

/**
* The bounds of this rectangle
*/
@property (nonatomic) CGRect bounds;

@end

0 comments on commit 9a99c66

Please sign in to comment.