Skip to content

Commit

Permalink
iPhone6/6Plus support
Browse files Browse the repository at this point in the history
  • Loading branch information
shu223 committed Oct 19, 2014
1 parent 7ee5bff commit dfd98f2
Show file tree
Hide file tree
Showing 54 changed files with 1,129 additions and 653 deletions.
9 changes: 3 additions & 6 deletions iOS7Sampler.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
8A7BF3B117ED8B43004EF216 /* vendor */,
8A7BF29617ED5392004EF216 /* Resources */,
8A7BF1C617ED384C004EF216 /* iOS7Sampler */,
8A7BF1C717ED384C004EF216 /* Supporting Files */,
8A7BF1E817ED384C004EF216 /* iOS7SamplerTests */,
8A7BF1BF17ED384C004EF216 /* Frameworks */,
8A7BF1BE17ED384B004EF216 /* Products */,
Expand Down Expand Up @@ -420,7 +421,6 @@
8A7BF1D617ED384C004EF216 /* MasterViewController.m */,
8A7BF1D217ED384C004EF216 /* Main.storyboard */,
8A7BF1DB17ED384C004EF216 /* Images.xcassets */,
8A7BF1C717ED384C004EF216 /* Supporting Files */,
8A9C32E418A919B50060F45C /* BrowseCodeViewController.h */,
8A9C32E518A919B50060F45C /* BrowseCodeViewController.m */,
8A9C32E618A919B50060F45C /* BrowseCodeViewController.xib */,
Expand All @@ -437,6 +437,7 @@
8A7BF1CE17ED384C004EF216 /* iOS7Sampler-Prefix.pch */,
);
name = "Supporting Files";
path = iOS7Sampler;
sourceTree = "<group>";
};
8A7BF1E817ED384C004EF216 /* iOS7SamplerTests */ = {
Expand Down Expand Up @@ -695,7 +696,7 @@
8A7BF1B517ED384B004EF216 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
LastUpgradeCheck = 0610;
ORGANIZATIONNAME = "Shuichi Tsutsumi";
TargetAttributes = {
8A7BF1E017ED384C004EF216 = {
Expand Down Expand Up @@ -913,7 +914,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -952,7 +952,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -1010,7 +1009,6 @@
8A7BF1F617ED384C004EF216 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS7Sampler.app/iOS7Sampler";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
Expand All @@ -1033,7 +1031,6 @@
8A7BF1F717ED384C004EF216 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS7Sampler.app/iOS7Sampler";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
Expand Down
22 changes: 21 additions & 1 deletion iOS7Sampler/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,32 @@
//

#import "AppDelegate.h"
#import "SVProgressHUD.h"


@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.

// setup appearances
NSString *fontName = @"AvenirNext-Medium";
NSDictionary *titleTextAttributes;
titleTextAttributes = @{
NSFontAttributeName: [UIFont fontWithName:fontName size:20.],
};
[[UINavigationBar appearance] setTitleTextAttributes:titleTextAttributes];
[[UINavigationBar appearance] setTintColor:COMMON_BLUE_COLOR];

titleTextAttributes = @{
NSFontAttributeName: [UIFont fontWithName:fontName size:16.],
};
[[UIBarButtonItem appearance] setTitleTextAttributes:titleTextAttributes forState:UIControlStateNormal];
[[UIBarButtonItem appearance] setTintColor:COMMON_BLUE_COLOR];


[SVProgressHUD setFont:[UIFont fontWithName:fontName size:14.]];

return YES;
}

Expand Down
32 changes: 28 additions & 4 deletions iOS7Sampler/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B3116" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="rS3-R9-Ivy">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6249" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="rS3-R9-Ivy">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6243"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
Expand All @@ -19,14 +20,37 @@
</objects>
<point key="canvasLocation" x="-1" y="64"/>
</scene>
<!--Master View Controller - Master-->
<!--Master-->
<scene sceneID="VgW-fR-Quf">
<objects>
<tableViewController title="Master" id="pGg-6v-bdr" customClass="MasterViewController" sceneMemberID="viewController">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="mLL-gJ-YKr">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="Cell" textLabel="Aga-hs-6fW" detailTextLabel="m91-7w-SYQ" style="IBUITableViewCellStyleSubtitle" id="Tfq-cb-Cff">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Tfq-cb-Cff" id="pff-sz-1Sp">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Aga-hs-6fW">
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="16"/>
<color key="textColor" red="0.20000000000000001" green="0.59999999999999998" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Subtitle" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="200" id="m91-7w-SYQ">
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="AvenirNext-Regular" family="Avenir Next" pointSize="11"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<sections/>
<connections>
<outlet property="dataSource" destination="pGg-6v-bdr" id="P41-gY-KXY"/>
Expand All @@ -45,4 +69,4 @@
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>
</document>
23 changes: 16 additions & 7 deletions iOS7Sampler/BrowseCodeViewController.xib
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4514" systemVersion="13B3116" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6249" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6243"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="BrowseCodeViewController">
Expand All @@ -15,18 +16,26 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<webView contentMode="scaleToFill" fixedFrame="YES" scalesPageToFit="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VUg-pT-rZX">
<webView contentMode="scaleToFill" scalesPageToFit="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VUg-pT-rZX">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<outlet property="delegate" destination="-1" id="9b2-Xn-Mta"/>
</connections>
</webView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="VUg-pT-rZX" secondAttribute="bottom" id="4Bq-aD-Ry1"/>
<constraint firstItem="VUg-pT-rZX" firstAttribute="top" secondItem="1" secondAttribute="top" id="CRA-6H-h8B"/>
<constraint firstItem="VUg-pT-rZX" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="FU6-qW-D0P"/>
<constraint firstAttribute="trailing" secondItem="VUg-pT-rZX" secondAttribute="trailing" id="iUc-CU-3gr"/>
</constraints>
</view>
</objects>
</document>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>
Binary file not shown.
Binary file not shown.
Binary file not shown.
24 changes: 21 additions & 3 deletions iOS7Sampler/Images.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,38 @@
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "AppIcon29x29@2x.png",
"filename" : "Icon-Small@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "AppIcon40x40@2x.png",
"filename" : "Icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "AppIcon60x60@2x.png",
"filename" : "Icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@3x.png",
"scale" : "3x"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions iOS7Sampler/Images.xcassets/LaunchImage.launchimage/Contents.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
{
"images" : [
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "screen_5.5.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "667h",
"filename" : "screen4.7.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"idiom" : "universal",
"scale" : "2x",
"filename" : "ShutterButton1@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"idiom" : "universal",
"scale" : "2x",
"filename" : "ShutterButtonStop@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
4 changes: 4 additions & 0 deletions iOS7Sampler/Images.xcassets/outer1.imageset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"idiom" : "universal",
"scale" : "2x",
"filename" : "outer1@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
4 changes: 4 additions & 0 deletions iOS7Sampler/Images.xcassets/outer2.imageset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"idiom" : "universal",
"scale" : "2x",
"filename" : "outer2@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
15 changes: 1 addition & 14 deletions iOS7Sampler/MasterViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ - (void)viewDidLoad

// Motion Activity Tracking
@{kItemKeyTitle: @"Motion Activity Tracking",
kItemKeyDescription: @"Counting steps and monitoring the activity using CMStepCounter and CMMotionActivityManager. It works only on iPhone5s (M7 chip).",
kItemKeyDescription: @"Counting steps and monitoring the activity using CMStepCounter and CMMotionActivityManager. It works only on devices with M7 or M8 chips.",
kItemKeyClassPrefix: @"ActivityTracking",
},

Expand Down Expand Up @@ -187,20 +187,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil) {

cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
reuseIdentifier:CellIdentifier];

cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.textLabel.textColor = [UIColor colorWithRed:51./255.
green:153./255.
blue:204./255.
alpha:1.0];
cell.detailTextLabel.numberOfLines = 0;
}

NSDictionary *info = [self.items objectAtIndex:indexPath.row];
cell.textLabel.text = info[kItemKeyTitle];
cell.detailTextLabel.text = info[kItemKeyDescription];
Expand Down
Loading

0 comments on commit dfd98f2

Please sign in to comment.