#266: Fixed menu and home

This commit is contained in:
Patrick Santana 2013-04-19 14:47:58 +02:00
parent ca6b3faed7
commit 02efaf0fb2
11 changed files with 931 additions and 39 deletions

View file

@ -71,6 +71,10 @@ static const NSInteger kGANDispatchPeriodSec = 10;
IIViewDeckController* deckController = [[IIViewDeckController alloc] initWithCenterViewController:self.centerController
leftViewController:self.menuController];
if ([DisplayUtilities isIPad]){
deckController.leftLedge = 490.0;
}
// FACEBOOK
self.facebook = [[Facebook alloc] initWithAppId:kPrivateFacebookAppId andDelegate:self];

View file

@ -226,7 +226,14 @@
UploadCell *uploadCell= (UploadCell *)[tableView dequeueReusableCellWithIdentifier:uploadCellIdentifier];
if (uploadCell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"UploadCell" owner:nil options:nil];
NSString *cellNibName;
if ([DisplayUtilities isIPad]){
cellNibName=@"UploadCelliPad";
}else{
cellNibName=@"UploadCell";
}
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:cellNibName owner:nil options:nil];
uploadCell = [topLevelObjects objectAtIndex:0];
if([[UITabBar class] respondsToSelector:@selector(appearance)]){
// from iOS 5.0
@ -334,7 +341,13 @@
NewestPhotoCell *newestPhotoCell = (NewestPhotoCell *)[tableView dequeueReusableCellWithIdentifier:photoCellIdentifier];
if (newestPhotoCell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"NewestPhotoCell" owner:nil options:nil];
NSString *cellNibName;
if ([DisplayUtilities isIPad]){
cellNibName=@"NewestPhotoCelliPad";
}else{
cellNibName=@"NewestPhotoCell";
}
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:cellNibName owner:nil options:nil];
newestPhotoCell = [topLevelObjects objectAtIndex:0];
// change the color if it is allowed
@ -440,7 +453,10 @@
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
Timeline *photo = [self.fetchedResultsController objectAtIndexPath:indexPath];
if ([photo.status isEqualToString:kUploadStatusTypeUploaded]){
return 365;
if ([DisplayUtilities isIPad])
return 600;
else
return 365;
}else{
return 44;
}

View file

@ -85,7 +85,7 @@
</object>
<object class="IBUIImageView" id="788513251">
<reference key="NSNextResponder" ref="392488321"/>
<int key="NSvFlags">-2147483356</int>
<int key="NSvFlags">-2147483354</int>
<string key="NSFrame">{{268, 0}, {52, 43}}</string>
<reference key="NSSuperview" ref="392488321"/>
<reference key="NSWindow"/>

View file

@ -27,7 +27,6 @@
#import "AccountViewController.h"
#import "ProfileViewController.h"
#import "GalleryViewController.h"
#import "DisplayUtilities.h"
#import "CoreLocationController.h"
// for settings

View file

@ -0,0 +1,505 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1552</int>
<string key="IBDocument.SystemVersion">12D78</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.AppKitVersion">1187.37</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">2083</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIActivityIndicatorView</string>
<string>IBUIButton</string>
<string>IBUIImageView</string>
<string>IBUILabel</string>
<string>IBUITableViewCell</string>
<string>IBUIView</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUITableViewCell" id="656942722">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIView" id="774582805">
<reference key="NSNextResponder" ref="656942722"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIView" id="729864503">
<reference key="NSNextResponder" ref="774582805"/>
<int key="NSvFlags">292</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIImageView" id="503101058">
<reference key="NSNextResponder" ref="729864503"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{755, 492}</string>
<reference key="NSSuperview" ref="729864503"/>
<reference key="NSNextKeyView" ref="923513140"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIImageView" id="949365222">
<reference key="NSNextResponder" ref="729864503"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{2, 452}, {74, 40}}</string>
<reference key="NSSuperview" ref="729864503"/>
<reference key="NSNextKeyView" ref="1000200858"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="IBUIContentMode">4</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">home-geo-on-sharing.png</string>
</object>
</object>
<object class="IBUIButton" id="1000200858">
<reference key="NSNextResponder" ref="729864503"/>
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{2, 455}, {35, 37}}</string>
<reference key="NSSuperview" ref="729864503"/>
<reference key="NSNextKeyView" ref="385029385"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<object class="NSColor" key="IBUIHighlightedTitleColor" id="883224796">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleShadowColor" id="301156185">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">2</int>
<double key="pointSize">15</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">15</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUIButton" id="385029385">
<reference key="NSNextResponder" ref="729864503"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{41, 453}, {35, 37}}</string>
<reference key="NSSuperview" ref="729864503"/>
<reference key="NSNextKeyView" ref="393127652"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<reference key="IBUIHighlightedTitleColor" ref="883224796"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA</bytes>
</object>
<reference key="IBUINormalTitleShadowColor" ref="301156185"/>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">2</int>
<int key="size">2</int>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">18</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUIImageView" id="393127652">
<reference key="NSNextResponder" ref="729864503"/>
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{716, 458}, {33, 28}}</string>
<reference key="NSSuperview" ref="729864503"/>
<reference key="NSNextKeyView" ref="1022937370"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="IBUIContentMode">4</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">home-private.png</string>
</object>
</object>
<object class="IBUILabel" id="622404813">
<reference key="NSNextResponder" ref="729864503"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{3, 554}, {753, 21}}</string>
<reference key="NSSuperview" ref="729864503"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Tags</string>
<object class="NSColor" key="IBUITextColor" id="506766684">
<int key="NSColorSpace">2</int>
<bytes key="NSRGB">MC41NTI5NDEyMDMxIDAuNDgyMzUyOTcyIDAuNDU0OTAxOTkzMwA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<string key="IBUIShadowOffset">{0, 0}</string>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
<object class="IBUIFontDescription" key="IBUIFontDescription" id="112087658">
<string key="name">HelveticaNeue</string>
<string key="family">Helvetica Neue</string>
<int key="traits">0</int>
<double key="pointSize">10</double>
</object>
<object class="NSFont" key="IBUIFont" id="334730413">
<string key="NSName">HelveticaNeue-Medium</string>
<double key="NSSize">10</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUILabel" id="234739237">
<reference key="NSNextResponder" ref="729864503"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{3, 522}, {753, 21}}</string>
<reference key="NSSuperview" ref="729864503"/>
<reference key="NSNextKeyView" ref="622404813"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">This photo was taken one day ago</string>
<reference key="IBUITextColor" ref="506766684"/>
<reference key="IBUIHighlightedColor" ref="883224796"/>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
<reference key="IBUIFontDescription" ref="112087658"/>
<reference key="IBUIFont" ref="334730413"/>
</object>
<object class="IBUILabel" id="1022937370">
<reference key="NSNextResponder" ref="729864503"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{3, 499}, {753, 21}}</string>
<reference key="NSSuperview" ref="729864503"/>
<reference key="NSNextKeyView" ref="234739237"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">title</string>
<nil key="IBUITextColor"/>
<reference key="IBUIHighlightedColor" ref="883224796"/>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<string key="name">HelveticaNeue-Bold</string>
<string key="family">Helvetica Neue</string>
<int key="traits">2</int>
<double key="pointSize">17</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">HelveticaNeue-Bold</string>
<double key="NSSize">17</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUIActivityIndicatorView" id="923513140">
<reference key="NSNextResponder" ref="729864503"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{350, 215}, {20, 20}}</string>
<reference key="NSSuperview" ref="729864503"/>
<reference key="NSNextKeyView" ref="949365222"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIAnimating">YES</bool>
<int key="IBUIStyle">2</int>
<object class="NSColor" key="IBUIColor">
<int key="NSColorSpace">2</int>
<bytes key="NSRGB">MC41NTI5NDEyMDMxIDAuNDgyMzUyOTcyIDAuNDU0OTAxOTkzMwA</bytes>
</object>
</object>
</array>
<string key="NSFrame">{{6, 5}, {755, 576}}</string>
<reference key="NSSuperview" ref="774582805"/>
<reference key="NSNextKeyView" ref="503101058"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="883224796"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<string key="NSFrameSize">{768, 599}</string>
<reference key="NSSuperview" ref="656942722"/>
<reference key="NSNextKeyView" ref="729864503"/>
<string key="NSReuseIdentifierKey">_NS:11</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">4</int>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<string key="NSFrameSize">{768, 600}</string>
<reference key="NSSuperview"/>
<reference key="NSNextKeyView" ref="774582805"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUISelectionStyle">0</int>
<reference key="IBUIContentView" ref="774582805"/>
<string key="IBUIReuseIdentifier">photoCell</string>
<real value="588" key="IBUIRowHeight"/>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">photo</string>
<reference key="source" ref="656942722"/>
<reference key="destination" ref="503101058"/>
</object>
<int key="connectionID">7</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">geoSharingImage</string>
<reference key="source" ref="656942722"/>
<reference key="destination" ref="949365222"/>
</object>
<int key="connectionID">27</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">geoPositionButton</string>
<reference key="source" ref="656942722"/>
<reference key="destination" ref="1000200858"/>
</object>
<int key="connectionID">17</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">shareButton</string>
<reference key="source" ref="656942722"/>
<reference key="destination" ref="385029385"/>
</object>
<int key="connectionID">25</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">private</string>
<reference key="source" ref="656942722"/>
<reference key="destination" ref="393127652"/>
</object>
<int key="connectionID">28</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">tags</string>
<reference key="source" ref="656942722"/>
<reference key="destination" ref="622404813"/>
</object>
<int key="connectionID">13</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">date</string>
<reference key="source" ref="656942722"/>
<reference key="destination" ref="234739237"/>
</object>
<int key="connectionID">12</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">label</string>
<reference key="source" ref="656942722"/>
<reference key="destination" ref="1022937370"/>
</object>
<int key="connectionID">5</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">activity</string>
<reference key="source" ref="656942722"/>
<reference key="destination" ref="923513140"/>
</object>
<int key="connectionID">10</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">openGeoPosition:</string>
<reference key="source" ref="1000200858"/>
<reference key="destination" ref="656942722"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">18</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">sharePhoto:</string>
<reference key="source" ref="385029385"/>
<reference key="destination" ref="656942722"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">24</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="975951072"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="656942722"/>
<array class="NSMutableArray" key="children">
<reference ref="729864503"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">21</int>
<reference key="object" ref="729864503"/>
<array class="NSMutableArray" key="children">
<reference ref="622404813"/>
<reference ref="234739237"/>
<reference ref="1022937370"/>
<reference ref="949365222"/>
<reference ref="1000200858"/>
<reference ref="385029385"/>
<reference ref="393127652"/>
<reference ref="923513140"/>
<reference ref="503101058"/>
</array>
<reference key="parent" ref="656942722"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="503101058"/>
<reference key="parent" ref="729864503"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">26</int>
<reference key="object" ref="949365222"/>
<reference key="parent" ref="729864503"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">16</int>
<reference key="object" ref="1000200858"/>
<reference key="parent" ref="729864503"/>
<string key="objectName">Button Location</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">22</int>
<reference key="object" ref="385029385"/>
<reference key="parent" ref="729864503"/>
<string key="objectName">Button Share</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">14</int>
<reference key="object" ref="393127652"/>
<reference key="parent" ref="729864503"/>
<string key="objectName">Private Photo</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
<reference key="object" ref="622404813"/>
<reference key="parent" ref="729864503"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="234739237"/>
<reference key="parent" ref="729864503"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="1022937370"/>
<reference key="parent" ref="729864503"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="923513140"/>
<reference key="parent" ref="729864503"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="14.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="16.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<real value="0.0" key="22.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
<string key="26.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="3.CustomClassName">NewestPhotoCell</string>
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">32</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="home-geo-on-sharing.png">{68, 31}</string>
<string key="home-private.png">{30, 30}</string>
</dictionary>
<string key="IBCocoaTouchPluginVersion">2083</string>
</data>
</archive>

View file

@ -65,8 +65,13 @@
- (void)showOnTop:(BOOL) top{
[self.viewAlert removeFromSuperview];
int sizeWidth = 320;
if ([DisplayUtilities isIPad]){
sizeWidth = 768;
}
UIFont *font = [UIFont systemFontOfSize:12];
CGSize textSize = [self.message sizeWithFont:font constrainedToSize:CGSizeMake(280, 60)];
CGSize textSize = [self.message sizeWithFont:font constrainedToSize:CGSizeMake(sizeWidth, 60)];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, textSize.width + 5, textSize.height + 5)];
label.font = font;
@ -80,9 +85,9 @@
button.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.7];
if (!top){
button.frame = CGRectMake(0, 64, 320, textSize.height + 10);
button.frame = CGRectMake(0, 64, sizeWidth, textSize.height + 10);
}else{
button.frame = CGRectMake(0, 20, 320, textSize.height + 10);
button.frame = CGRectMake(0, 20, sizeWidth, textSize.height + 10);
}
button.alpha = 0;

View file

@ -8,9 +8,9 @@
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -54,7 +54,7 @@ NSString * const kUploadStatusTypeUploadFinished =@"A_UploadFinished";
}
// return an array of Uploads
return result;
return result;
}
+ (NSArray *) getUploadsNotUploadedInManagedObjectContext:(NSManagedObjectContext *)context
@ -62,7 +62,7 @@ NSString * const kUploadStatusTypeUploadFinished =@"A_UploadFinished";
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Timeline"];
// status not Uploaded
request.predicate= [NSPredicate predicateWithFormat:@"status != %@", kUploadStatusTypeUploaded];
request.predicate= [NSPredicate predicateWithFormat:@"status != %@", kUploadStatusTypeUploaded];
NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"date" ascending:YES];
request.sortDescriptors = [NSArray arrayWithObject:sortDescriptor];
@ -80,7 +80,7 @@ NSString * const kUploadStatusTypeUploadFinished =@"A_UploadFinished";
+ (int) howEntitiesTimelineInManagedObjectContext:(NSManagedObjectContext *)context type:(NSString*) type
{
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Timeline"];
request.predicate= [NSPredicate predicateWithFormat:@"status == %@", type];
request.predicate= [NSPredicate predicateWithFormat:@"status == %@", type];
[request setIncludesPropertyValues:NO]; //only fetch the managedObjectID
NSError *error = nil;
@ -94,7 +94,7 @@ NSString * const kUploadStatusTypeUploadFinished =@"A_UploadFinished";
+ (void) resetEntitiesOnStateUploadingInManagedObjectContext:(NSManagedObjectContext *)context{
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Timeline"];
request.predicate= [NSPredicate predicateWithFormat:@"status == %@", kUploadStatusTypeUploading];
request.predicate= [NSPredicate predicateWithFormat:@"status == %@", kUploadStatusTypeUploading];
NSError *error = nil;
NSArray *matches = [context executeFetchRequest:request error:&error];
@ -163,7 +163,7 @@ NSString * const kUploadStatusTypeUploadFinished =@"A_UploadFinished";
}
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Timeline"];
request.predicate= [NSPredicate predicateWithFormat:@"key==%@",[NSString stringWithFormat:@"%@",[raw objectForKey:@"id"]]];
request.predicate= [NSPredicate predicateWithFormat:@"key==%@",[NSString stringWithFormat:@"%@",[raw objectForKey:@"id"]]];
[request setIncludesPropertyValues:NO]; //only fetch the managedObjectID
NSError *error = nil;
@ -174,18 +174,23 @@ NSString * const kUploadStatusTypeUploadFinished =@"A_UploadFinished";
}
if (!matches || [matches count] > 0){
#ifdef DEVELOPMENT_ENABLED
#ifdef DEVELOPMENT_ENABLED
NSLog(@"Object already exist");
#endif
}else {
Timeline *photo = [NSEntityDescription insertNewObjectForEntityForName:@"Timeline"
inManagedObjectContext:context];
Timeline *photo = [NSEntityDescription insertNewObjectForEntityForName:@"Timeline"
inManagedObjectContext:context];
// get details URL
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] == YES && [[UIScreen mainScreen] scale] == 2.00) {
// retina display
photo.photoUrl = [NSString stringWithFormat:@"%@",[raw objectForKey:@"path610x530xCR"]];
photo.photoUrlDetail = [NSString stringWithFormat:@"%@",[raw objectForKey:@"path610x530"]];
// retirn display
if ([DisplayUtilities isIPad]){
photo.photoUrl = [NSString stringWithFormat:@"%@",[raw objectForKey:@"path775x492xCR"]];
photo.photoUrlDetail = [NSString stringWithFormat:@"%@",[raw objectForKey:@"path1024x768"]];
}else{
photo.photoUrl = [NSString stringWithFormat:@"%@",[raw objectForKey:@"path610x530xCR"]];
photo.photoUrlDetail = [NSString stringWithFormat:@"%@",[raw objectForKey:@"path610x530"]];
}
}else{
// not retina display
photo.photoUrl = [NSString stringWithFormat:@"%@",[raw objectForKey:@"path305x265xCR"]];
@ -216,12 +221,12 @@ NSString * const kUploadStatusTypeUploadFinished =@"A_UploadFinished";
// get the date taken since 1970
double d = [[raw objectForKey:@"dateTaken"] doubleValue];
NSTimeInterval date = d;
photo.date = [NSDate dateWithTimeIntervalSince1970:date];
photo.date = [NSDate dateWithTimeIntervalSince1970:date];
// permission
if ([[raw objectForKey:@"permission"] isEqualToString:@"1"])
photo.permission = [NSNumber numberWithBool:YES];
else
else
photo.permission = [NSNumber numberWithBool:NO];
// latitude
@ -237,7 +242,7 @@ NSString * const kUploadStatusTypeUploadFinished =@"A_UploadFinished";
// get the date since 1970
double dUpload = [[raw objectForKey:@"dateUploaded"] doubleValue];
NSTimeInterval dateUpload = dUpload;
photo.dateUploaded = [NSDate dateWithTimeIntervalSince1970:dateUpload];
photo.dateUploaded = [NSDate dateWithTimeIntervalSince1970:dateUpload];
// page url
photo.photoPageUrl = [raw objectForKey:@"url"];
@ -260,7 +265,7 @@ NSString * const kUploadStatusTypeUploadFinished =@"A_UploadFinished";
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Timeline"];
// status not Uploaded
request.predicate= [NSPredicate predicateWithFormat:@"status == %@", kUploadStatusTypeCreated];
request.predicate= [NSPredicate predicateWithFormat:@"status == %@", kUploadStatusTypeCreated];
NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"dateUploaded" ascending:NO];
request.sortDescriptors = [NSArray arrayWithObject:sortDescriptor];
@ -282,7 +287,7 @@ NSString * const kUploadStatusTypeUploadFinished =@"A_UploadFinished";
{
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
[fetchRequest setEntity:[NSEntityDescription entityForName:@"Timeline" inManagedObjectContext:context]];
fetchRequest.predicate= [NSPredicate predicateWithFormat:@"status == %@", state];
fetchRequest.predicate= [NSPredicate predicateWithFormat:@"status == %@", state];
[fetchRequest setIncludesPropertyValues:NO]; //only fetch the managedObjectID
NSError *error = nil;
@ -299,7 +304,7 @@ NSString * const kUploadStatusTypeUploadFinished =@"A_UploadFinished";
+ (void) setUploadsStatusToCreatedInManagedObjectContext:(NSManagedObjectContext *)context
{
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Timeline"];
request.predicate= [NSPredicate predicateWithFormat:@"status == %@", kUploadStatusTypeCreating];
request.predicate= [NSPredicate predicateWithFormat:@"status == %@", kUploadStatusTypeCreating];
NSError *error = nil;
NSArray *matches = [context executeFetchRequest:request error:&error];

View file

@ -17,6 +17,7 @@
#import "Constants.h"
#import "PrivateConstants.h"
#import "PhotoAlertView.h"
#import "DisplayUtilities.h"
#define SharedAppDelegate ((AppDelegate*)[[UIApplication sharedApplication] delegate])

345
Photo/UploadCelliPad.xib Normal file
View file

@ -0,0 +1,345 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1552</int>
<string key="IBDocument.SystemVersion">12D78</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.AppKitVersion">1187.37</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">2083</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIButton</string>
<string>IBUIImageView</string>
<string>IBUILabel</string>
<string>IBUIProgressView</string>
<string>IBUITableViewCell</string>
<string>IBUIView</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUITableViewCell" id="195459812">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIView" id="932131171">
<reference key="NSNextResponder" ref="195459812"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIView" id="999330569">
<reference key="NSNextResponder" ref="932131171"/>
<int key="NSvFlags">292</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIImageView" id="229380489">
<reference key="NSNextResponder" ref="999330569"/>
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{35, 35}</string>
<reference key="NSSuperview" ref="999330569"/>
<reference key="NSNextKeyView" ref="942010346"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<string key="NSFrame">{{9, 4}, {35, 35}}</string>
<reference key="NSSuperview" ref="932131171"/>
<reference key="NSNextKeyView" ref="229380489"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor" id="90792327">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUILabel" id="942010346">
<reference key="NSNextResponder" ref="932131171"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{53, 11}, {645, 21}}</string>
<reference key="NSSuperview" ref="932131171"/>
<reference key="NSNextKeyView" ref="729681634"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText"/>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">2</int>
<bytes key="NSRGB">MC4yMzUyOTQxMzM0IDAuMTQxMTc2NDc3MSAwLjA4MjM1Mjk0MzcyAA</bytes>
</object>
<reference key="IBUIHighlightedColor" ref="90792327"/>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<string key="name">HelveticaNeue-Bold</string>
<string key="family">Helvetica Neue</string>
<int key="traits">2</int>
<double key="pointSize">16</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">HelveticaNeue-Bold</string>
<double key="NSSize">16</double>
<int key="NSfFlags">16</int>
</object>
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
</object>
<object class="IBUIButton" id="956326349">
<reference key="NSNextResponder" ref="932131171"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{706, 0}, {48, 43}}</string>
<reference key="NSSuperview" ref="932131171"/>
<reference key="NSNextKeyView" ref="249789658"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUIContentMode">4</int>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<reference key="IBUIHighlightedTitleColor" ref="90792327"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleShadowColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
<object class="NSCustomResource" key="IBUINormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">home-retry.png</string>
</object>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">2</int>
<double key="pointSize">15</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">15</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUIImageView" id="249789658">
<reference key="NSNextResponder" ref="932131171"/>
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{706, 0}, {48, 43}}</string>
<reference key="NSSuperview" ref="932131171"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="IBUIContentMode">4</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIProgressView" id="729681634">
<reference key="NSNextResponder" ref="932131171"/>
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{53, 17}, {645, 11}}</string>
<reference key="NSSuperview" ref="932131171"/>
<reference key="NSNextKeyView" ref="956326349"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIProgressViewStyle">1</int>
<object class="NSColor" key="IBUIProgressTintColor">
<int key="NSColorSpace">2</int>
<bytes key="NSRGB">MC45MDE5NjA4NDk4IDAuMzEzNzI1NTAxMyAwLjExNzY0NzA2NjcAA</bytes>
</object>
<object class="NSColor" key="IBUITrackTintColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAwLjUgMAA</bytes>
</object>
</object>
</array>
<string key="NSFrameSize">{768, 43}</string>
<reference key="NSSuperview" ref="195459812"/>
<reference key="NSNextKeyView" ref="999330569"/>
<string key="NSReuseIdentifierKey">_NS:11</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">4</int>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<string key="NSFrameSize">{768, 44}</string>
<reference key="NSSuperview"/>
<reference key="NSNextKeyView" ref="932131171"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUISelectionStyle">0</int>
<reference key="IBUIContentView" ref="932131171"/>
<string key="IBUIReuseIdentifier">uploadCell</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">status</string>
<reference key="source" ref="195459812"/>
<reference key="destination" ref="942010346"/>
</object>
<int key="connectionID">10</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">btnRetry</string>
<reference key="source" ref="195459812"/>
<reference key="destination" ref="956326349"/>
</object>
<int key="connectionID">11</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">imageStatus</string>
<reference key="source" ref="195459812"/>
<reference key="destination" ref="249789658"/>
</object>
<int key="connectionID">19</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">thumb</string>
<reference key="source" ref="195459812"/>
<reference key="destination" ref="229380489"/>
</object>
<int key="connectionID">9</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">progressBar</string>
<reference key="source" ref="195459812"/>
<reference key="destination" ref="729681634"/>
</object>
<int key="connectionID">24</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">refresh:</string>
<reference key="source" ref="956326349"/>
<reference key="destination" ref="195459812"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">13</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="975951072"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="195459812"/>
<array class="NSMutableArray" key="children">
<reference ref="942010346"/>
<reference ref="999330569"/>
<reference ref="729681634"/>
<reference ref="956326349"/>
<reference ref="249789658"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="942010346"/>
<reference key="parent" ref="195459812"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="956326349"/>
<reference key="parent" ref="195459812"/>
<string key="objectName">btnRetry</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">18</int>
<reference key="object" ref="249789658"/>
<reference key="parent" ref="195459812"/>
<string key="objectName">imageStatus</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">21</int>
<reference key="object" ref="999330569"/>
<array class="NSMutableArray" key="children">
<reference ref="229380489"/>
</array>
<reference key="parent" ref="195459812"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="229380489"/>
<reference key="parent" ref="999330569"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">23</int>
<reference key="object" ref="729681634"/>
<reference key="parent" ref="195459812"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="18.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="23.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="3.CustomClassName">UploadCell</string>
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">24</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NS.key.0">home-retry.png</string>
<string key="NS.object.0">{26, 27}</string>
</object>
<string key="IBCocoaTouchPluginVersion">2083</string>
</data>
</archive>

View file

@ -78,7 +78,11 @@
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] == YES && [[UIScreen mainScreen] scale] == 2.00) {
// retina display
[request appendString:@"610x530xCR,610x530"];
if ([DisplayUtilities isIPad]){
[request appendString:@"775x492xCR,1024x768"];
}else{
[request appendString:@"610x530xCR,610x530"];
}
}else{
// not retina display
[request appendString:@"305x265xCR,305x265"];
@ -112,9 +116,9 @@
value:[NSString stringWithFormat:@"%@",[values objectForKey:@"permission"]]];
OARequestParameter *tagsParam = [[OARequestParameter alloc] initWithName:@"tags"
value:[values objectForKey:@"tags"]];
value:[values objectForKey:@"tags"]];
OARequestParameter *albumsParam = [[OARequestParameter alloc] initWithName:@"albums"
value:[values objectForKey:@"albums"]];
value:[values objectForKey:@"albums"]];
NSArray *params = [NSArray arrayWithObjects:titleParam, permissionParam, tagsParam, albumsParam, nil];
[oaUrlRequest setParameters:params];
@ -231,8 +235,8 @@
[oaUrlRequest setHTTPMethod:@"POST"];
OARequestParameter *nameParam = [[OARequestParameter alloc] initWithName:@"name"
value:album.name];
value:album.name];
NSArray *params = [NSArray arrayWithObjects:nameParam, nil];
[oaUrlRequest setParameters:params];
@ -346,7 +350,7 @@
// parse response
SBJsonParser *parser =[[SBJsonParser alloc] init];
NSDictionary *result = [parser objectWithString:[response responseString]];
// check the valid result
if (![WebService isMessageValid:result]){
// invalid message
@ -413,17 +417,17 @@
// token to send. We get the details from the user defaults
OAToken *token = [[OAToken alloc] initWithKey:self.oAuthKey
secret:self.oAuthSecret];
secret:self.oAuthSecret];
// consumer to send. We get the details from the user defaults
OAConsumer *consumer = [[OAConsumer alloc] initWithKey:self.consumerKey
secret:self.consumerSecret];
secret:self.consumerSecret];
return [[OAMutableURLRequest alloc] initWithURL:url
consumer:consumer
token:token
realm:nil
signatureProvider:nil];
consumer:consumer
token:token
realm:nil
signatureProvider:nil];
}
+ (BOOL) isMessageValid:(NSDictionary *)response{

View file

@ -240,6 +240,7 @@
CD0DE1FC171F31360043D1DC /* WrapController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD0DE1FA171F31360043D1DC /* WrapController.m */; };
CD0DE1FF171F31D10043D1DC /* add.png in Resources */ = {isa = PBXBuildFile; fileRef = CD0DE1FD171F31D10043D1DC /* add.png */; };
CD0DE200171F31D10043D1DC /* add@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CD0DE1FE171F31D10043D1DC /* add@2x.png */; };
CD128354172153A800D61DB9 /* NewestPhotoCelliPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD128353172153A800D61DB9 /* NewestPhotoCelliPad.xib */; };
CD1528481628DB8500EA08FF /* Account.m in Sources */ = {isa = PBXBuildFile; fileRef = CD15283C1628DB8500EA08FF /* Account.m */; };
CD15284A1628DB8500EA08FF /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1528401628DB8500EA08FF /* LoginViewController.m */; };
CD15284B1628DB8500EA08FF /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD1528411628DB8500EA08FF /* LoginViewController.xib */; };
@ -331,6 +332,7 @@
CD84B3A5162D58330008FE7D /* PhotoSHKConfigurator.m in Sources */ = {isa = PBXBuildFile; fileRef = CD84B3A4162D58330008FE7D /* PhotoSHKConfigurator.m */; };
CD84B3A8162D5F150008FE7D /* InitializerService.m in Sources */ = {isa = PBXBuildFile; fileRef = CD84B3A7162D5F140008FE7D /* InitializerService.m */; };
CD899287161F08AB00026DBB /* WebService.m in Sources */ = {isa = PBXBuildFile; fileRef = CD899284161F08AB00026DBB /* WebService.m */; };
CD90127A172167D000BB30EF /* UploadCelliPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD901279172167D000BB30EF /* UploadCelliPad.xib */; };
CD91157316234A5A0099204B /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = CD91157216234A5A0099204B /* MBProgressHUD.m */; };
CD91157C16234A820099204B /* TSAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = CD91157516234A820099204B /* TSAlertView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
CD91157D16234A820099204B /* TSAlertViewBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = CD91157616234A820099204B /* TSAlertViewBackground.png */; };
@ -1303,6 +1305,7 @@
CD0DE1FA171F31360043D1DC /* WrapController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WrapController.m; path = Frameworks/ViewDeck/WrapController.m; sourceTree = "<group>"; };
CD0DE1FD171F31D10043D1DC /* add.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = add.png; path = images/add.png; sourceTree = "<group>"; };
CD0DE1FE171F31D10043D1DC /* add@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "add@2x.png"; path = "images/add@2x.png"; sourceTree = "<group>"; };
CD128353172153A800D61DB9 /* NewestPhotoCelliPad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NewestPhotoCelliPad.xib; sourceTree = "<group>"; };
CD15283B1628DB8500EA08FF /* Account.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Account.h; sourceTree = "<group>"; };
CD15283C1628DB8500EA08FF /* Account.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Account.m; sourceTree = "<group>"; };
CD15283F1628DB8500EA08FF /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; };
@ -1449,6 +1452,7 @@
CD84B3A7162D5F140008FE7D /* InitializerService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitializerService.m; sourceTree = "<group>"; };
CD899283161F08AB00026DBB /* WebService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebService.h; sourceTree = "<group>"; };
CD899284161F08AB00026DBB /* WebService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebService.m; sourceTree = "<group>"; };
CD901279172167D000BB30EF /* UploadCelliPad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UploadCelliPad.xib; sourceTree = "<group>"; };
CD91157116234A5A0099204B /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MBProgressHUD.h; path = Frameworks/MBProgressHUD/MBProgressHUD.h; sourceTree = "<group>"; };
CD91157216234A5A0099204B /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MBProgressHUD.m; path = Frameworks/MBProgressHUD/MBProgressHUD.m; sourceTree = "<group>"; };
CD91157416234A820099204B /* TSAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TSAlertView.h; path = Frameworks/TSAlertView/TSAlertView/TSAlertView.h; sourceTree = "<group>"; };
@ -2415,9 +2419,11 @@
CDFAF33F16285495007A4FDF /* NewestPhotoCell.h */,
CDFAF34016285495007A4FDF /* NewestPhotoCell.m */,
CDFAF34116285495007A4FDF /* NewestPhotoCell.xib */,
CD128353172153A800D61DB9 /* NewestPhotoCelliPad.xib */,
CDFAF34216285495007A4FDF /* UploadCell.h */,
CDFAF34316285495007A4FDF /* UploadCell.m */,
CDFAF34416285495007A4FDF /* UploadCell.xib */,
CD901279172167D000BB30EF /* UploadCelliPad.xib */,
);
name = Home;
sourceTree = "<group>";
@ -3658,6 +3664,8 @@
CD31DEDB17143FFA0071D3E1 /* menu-upload-selected@2x.png in Resources */,
CD0DE1FF171F31D10043D1DC /* add.png in Resources */,
CD0DE200171F31D10043D1DC /* add@2x.png in Resources */,
CD128354172153A800D61DB9 /* NewestPhotoCelliPad.xib in Resources */,
CD90127A172167D000BB30EF /* UploadCelliPad.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};