Skip to content

Commit

Permalink
Update the project to the iOS7 layout
Browse files Browse the repository at this point in the history
  • Loading branch information
dulacp committed Mar 30, 2014
1 parent 0868f32 commit 595e9bb
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 56 deletions.
11 changes: 11 additions & 0 deletions Example/Example.xcodeproj/project.pbxproj
Expand Up @@ -243,6 +243,11 @@
CLASSPREFIX = DP;
LastUpgradeCheck = 0450;
ORGANIZATIONNAME = "Pierre Dulac";
TargetAttributes = {
BE7C401816B580E900A4581F = {
DevelopmentTeam = 3YE8W98TRS;
};
};
};
buildConfigurationList = BE7C401316B580E900A4581F /* Build configuration list for PBXProject "Example" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -457,6 +462,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = A8A68A268D814A758AA0783B /* Pods.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Example-Prefix.pch";
INFOPLIST_FILE = "$(SRCROOT)/Example-Info.plist";
Expand All @@ -469,6 +476,7 @@
"$(XCODE_TEST_LDFLAGS)",
);
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
WRAPPER_EXTENSION = app;
};
name = Debug;
Expand All @@ -477,6 +485,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = A8A68A268D814A758AA0783B /* Pods.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Example-Prefix.pch";
INFOPLIST_FILE = "$(SRCROOT)/Example-Info.plist";
Expand All @@ -489,6 +499,7 @@
"$(XCODE_TEST_LDFLAGS)",
);
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
WRAPPER_EXTENSION = app;
};
name = Release;
Expand Down
1 change: 0 additions & 1 deletion Example/ViewController.h
Expand Up @@ -19,7 +19,6 @@
@property (strong, nonatomic) IBOutlet DPMeterView *shape2View;
@property (strong, nonatomic) IBOutlet DPMeterView *shape3View;
@property (strong, nonatomic) IBOutlet DPMeterView *shape4View;
@property (strong, nonatomic) IBOutlet DPMeterView *shape5View;

@property (strong, nonatomic) IBOutlet UILabel *orientationLabel;
@property (strong, nonatomic) IBOutlet UISlider *orientationSlider;
Expand Down
34 changes: 14 additions & 20 deletions Example/ViewController.m
Expand Up @@ -48,13 +48,9 @@ - (void)viewDidLoad
[self.shape4View setShape:[UIBezierPath stars:3 shapeInFrame:self.shape4View.frame].CGPath];
self.shape4View.progressTintColor = [UIColor colorWithRed:255/255.f green:199/255.f blue:87/255.f alpha:1.f];

// shape 5 -- Progress
[self.shape5View setMeterType:DPMeterTypeLinearHorizontal];
self.shape5View.progressTintColor = [UIColor colorWithRed:216/255.f green:147/255.f blue:48/255.f alpha:1.f];
self.shape5View.trackTintColor = [UIColor colorWithRed:231/255.f green:190/255.f blue:132/255.f alpha:1.f];
[self.shape5View setShape:[UIBezierPath bezierPathWithRoundedRect:self.shape5View.bounds cornerRadius:0.f].CGPath];
[self.shape5View.layer setBorderWidth:1.f];
[self.shape5View.layer setBorderColor:[UIColor colorWithRed:195/255.f green:129/255.f blue:35/255.f alpha:1.f].CGColor];
// swith on the gravity
self.gravitySwitch.on = YES;
[self toggleGravity:nil];
}

- (void)viewDidAppear:(BOOL)animated
Expand All @@ -73,20 +69,18 @@ - (NSArray *)shapeViews
{
NSMutableArray *shapeViews = [NSMutableArray array];

if (self.shape1View && [self.shape1View isKindOfClass:[DPMeterView class]])
[shapeViews addObject:self.shape1View];
NSArray *candidateViews = @[
self.shape1View,
self.shape2View,
self.shape3View,
self.shape4View,
];

if (self.shape2View && [self.shape2View isKindOfClass:[DPMeterView class]])
[shapeViews addObject:self.shape2View];

if (self.shape3View && [self.shape3View isKindOfClass:[DPMeterView class]])
[shapeViews addObject:self.shape3View];

if (self.shape4View && [self.shape4View isKindOfClass:[DPMeterView class]])
[shapeViews addObject:self.shape4View];

if (self.shape5View && [self.shape5View isKindOfClass:[DPMeterView class]])
[shapeViews addObject:self.shape5View];
for (UIView *view in candidateViews) {
if ([view isKindOfClass:[DPMeterView class]]) {
[shapeViews addObject:view];
}
}

return [NSArray arrayWithArray:shapeViews];
}
Expand Down
43 changes: 8 additions & 35 deletions Example/en.lproj/MainStoryboard_iPhone.storyboard
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12C60" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="ctV-om-1OA">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5053" systemVersion="13B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="ctV-om-1OA">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
<deployment defaultVersion="1536" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
</dependencies>
<scenes>
<!--View Controller - 0%-->
Expand All @@ -13,7 +14,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<switch opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" id="WNw-te-XMl">
<rect key="frame" x="217" y="369" width="79" height="27"/>
<rect key="frame" x="245" y="365" width="51" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
<connections>
<action selector="toggleGravity:" destination="2" eventType="valueChanged" id="D7s-EF-8Q9"/>
Expand Down Expand Up @@ -42,12 +43,7 @@
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" id="FqW-iP-08z" customClass="DPMeterView">
<rect key="frame" x="172" y="184" width="120" height="48"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" id="QK2-4K-HHo" customClass="DPMeterView">
<rect key="frame" x="172" y="257" width="120" height="36"/>
<rect key="frame" x="172" y="209" width="120" height="48"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
</view>
Expand All @@ -59,7 +55,7 @@
<nil key="highlightedColor"/>
</label>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="90" minValue="0.0" maxValue="360" id="Gsu-lc-d7f">
<rect key="frame" x="178" y="335" width="118" height="23"/>
<rect key="frame" x="178" y="329" width="118" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES"/>
<connections>
<action selector="orientationHasChanged:" destination="2" eventType="valueChanged" id="AOS-Gu-b1M"/>
Expand All @@ -68,6 +64,7 @@
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
<navigationItem key="navigationItem" title="0%" id="Pal-fU-2is">
<barButtonItem key="leftBarButtonItem" title="Decrease" id="wrj-FE-hdE">
<connections>
Expand All @@ -88,7 +85,6 @@
<outlet property="shape2View" destination="Sti-2F-04i" id="97O-o6-ZSx"/>
<outlet property="shape3View" destination="gEE-MX-mkn" id="exo-mg-A5k"/>
<outlet property="shape4View" destination="FqW-iP-08z" id="s7A-Kw-Ub9"/>
<outlet property="shape5View" destination="QK2-4K-HHo" id="pj1-F2-5o5"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
Expand All @@ -114,32 +110,9 @@
<point key="canvasLocation" x="272" y="125"/>
</scene>
</scenes>
<classes>
<class className="DPMeterView" superclassName="UIView">
<source key="sourceIdentifier" type="project" relativePath="./Classes/DPMeterView.h"/>
</class>
<class className="ViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/ViewController.h"/>
<relationships>
<relationship kind="action" name="add:"/>
<relationship kind="action" name="minus:"/>
<relationship kind="action" name="orientationHasChanged:"/>
<relationship kind="action" name="toggleGravity:"/>
<relationship kind="outlet" name="gravitySwitch" candidateClass="UISwitch"/>
<relationship kind="outlet" name="navigationBar" candidateClass="UINavigationBar"/>
<relationship kind="outlet" name="orientationLabel" candidateClass="UILabel"/>
<relationship kind="outlet" name="orientationSlider" candidateClass="UISlider"/>
<relationship kind="outlet" name="shape1View" candidateClass="DPMeterView"/>
<relationship kind="outlet" name="shape2View" candidateClass="DPMeterView"/>
<relationship kind="outlet" name="shape3View" candidateClass="DPMeterView"/>
<relationship kind="outlet" name="shape4View" candidateClass="DPMeterView"/>
<relationship kind="outlet" name="shape5View" candidateClass="DPMeterView"/>
</relationships>
</class>
</classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
</document>
</document>

0 comments on commit 595e9bb

Please sign in to comment.