Skip to content

Commit

Permalink
ipad support
Browse files Browse the repository at this point in the history
  • Loading branch information
gpolak committed Feb 20, 2015
1 parent e351975 commit b8f1af1
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 30 deletions.
1 change: 1 addition & 0 deletions GPUberView/GPUberViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ - (id)initWithServerToken:(NSString *)serverToken

- (void)showInViewController:(UIViewController *)viewController {
UINavigationController *nVc = [[UINavigationController alloc] initWithRootViewController:self];
nVc.modalPresentationStyle = UIModalPresentationFormSheet;
[viewController presentViewController:nVc animated:YES completion:nil];
}

Expand Down
2 changes: 2 additions & 0 deletions GPUberViewDemo/GPUberViewDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@
INFOPLIST_FILE = GPUberViewDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
Expand All @@ -430,6 +431,7 @@
INFOPLIST_FILE = GPUberViewDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "8.0",
"subtype" : "736h",
"scale" : "3x"
},
{
"orientation" : "landscape",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "8.0",
"subtype" : "736h",
"scale" : "3x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "8.0",
"subtype" : "667h",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
Expand All @@ -16,6 +40,101 @@
"minimum-system-version" : "7.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"subtype" : "retina4",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "2x"
}
],
"info" : {
Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.
6 changes: 2 additions & 4 deletions GPUberViewDemo/GPUberViewDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Determines your Uber pickup location.</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Determines your Uber pickup location.</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
29 changes: 25 additions & 4 deletions GPUberViewDemo/GPUberViewDemo/MainViewController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,50 @@
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HeM-Zi-FfD">
<rect key="frame" x="24" y="265" width="272" height="38"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="HeM-Zi-FfD" secondAttribute="height" multiplier="275:38" id="6lX-5I-59k"/>
<constraint firstAttribute="height" constant="38" id="ONn-U7-EzA"/>
<constraint firstAttribute="width" secondItem="HeM-Zi-FfD" secondAttribute="height" multiplier="136:19" id="fwo-FH-lfj"/>
<constraint firstAttribute="height" constant="38" id="qOx-ep-H73"/>
</constraints>
<state key="normal" title="Call Uber" image="uber_button">
<state key="normal" title="Call Uber">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<variation key="default">
<mask key="constraints">
<exclude reference="6lX-5I-59k"/>
<exclude reference="qOx-ep-H73"/>
</mask>
</variation>
<connections>
<action selector="callUber" destination="-1" eventType="touchUpInside" id="6Q9-fC-f37"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="HeM-Zi-FfD" secondAttribute="trailing" constant="24" id="8Z7-t6-zMp"/>
<constraint firstAttribute="centerY" secondItem="HeM-Zi-FfD" secondAttribute="centerY" id="DrN-IV-2a5"/>
<constraint firstAttribute="trailing" secondItem="HeM-Zi-FfD" secondAttribute="trailing" constant="24" id="LBy-ve-2AM"/>
<constraint firstAttribute="trailing" secondItem="HeM-Zi-FfD" secondAttribute="trailing" constant="24" id="aSC-EB-Dfl"/>
<constraint firstItem="HeM-Zi-FfD" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="24" id="iZD-44-P8k"/>
<constraint firstItem="HeM-Zi-FfD" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="24" id="jYT-2u-I0g"/>
<constraint firstItem="HeM-Zi-FfD" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="24" id="nhf-6y-dAE"/>
<constraint firstAttribute="centerX" secondItem="HeM-Zi-FfD" secondAttribute="centerX" id="yUd-as-bWT"/>
</constraints>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
<variation key="default">
<mask key="constraints">
<exclude reference="8Z7-t6-zMp"/>
<exclude reference="LBy-ve-2AM"/>
<exclude reference="aSC-EB-Dfl"/>
<exclude reference="iZD-44-P8k"/>
<exclude reference="jYT-2u-I0g"/>
<exclude reference="nhf-6y-dAE"/>
</mask>
</variation>
<point key="canvasLocation" x="140" y="193"/>
</view>
</objects>
<resources>
<image name="uber_button" width="563" height="90"/>
</resources>
</document>

0 comments on commit b8f1af1

Please sign in to comment.