Skip to content

Commit

Permalink
Fix background segue and disable email ui during uploading process
Browse files Browse the repository at this point in the history
  • Loading branch information
vineetchoudhary committed Sep 7, 2016
1 parent 4b45bca commit 121ad58
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 57 deletions.
16 changes: 16 additions & 0 deletions AppBox.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
E15C266A1D7FD5CE004243B9 /* ShowLinkViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E15C26691D7FD5CE004243B9 /* ShowLinkViewController.m */; };
E16437D41D743A4E00CE8B7E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E16437D31D743A4E00CE8B7E /* AppDelegate.m */; };
E16437D71D743A4E00CE8B7E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E16437D61D743A4E00CE8B7E /* main.m */; };
E16437DD1D743A4E00CE8B7E /* AppBox.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E16437DB1D743A4E00CE8B7E /* AppBox.xcdatamodeld */; };
Expand Down Expand Up @@ -50,6 +51,8 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
E15C26681D7FD5CE004243B9 /* ShowLinkViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShowLinkViewController.h; sourceTree = "<group>"; };
E15C26691D7FD5CE004243B9 /* ShowLinkViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShowLinkViewController.m; sourceTree = "<group>"; };
E16437CF1D743A4E00CE8B7E /* AppBox.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AppBox.app; sourceTree = BUILT_PRODUCTS_DIR; };
E16437D21D743A4E00CE8B7E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
E16437D31D743A4E00CE8B7E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -100,6 +103,15 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
E15C26671D7FD5A9004243B9 /* ShowLinkViewController */ = {
isa = PBXGroup;
children = (
E15C26681D7FD5CE004243B9 /* ShowLinkViewController.h */,
E15C26691D7FD5CE004243B9 /* ShowLinkViewController.m */,
);
path = ShowLinkViewController;
sourceTree = "<group>";
};
E16437C61D743A4E00CE8B7E = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -146,6 +158,7 @@
children = (
E16437ED1D743ABE00CE8B7E /* Storyboard */,
E16437F01D743B3600CE8B7E /* HomeViewController */,
E15C26671D7FD5A9004243B9 /* ShowLinkViewController */,
);
path = ViewController;
sourceTree = "<group>";
Expand Down Expand Up @@ -305,6 +318,7 @@
E16437D71D743A4E00CE8B7E /* main.m in Sources */,
E16437D41D743A4E00CE8B7E /* AppDelegate.m in Sources */,
E1CFC65E1D7E7FEA005872BE /* Common.m in Sources */,
E15C266A1D7FD5CE004243B9 /* ShowLinkViewController.m in Sources */,
E188EA111D78485900EBCA52 /* GooglURLShortenerService.m in Sources */,
E16437F31D743B6800CE8B7E /* HomeViewController.m in Sources */,
E188EA101D78485900EBCA52 /* BitlyURLShortenerService.m in Sources */,
Expand Down Expand Up @@ -422,6 +436,7 @@
INFOPLIST_FILE = AppBox/Info.plist;
LD_DYLIB_INSTALL_NAME = "";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.8;
PRODUCT_BUNDLE_IDENTIFIER = com.developerinsider.AppBox;
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand All @@ -442,6 +457,7 @@
INFOPLIST_FILE = AppBox/Info.plist;
LD_DYLIB_INSTALL_NAME = "";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.8;
PRODUCT_BUNDLE_IDENTIFIER = com.developerinsider.AppBox;
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand Down
29 changes: 17 additions & 12 deletions AppBox/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,26 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nf3-Kn-VIh">
<rect key="frame" x="8" y="250" width="75" height="19"/>
<rect key="frame" x="8" y="247" width="75" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="YxT-cX-vZh"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="To" id="83k-8w-bCE">
<font key="font" metaFont="systemLight" size="15"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yg6-zw-qpP">
<rect key="frame" x="8" y="218" width="75" height="17"/>
<rect key="frame" x="8" y="210" width="75" height="22"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Subject" id="uVG-49-MnF">
<font key="font" metaFont="systemLight" size="15"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="HUs-4Y-Rn1">
<rect key="frame" x="8" y="184" width="75" height="19"/>
<rect key="frame" x="8" y="173" width="75" height="22"/>
<constraints>
<constraint firstAttribute="width" constant="71" id="65V-81-c29"/>
</constraints>
Expand Down Expand Up @@ -203,7 +206,7 @@
</constraints>
</customView>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3S8-5j-4ZM">
<rect key="frame" x="96" y="214" width="439" height="25"/>
<rect key="frame" x="96" y="209" width="439" height="25"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="NUe-vM-3ME"/>
</constraints>
Expand All @@ -221,19 +224,19 @@
</buttonCell>
</button>
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WMS-On-FOR">
<rect key="frame" x="95" y="75" width="441" height="129"/>
<rect key="frame" x="95" y="75" width="441" height="124"/>
<clipView key="contentView" id="hY9-OG-ynO">
<rect key="frame" x="1" y="1" width="439" height="127"/>
<rect key="frame" x="1" y="1" width="439" height="122"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView importsGraphics="NO" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" usesFontPanel="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="0ub-Kl-QAp">
<rect key="frame" x="0.0" y="0.0" width="439" height="127"/>
<rect key="frame" x="0.0" y="0.0" width="439" height="122"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<size key="minSize" width="439" height="127"/>
<size key="minSize" width="439" height="122"/>
<size key="maxSize" width="502" height="10000000"/>
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="439" height="127"/>
<size key="minSize" width="439" height="122"/>
<size key="maxSize" width="502" height="10000000"/>
</textView>
</subviews>
Expand All @@ -248,12 +251,12 @@
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" horizontal="NO" id="FeR-XT-QRV">
<rect key="frame" x="424" y="1" width="16" height="127"/>
<rect key="frame" x="424" y="1" width="16" height="122"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RKc-Si-2CZ">
<rect key="frame" x="96" y="247" width="439" height="25"/>
<rect key="frame" x="96" y="246" width="439" height="25"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="L4T-9e-81l"/>
</constraints>
Expand Down Expand Up @@ -307,6 +310,8 @@
<constraint firstItem="RKc-Si-2CZ" firstAttribute="leading" secondItem="nf3-Kn-VIh" secondAttribute="trailing" constant="15" id="muE-br-9BS"/>
<constraint firstItem="mBL-zn-6BU" firstAttribute="top" secondItem="RTB-1n-lrJ" secondAttribute="top" constant="10" id="qQp-2Z-8PF"/>
<constraint firstItem="MlA-j9-hh1" firstAttribute="top" secondItem="WMS-On-FOR" secondAttribute="bottom" constant="10" id="qqm-VL-R8r"/>
<constraint firstItem="nf3-Kn-VIh" firstAttribute="height" secondItem="Yg6-zw-qpP" secondAttribute="height" id="suk-SQ-oP4"/>
<constraint firstItem="nf3-Kn-VIh" firstAttribute="height" secondItem="HUs-4Y-Rn1" secondAttribute="height" id="tal-Rn-ITh"/>
<constraint firstItem="Yg6-zw-qpP" firstAttribute="top" secondItem="nf3-Kn-VIh" secondAttribute="bottom" constant="15" id="ulA-hL-Bnw"/>
<constraint firstItem="mBL-zn-6BU" firstAttribute="centerY" secondItem="sO6-co-IOQ" secondAttribute="centerY" id="uq2-BY-0ZB"/>
<constraint firstItem="RKc-Si-2CZ" firstAttribute="trailing" secondItem="3S8-5j-4ZM" secondAttribute="trailing" id="xnZ-Py-HPL"/>
Expand Down Expand Up @@ -400,9 +405,9 @@
</subviews>
<constraints>
<constraint firstItem="7Ou-Ey-jkC" firstAttribute="centerX" secondItem="6cG-sr-Ub0" secondAttribute="centerX" id="5Oo-9k-zRN"/>
<constraint firstItem="IRS-6c-DTS" firstAttribute="top" secondItem="n7a-6Z-Rsw" secondAttribute="bottom" constant="10" id="5yp-y6-Lwx"/>
<constraint firstItem="n7a-6Z-Rsw" firstAttribute="top" secondItem="7Ou-Ey-jkC" secondAttribute="bottom" constant="10" id="Bx8-jU-i7e"/>
<constraint firstItem="n7a-6Z-Rsw" firstAttribute="leading" secondItem="6cG-sr-Ub0" secondAttribute="leading" constant="10" id="CRC-NK-qVo"/>
<constraint firstItem="4Ui-cf-b7U" firstAttribute="centerY" secondItem="IRS-6c-DTS" secondAttribute="centerY" id="CTG-vm-7Im"/>
<constraint firstAttribute="bottom" secondItem="4Ui-cf-b7U" secondAttribute="bottom" constant="10" id="DxC-hv-HOr"/>
<constraint firstItem="4Ui-cf-b7U" firstAttribute="leading" secondItem="6cG-sr-Ub0" secondAttribute="leading" constant="10" id="Kgm-9b-oHh"/>
<constraint firstItem="4Ui-cf-b7U" firstAttribute="top" secondItem="n7a-6Z-Rsw" secondAttribute="bottom" constant="10" id="SSZ-cE-eOL"/>
Expand Down
2 changes: 1 addition & 1 deletion AppBox/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
23 changes: 14 additions & 9 deletions AppBox/ViewController/HomeViewController/HomeViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#import "Common.h"
#import "Tiny.h"
#import "GooglURLShortenerService.h"
#import "ShowLinkViewController.h"

typedef enum : NSUInteger {
FileTypeIPA,
Expand All @@ -21,17 +22,21 @@ typedef enum : NSUInteger {

@interface HomeViewController : NSViewController <DBRestClientDelegate, DBSessionDelegate>{
DBRestClient *restClient;
IBOutlet NSTextField *labelIPAName;
IBOutlet NSButton *buttonSelectIPAFile;
IBOutlet NSButton *buttonLinkWithDropbox;

IBOutlet NSButton *buttonShutdownMac;
IBOutlet NSTextField *textFieldEmail;
IBOutlet NSTextField *textFieldEmailSubject;
IBOutlet NSTextView *textViewEmailContent;


IBOutlet NSTextField *labelStatus;
IBOutlet NSView *viewProgressStatus;
IBOutlet NSProgressIndicator *progressIndicator;
}

@property (weak) IBOutlet NSButton *buttonLinkWithDropbox;
@property (weak) IBOutlet NSButton *buttonSelectIPAFile;
@property (weak) IBOutlet NSTextField *labelIPAName;
@property (weak) IBOutlet NSProgressIndicator *progressIndicator;
@property (weak) IBOutlet NSTextField *labelStatus;
@property (weak) IBOutlet NSView *viewProgressStatus;
@property (weak) IBOutlet NSTextField *textFieldEmail;
@property (weak) IBOutlet NSTextField *textFieldEmailSubject;
@property (unsafe_unretained) IBOutlet NSTextView *textViewEmailContent;


- (DBRestClient *)restClient;
Expand Down
Loading

0 comments on commit 121ad58

Please sign in to comment.