Skip to content

Commit

Permalink
Update DocInteraction for storyboards (#41).
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueRiverInteractive committed May 19, 2015
1 parent c436d9a commit 1b54857
Show file tree
Hide file tree
Showing 31 changed files with 257 additions and 107 deletions.
31 changes: 4 additions & 27 deletions DocInteraction/Info.plist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<string>${app.build}</string>
<key>LSRequiresIPhoneOS</key>
<true />
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
Expand All @@ -46,32 +50,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon-Small</string>
<string>Icon-Small-40</string>
<string>Icon</string>
<string>Icon-60</string>
<string>Icon-72</string>
</array>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon-Small</string>
<string>Icon-Small-40</string>
<string>Icon-72</string>
<string>Icon-76</string>
</array>
</dict>
</dict>
</dict>
</plist>
58 changes: 58 additions & 0 deletions DocInteraction/resources/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="tYz-dN-yKu">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
</dependencies>
<scenes>
<!--DocInteraction-->
<scene sceneID="mtZ-ak-F2f">
<objects>
<tableViewController storyboardIdentifier="DocInteraction" useStoryboardIdentifierAsRestorationIdentifier="YES" id="aqu-3Z-f53" customClass="DITableViewController" sceneMemberID="viewController">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="30" sectionFooterHeight="30" id="Wow-Ez-Ha7">
<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="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="document" id="HKp-wn-xfZ">
<rect key="frame" x="0.0" y="94" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="HKp-wn-xfZ" id="Sxb-tg-Qg4">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="aqu-3Z-f53" id="OYx-rW-51d"/>
<outlet property="delegate" destination="aqu-3Z-f53" id="Zxk-bV-Th5"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="DocInteraction" id="XeA-x0-xQx"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="QTg-Tn-rF6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="284" y="-4"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="je9-7z-imq">
<objects>
<navigationController storyboardIdentifier="RootNavController" definesPresentationContext="YES" useStoryboardIdentifierAsRestorationIdentifier="YES" id="tYz-dN-yKu" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="7DI-OR-upw">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="aqu-3Z-f53" kind="relationship" relationship="rootViewController" id="g9a-1W-Qz7"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="kj0-oO-Imu" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-250" y="-4"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>
Binary file not shown.
Binary file removed DocInteraction/resources/Default-736h@3x~iphone.png
Binary file not shown.
Binary file removed DocInteraction/resources/Icon-72.png
Binary file not shown.
Binary file removed DocInteraction/resources/[email protected]
Binary file not shown.
Binary file removed DocInteraction/resources/Icon.png
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"images" : [
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-Small.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-Small-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
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
@@ -0,0 +1,57 @@
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"filename" : "Default@2x~iphone.png",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "retina4",
"filename" : "Default-568h@2x~iphone.png",
"minimum-system-version" : "7.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"filename" : "Default-Portrait~ipad.png",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"filename" : "Default-Landscape~ipad.png",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"filename" : "Default-Portrait@2x~ipad.png",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"filename" : "Default-Landscape@2x~ipad.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
4 changes: 2 additions & 2 deletions DocInteraction/robovm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<mainClass>${app.mainclass}</mainClass>
<os>ios</os>
<arch>thumbv7</arch>
<target>ios</target>
<iosInfoPList>Info.plist.xml</iosInfoPList>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>
<target>ios</target>
<iosInfoPList>Info.plist.xml</iosInfoPList>
</config>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014 RoboVM AB
* Copyright (C) 2013-2015 RoboVM AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,48 +16,23 @@
* Portions of this code is based on Apple Inc's DocInteraction sample (v1.6)
* which is copyright (C) 2010-2014 Apple Inc.
*/

package org.robovm.samples.docinteraction;

import org.robovm.apple.foundation.NSAutoreleasePool;
import org.robovm.apple.uikit.UIApplication;
import org.robovm.apple.uikit.UIApplicationDelegateAdapter;
import org.robovm.apple.uikit.UIApplicationLaunchOptions;
import org.robovm.apple.uikit.UINavigationController;
import org.robovm.apple.uikit.UIScreen;
import org.robovm.apple.uikit.UIWindow;
import org.robovm.samples.docinteraction.viewcontrollers.DITableViewController;

public class DocInteraction extends UIApplicationDelegateAdapter {
private UIWindow window;
private DITableViewController rootViewController;
private UINavigationController navController;

@Override
public boolean didFinishLaunching (UIApplication application, UIApplicationLaunchOptions launchOptions) {
// Set up the view controller.
rootViewController = new DITableViewController();
navController = new UINavigationController(rootViewController);

// Create a new window at screen size.
window = new UIWindow(UIScreen.getMainScreen().getBounds());
// Set our viewcontroller as the root controller for the window.
window.setRootViewController(navController);
// Make the window visible.
window.makeKeyAndVisible();

/*
* Retains the window object until the application is deallocated. Prevents Java GC from collecting the window object too
* early.
*/
addStrongRef(window);

public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) {
return true;
}

public static void main (String[] args) {
NSAutoreleasePool pool = new NSAutoreleasePool();
UIApplication.main(args, null, DocInteraction.class);
pool.close();
public static void main(String[] args) {
try (NSAutoreleasePool pool = new NSAutoreleasePool()) {
UIApplication.main(args, null, DocInteraction.class);
}
}
}
Loading

0 comments on commit 1b54857

Please sign in to comment.