Skip to content

Commit

Permalink
1.0.5 release. Enumerated subtype bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Cobbe committed Sep 9, 2016
1 parent f98742b commit d4da24b
Show file tree
Hide file tree
Showing 212 changed files with 2,710 additions and 2,096 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
F272AD161D7E915C00E9727D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F272AD141D7E915C00E9727D /* Main.storyboard */; };
F272AD181D7E915C00E9727D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F272AD171D7E915C00E9727D /* Assets.xcassets */; };
F272AD1B1D7E915C00E9727D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F272AD191D7E915C00E9727D /* LaunchScreen.storyboard */; };
F28C577A1D81ECDB009503DA /* PhotoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F28C57791D81ECDB009503DA /* PhotoViewController.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -30,6 +31,8 @@
F272AD171D7E915C00E9727D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
F272AD1A1D7E915C00E9727D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
F272AD1C1D7E915C00E9727D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F28C57781D81ECC1009503DA /* PhotoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PhotoViewController.h; sourceTree = "<group>"; };
F28C57791D81ECDB009503DA /* PhotoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhotoViewController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -86,6 +89,8 @@
F272AD0F1D7E915C00E9727D /* AppDelegate.m */,
F272AD111D7E915C00E9727D /* ViewController.h */,
F272AD121D7E915C00E9727D /* ViewController.m */,
F28C57781D81ECC1009503DA /* PhotoViewController.h */,
F28C57791D81ECDB009503DA /* PhotoViewController.m */,
F272AD141D7E915C00E9727D /* Main.storyboard */,
F272AD171D7E915C00E9727D /* Assets.xcassets */,
F272AD191D7E915C00E9727D /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -225,6 +230,7 @@
buildActionMask = 2147483647;
files = (
F272AD131D7E915C00E9727D /* ViewController.m in Sources */,
F28C577A1D81ECDB009503DA /* PhotoViewController.m in Sources */,
F272AD101D7E915C00E9727D /* AppDelegate.m in Sources */,
F272AD0D1D7E915C00E9727D /* main.m in Sources */,
);
Expand Down
4 changes: 1 addition & 3 deletions Examples/DBRoulette/DBRoulette/DBRoulette/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property(strong, nonatomic) UIWindow *window;

@end

50 changes: 40 additions & 10 deletions Examples/DBRoulette/DBRoulette/DBRoulette/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,32 @@

#import "AppDelegate.h"
#import "DropboxSDKImports.h"
#import "PhotoViewController.h"
#import "ViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[DropboxClientsManager setupWithAppKey:@"<APP_KEY>"];
NSString *appKey;
if (!appKey) {
NSString *message = @"You need to set your app key in `AppDelegate.m` before you can use DBRoulette.";
UIAlertController *alertController =
[UIAlertController alertControllerWithTitle:@"Must set app key"
message:message
preferredStyle:(UIAlertControllerStyle)UIAlertControllerStyleAlert];

[self.window makeKeyAndVisible];
[self.window.rootViewController presentViewController:alertController
animated:NO
completion:^{
[NSException raise:@"FatalError" format:@"%@", message];
}];
}
[DropboxClientsManager setupWithAppKey:appKey];
return YES;
}

Expand All @@ -25,36 +41,50 @@ - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
if (authResult != nil) {
if ([authResult isSuccess]) {
NSLog(@"Success! User is logged into Dropbox.");

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
PhotoViewController *photoViewController =
(PhotoViewController *)[storyboard instantiateViewControllerWithIdentifier:@"PhotoViewController"];
[navigationController pushViewController:photoViewController animated:NO];
} else if ([authResult isCancel]) {
NSLog(@"Authorization flow was manually canceled by user!");
} else if ([authResult isError]) {
NSLog(@"Error: %@", authResult);
}
}

return NO;
}


- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
// Sent when the application is about to move from active to inactive state. This can occur for certain types of
// temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and
// it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use
// this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state
// information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when
// the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes
// made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was
// previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
// Called when the application is about to terminate. Save data if appropriate. See also
// applicationDidEnterBackground:.
}

@end
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Ob0-66-dtL">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--View Controller-->
<!--Link Account-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
<viewController storyboardIdentifier="ViewController" id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
Expand All @@ -24,19 +24,96 @@
<action selector="linkDropboxButtonPressed:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Bcc-7V-IPy"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UFa-9N-Eg3">
<rect key="frame" x="217" y="323" width="166" height="30"/>
<state key="normal" title="Unlink Dropbox Account"/>
<connections>
<action selector="unlinkDropboxButtonPressed:" destination="BYZ-38-t0r" eventType="touchUpInside" id="CtV-uP-JAh"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="Djk-aV-qrp" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="G9Y-7M-r9W"/>
<constraint firstItem="Djk-aV-qrp" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="N19-Se-GCs"/>
<constraint firstItem="UFa-9N-Eg3" firstAttribute="centerX" secondItem="Djk-aV-qrp" secondAttribute="centerX" id="UzI-aW-698"/>
<constraint firstItem="UFa-9N-Eg3" firstAttribute="top" secondItem="Djk-aV-qrp" secondAttribute="bottom" constant="8" symbolic="YES" id="pHg-vV-3jC"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="Link Account" id="ZLu-EY-gul">
<barButtonItem key="rightBarButtonItem" title="Photos" id="RZJ-bz-xzL">
<connections>
<segue destination="sMH-tX-FL0" kind="show" id="PTR-Ig-dEK"/>
</connections>
</barButtonItem>
</navigationItem>
<connections>
<outlet property="linkDropboxButton" destination="Djk-aV-qrp" id="oMj-dW-AFS"/>
<outlet property="unlinkDropboxButton" destination="UFa-9N-Eg3" id="Xlf-l6-jgs"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1310" y="561"/>
</scene>
<!--Photos Roulette-->
<scene sceneID="WOW-La-T07">
<objects>
<viewController storyboardIdentifier="PhotoViewController" id="sMH-tX-FL0" customClass="PhotoViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="fmj-DK-4k8"/>
<viewControllerLayoutGuide type="bottom" id="XsY-t7-g5x"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="KlY-dY-OtI">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZCt-vW-MkG">
<rect key="frame" x="233" y="435" width="134" height="30"/>
<state key="normal" title="Pick Random Photo"/>
<connections>
<action selector="randomPhotoButtonPressed:" destination="sMH-tX-FL0" eventType="touchUpInside" id="FAV-YI-e1D"/>
</connections>
</button>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="white" translatesAutoresizingMaskIntoConstraints="NO" id="cjX-lu-qYf">
<rect key="frame" x="290" y="290" width="20" height="20"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="ZCt-vW-MkG" firstAttribute="centerY" secondItem="KlY-dY-OtI" secondAttribute="centerY" constant="150" id="8ZJ-Vb-6Fm"/>
<constraint firstItem="ZCt-vW-MkG" firstAttribute="centerX" secondItem="KlY-dY-OtI" secondAttribute="centerX" id="NAB-FG-Ckl"/>
<constraint firstItem="cjX-lu-qYf" firstAttribute="centerY" secondItem="KlY-dY-OtI" secondAttribute="centerY" id="Z1S-3J-yRy"/>
<constraint firstItem="cjX-lu-qYf" firstAttribute="centerX" secondItem="KlY-dY-OtI" secondAttribute="centerX" id="z2q-AI-6Oj"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="Photos Roulette" id="ePp-fB-Ibl"/>
<connections>
<outlet property="indicatorView" destination="cjX-lu-qYf" id="fAA-Xx-b8f"/>
<outlet property="randomPhotoButton" destination="ZCt-vW-MkG" id="hEG-Lt-r7B"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ZAd-Mh-oVr" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2046" y="561"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="Lmp-ZE-iCw">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="Ob0-66-dtL" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="AUh-j5-MyL">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="49C-ux-VTv"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="pZ4-Mf-Pek" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="579" y="561"/>
</scene>
</scenes>
</document>
12 changes: 12 additions & 0 deletions Examples/DBRoulette/DBRoulette/DBRoulette/PhotoViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// PhotoViewController.h
// DBRoulette
//
// Copyright © 2016 Dropbox. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface PhotoViewController : UIViewController

@end
Loading

0 comments on commit d4da24b

Please sign in to comment.