Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switch back to saving images as attachments, this is the final paradigm

  • Loading branch information...
commit 14e6d8205cd23fd08350dc0616b9c1fe127ea0b6 1 parent c1f9d52
@deepwinter authored
View
38 Rhus.xcodeproj/project.pbxproj
@@ -75,8 +75,6 @@
F414DA131549F325008A38F5 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F414D9D41549F325008A38F5 /* AppDelegate.m */; };
F414DA161549F325008A38F5 /* CameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F414D9D61549F325008A38F5 /* CameraViewController.m */; };
F414DA191549F325008A38F5 /* CameraViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F414D9D71549F325008A38F5 /* CameraViewController.xib */; };
- F414DA1C1549F325008A38F5 /* GalleryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F414D9DA1549F325008A38F5 /* GalleryViewController.m */; };
- F414DA1F1549F325008A38F5 /* GalleryViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F414D9DB1549F325008A38F5 /* GalleryViewController.xib */; };
F414DA221549F325008A38F5 /* ImageScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = F414D9DD1549F325008A38F5 /* ImageScrollView.m */; };
F414DA251549F325008A38F5 /* LoadingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F414D9DF1549F325008A38F5 /* LoadingViewController.m */; };
F414DA281549F325008A38F5 /* LoadingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F414D9E01549F325008A38F5 /* LoadingViewController.xib */; };
@@ -202,9 +200,6 @@
F414D9D61549F325008A38F5 /* CameraViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CameraViewController.m; sourceTree = "<group>"; };
F414D9D71549F325008A38F5 /* CameraViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CameraViewController.xib; sourceTree = "<group>"; };
F414D9D81549F325008A38F5 /* FullscreenTransitionDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FullscreenTransitionDelegate.h; sourceTree = "<group>"; };
- F414D9D91549F325008A38F5 /* GalleryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GalleryViewController.h; sourceTree = "<group>"; };
- F414D9DA1549F325008A38F5 /* GalleryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GalleryViewController.m; sourceTree = "<group>"; };
- F414D9DB1549F325008A38F5 /* GalleryViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GalleryViewController.xib; sourceTree = "<group>"; };
F414D9DC1549F325008A38F5 /* ImageScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageScrollView.h; sourceTree = "<group>"; };
F414D9DD1549F325008A38F5 /* ImageScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageScrollView.m; sourceTree = "<group>"; };
F414D9DE1549F325008A38F5 /* LoadingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadingViewController.h; sourceTree = "<group>"; };
@@ -433,9 +428,6 @@
F414D9D61549F325008A38F5 /* CameraViewController.m */,
F414D9D71549F325008A38F5 /* CameraViewController.xib */,
F414D9D81549F325008A38F5 /* FullscreenTransitionDelegate.h */,
- F414D9D91549F325008A38F5 /* GalleryViewController.h */,
- F414D9DA1549F325008A38F5 /* GalleryViewController.m */,
- F414D9DB1549F325008A38F5 /* GalleryViewController.xib */,
F414D9DC1549F325008A38F5 /* ImageScrollView.h */,
F414D9DD1549F325008A38F5 /* ImageScrollView.m */,
F414D9DE1549F325008A38F5 /* LoadingViewController.h */,
@@ -655,7 +647,6 @@
F4F2859E150DEA3A009A24C9 /* mapDeviceUserPoint.png in Resources */,
F414DA0A1549F325008A38F5 /* InfoPlist.strings in Resources */,
F414DA191549F325008A38F5 /* CameraViewController.xib in Resources */,
- F414DA1F1549F325008A38F5 /* GalleryViewController.xib in Resources */,
F414DA281549F325008A38F5 /* LoadingViewController.xib in Resources */,
F414DA2E1549F325008A38F5 /* MapViewController.xib in Resources */,
F414DA341549F325008A38F5 /* SwoopTabViewController.xib in Resources */,
@@ -693,7 +684,6 @@
F414DA101549F325008A38F5 /* OrderedDictionary.m in Sources */,
F414DA131549F325008A38F5 /* AppDelegate.m in Sources */,
F414DA161549F325008A38F5 /* CameraViewController.m in Sources */,
- F414DA1C1549F325008A38F5 /* GalleryViewController.m in Sources */,
F414DA221549F325008A38F5 /* ImageScrollView.m in Sources */,
F414DA251549F325008A38F5 /* LoadingViewController.m in Sources */,
F414DA2B1549F325008A38F5 /* MapViewController.m in Sources */,
@@ -731,10 +721,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = (
- armv6,
- "$(ARCHS_STANDARD_32_BIT)",
- );
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -757,7 +744,7 @@
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos5.0;
TARGETED_DEVICE_FAMILY = 1;
- VALID_ARCHS = "armv7 armv6";
+ VALID_ARCHS = armv7;
};
name = Debug;
};
@@ -765,10 +752,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = (
- armv6,
- "$(ARCHS_STANDARD_32_BIT)",
- );
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -786,17 +770,14 @@
SDKROOT = iphoneos5.0;
TARGETED_DEVICE_FAMILY = 1;
VALIDATE_PRODUCT = YES;
- VALID_ARCHS = "armv7 armv6";
+ VALID_ARCHS = armv7;
};
name = Release;
};
F4D392BD14BBA6660051E831 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = (
- armv6,
- "$(ARCHS_STANDARD_32_BIT)",
- );
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = (
@@ -812,7 +793,7 @@
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 1;
- VALID_ARCHS = "armv7 armv6";
+ VALID_ARCHS = armv7;
WRAPPER_EXTENSION = app;
};
name = Debug;
@@ -820,10 +801,7 @@
F4D392BE14BBA6660051E831 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = (
- armv6,
- "$(ARCHS_STANDARD_32_BIT)",
- );
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
FRAMEWORK_SEARCH_PATHS = (
@@ -839,7 +817,7 @@
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 1;
- VALID_ARCHS = "armv7 armv6";
+ VALID_ARCHS = armv7;
WRAPPER_EXTENSION = app;
};
name = Release;
View
9 Source/DataModels/RHDataModel.h
@@ -64,11 +64,12 @@ typedef void ( ^CompletedBlock )();
+ (void) addProject:(NSString *) projectName;
-//+ (UIImage *) getThumbnailForId: (NSString *) documentId;
-//+ (UIImage *) getImageForId: (NSString *) documentId;
++ (UIImage *) getDocumentThumbnail: (NSString *) documentId;
++ (UIImage *) getDocumentImage: (NSString *) documentId;
-+ (void) addDocument: (NSDictionary *) document;
-+ (void) addDocument: (NSDictionary *) document withAttachments: (NSDictionary *) attachments;
++ (NSString *) addDocument: (NSDictionary *) document;
++ (NSString *) addDocument: (NSDictionary *) document withAttachments: (NSDictionary *) attachments;
++ (void) addAttachment:(NSString *) name toDocument: (NSString *) documentId withData: (NSData *) data andContentType: (NSString *) contentType;
+ (NSArray *) getDetailDocumentsWithStartKey: (NSString *) startKey andLimit: (NSInteger) limit;
View
43 Source/DataModels/RHDataModel.m
@@ -220,23 +220,23 @@ - (id) initWithBlock:( void ( ^ )() ) didStartBlock {
}
-+ (NSData *) getDocumentThumbnailData: (NSString *) key {
++ (UIImage *) getDocumentThumbnail: (NSString *) key {
CouchDocument* doc = [[self.instance database] documentWithID: key];
CouchModel * model = [[CouchModel alloc] initWithDocument:doc];
CouchAttachment * thumbnail = [model attachmentNamed:@"thumb.jpg"];
if(thumbnail != nil){
- return thumbnail.body;
+ return [UIImage imageWithData: thumbnail.body];
} else {
return nil;
}
}
-+ (NSData *) getDocumentImageData: (NSString *) key {
++ (UIImage *) getDocumentImage: (NSString *) key {
CouchDocument* doc = [[self.instance database] documentWithID: key];
CouchModel * model = [[CouchModel alloc] initWithDocument:doc];
- CouchAttachment * thumbnail = [model attachmentNamed:@"medium.jpg"];
- if(thumbnail != nil){
- return thumbnail.body;
+ CouchAttachment * image = [model attachmentNamed:@"medium.jpg"];
+ if(image != nil){
+ return [UIImage imageWithData: image.body];
} else {
return nil;
}
@@ -264,7 +264,7 @@ - (NSArray *) runQuery: (CouchQuery *) couchQuery {
//Fix Image Attachments
//TODO: This code can be removed once we are reasonably certain everything has been transformed
//BOOL docNeedsSave = false;
- // CouchDocument * doc = row.document;
+ CouchDocument * doc = row.document;
// NSMutableDictionary * newProperties = [doc.properties mutableCopy ];
@@ -305,7 +305,7 @@ - (NSArray *) runQuery: (CouchQuery *) couchQuery {
}
*/
-
+ /*
NSMutableDictionary * properties = [(NSDictionary *) row.value mutableCopy];
//Translate the Base64 data into a UIImage
if([properties objectForKey:@"thumb"] != NULL && [properties objectForKey:@"thumb"] != @"" ){
@@ -337,9 +337,10 @@ - (NSArray *) runQuery: (CouchQuery *) couchQuery {
} else {
[properties removeObjectForKey:@"medium"];
}
-
+ */
//give em the data
+ NSDictionary * properties = doc.properties;
[data addObject: [[RHDocument alloc] initWithDictionary: [NSDictionary dictionaryWithDictionary: properties]]];
}
return data;
@@ -462,7 +463,7 @@ + (NSArray *) getProjects {
return [self.instance _getProjects];
}
-+ (void) addDocument: (NSDictionary *) document {
++ (NSString *) addDocument: (NSDictionary *) document {
//Add any additional properties
// Save the document, asynchronously:
@@ -480,8 +481,28 @@ + (void) addDocument: (NSDictionary *) document {
[op start];
[op wait]; //kickin it synchronous for right now.
+ RESTBody * responseBody = op.responseBody;
+ NSLog([op.responseBody asString]);
+
+ NSDictionary * object = (NSDictionary *)responseBody.fromJSON;
+ NSLog([object objectForKey:@"id"]);
+ return [object objectForKey:@"id"];
}
++ (void) addAttachment:(NSString *) name toDocument: (NSString *) documentId withData: (NSData *) data andContentType: (NSString *) contentType {
+
+ CouchDocument * doc = [self.instance.database documentWithID:documentId];
+ CouchRevision * revision = doc.currentRevision;
+
+ CouchAttachment * newAttachment = [revision createAttachmentWithName:name
+ type:contentType ];
+
+ RESTOperation * op2 = [newAttachment PUT:data contentType:contentType];
+ [op2 start];
+ [op2 wait];
+ //kickin it synchronous for right now.
+
+}
// Display an error alert, without blocking.
@@ -610,4 +631,6 @@ - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
}
+
+
@end
View
2  Source/DataModels/RHDocument.h
@@ -19,6 +19,8 @@
- (NSString *) getDateString;
- (float) getLatitude;
- (float) getLongitude;
+- (UIImage *) getThumbnail;
+- (UIImage *) getImage;
@end
View
7 Source/DataModels/RHDocument.m
@@ -7,6 +7,7 @@
//
#import "RHDocument.h"
+#import "RHDataModel.h"
@implementation RHDocument
@@ -80,6 +81,12 @@ - (void)removeObjectForKey:(id)aKey{
return [dictionary removeObjectForKey:aKey];
}
+- (UIImage *)getThumbnail {
+ return [RHDataModel getDocumentThumbnail:[self objectForKey:@"_id"]];
+}
+- (UIImage *)getImage {
+ return [RHDataModel getDocumentImage:[self objectForKey:@"_id"]];
+}
@end
View
1  Source/Views and Controllers/AppDelegate.m
@@ -7,7 +7,6 @@
//
#import "AppDelegate.h"
-#import "GalleryViewController.h"
#import "CameraViewController.h"
#import "MapViewController.h"
#import "RHDataModel.h"
View
10 Source/Views and Controllers/CameraViewController.m
@@ -314,8 +314,8 @@ - (IBAction) didTouchSendButton:(id)sender{
[RHLocation getLatitudeString], @"latitude",
[RHLocation getLongitudeString], @"longitude",
[RESTBody JSONObjectWithDate: [NSDate date]], @"created_at",
- [RESTBody base64WithData: thumbImageDataJpeg ], @"thumb",
- [RESTBody base64WithData: mediumImageDataJpeg ], @"medium",
+ //[RESTBody base64WithData: thumbImageDataJpeg ], @"thumb",
+ //[RESTBody base64WithData: mediumImageDataJpeg ], @"medium",
[RHDeviceUser uniqueIdentifier], @"deviceuser_identifier",
[[RHDataModel instance] project], @"project",
nil];
@@ -326,8 +326,12 @@ - (IBAction) didTouchSendButton:(id)sender{
[newDocument setObject:@"true" forKey:attribute];
}
- [RHDataModel addDocument:newDocument];
+ NSString * documentId = [RHDataModel addDocument:newDocument];
+
+ [RHDataModel addAttachment:@"thumb.jpg" toDocument:documentId withData:thumbImageDataJpeg andContentType:@"image/jpeg"];
+ [RHDataModel addAttachment:@"medium.jpg" toDocument:documentId withData:mediumImageDataJpeg andContentType:@"image/jpeg"];
+
[UIView beginAnimations:@"anim" context:nil];
[UIView setAnimationDuration:0.50];
CGRect frame = self.pictureInfo.frame;
View
38 Source/Views and Controllers/CameraViewController.xib
@@ -44,8 +44,7 @@
<string key="NSFrameSize">{480, 320}</string>
<reference key="NSSuperview" ref="435328174"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
- <int key="IBUIContentMode">1</int>
+ <int key="IBUIContentMode">2</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSCustomResource" key="IBUIImage" id="657876573">
@@ -80,7 +79,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{10, 20}, {300, 298}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="733092094"/>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -94,7 +92,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 31}, {183, 31}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="925087971"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -131,7 +128,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 71}, {263, 31}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="627408329"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -159,7 +155,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{23, 114}, {80, 21}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="775378254"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -182,7 +177,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{23, 210}, {111, 21}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="366955076"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -205,7 +199,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{170, 337}, {140, 25}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
@@ -241,7 +234,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{33, 134}, {30, 33}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="830105881"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">101</int>
@@ -270,7 +262,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{31, 175}, {35, 21}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1070223103"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -293,7 +284,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{97, 134}, {30, 33}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="659290152"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">102</int>
@@ -322,7 +312,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{98, 175}, {28, 21}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="425220164"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -345,7 +334,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{150, 134}, {30, 33}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="24441981"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">103</int>
@@ -374,7 +362,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{153, 175}, {28, 21}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="125998744"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -397,7 +384,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{200, 134}, {30, 33}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="656087336"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">104</int>
@@ -426,7 +412,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{205, 175}, {20, 21}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1045122353"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -449,7 +434,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{251, 134}, {30, 33}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="746387422"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">105</int>
@@ -478,7 +462,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{251, 175}, {30, 21}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="535048568"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -501,7 +484,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{34, 232}, {30, 33}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="631235371"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">106</int>
@@ -530,7 +512,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{25, 273}, {49, 21}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="916357125"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -553,7 +534,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{156, 232}, {30, 33}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="405238386"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">108</int>
@@ -582,7 +562,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{158, 273}, {27, 21}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="605390771"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -605,7 +584,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{201, 232}, {30, 33}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="353950146"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">109</int>
@@ -634,7 +612,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{203, 273}, {27, 21}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="683070502"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -657,7 +634,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{93, 232}, {38, 33}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="379383225"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">107</int>
@@ -686,7 +662,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{82, 273}, {60, 21}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="628806781"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -709,7 +684,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{10, 337}, {140, 25}}</string>
<reference key="NSSuperview" ref="572333430"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="576816793"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -731,7 +705,6 @@
</array>
<string key="NSFrameSize">{320, 476}</string>
<reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="234504480"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
@@ -1341,7 +1314,6 @@
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{135, 105}</string>
<reference key="NSSuperview" ref="930518967"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="477274135"/>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -1355,7 +1327,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{24, 8}, {87, 36}}</string>
<reference key="NSSuperview" ref="930518967"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="655035788"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -1379,7 +1350,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{24, 58}, {87, 36}}</string>
<reference key="NSSuperview" ref="930518967"/>
- <reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
@@ -1400,7 +1370,6 @@
</array>
<string key="NSFrameSize">{135, 105}</string>
<reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="113628077"/>
<object class="NSColor" key="IBUIBackgroundColor" id="775985189">
<int key="NSColorSpace">3</int>
@@ -1417,7 +1386,6 @@
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{105, 135}</string>
<reference key="NSSuperview" ref="410107054"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="546253896"/>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -1428,7 +1396,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{62, 24}, {36, 87}}</string>
<reference key="NSSuperview" ref="410107054"/>
- <reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
@@ -1451,7 +1418,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{11, 24}, {36, 87}}</string>
<reference key="NSSuperview" ref="410107054"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1020536908"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -1473,7 +1439,6 @@
</array>
<string key="NSFrameSize">{105, 135}</string>
<reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="218923614"/>
<reference key="IBUIBackgroundColor" ref="775985189"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -1488,6 +1453,7 @@
<string key="NSFrameSize">{480, 320}</string>
<reference key="NSSuperview" ref="349097720"/>
<reference key="NSWindow"/>
+ <int key="IBUIContentMode">2</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<reference key="IBUIImage" ref="657876573"/>
View
59 Source/Views and Controllers/GalleryViewController.h
@@ -1,59 +0,0 @@
-//
-// GalleryViewController.h
-// Wildflowers of Detroit Iphone
-//
-// Created by Deep Winter on 1/9/12.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import "FullscreenTransitionDelegate.h"
-#import "TimelineVisualizationView.h"
-
-@interface GalleryViewController : UIViewController
-{
- id <FullscreenTransitionDelegate> fullscreenTransitionDelegate;
- UIScrollView * galleryScrollView;
- UIView * detailView;
- UIScrollView * detailScrollView;
-
- UIImageView * zoomView;
- UIView * infoView;
- UITextView * infoTextView;
- TimelineVisualizationView * visualization;
-
-}
-
-@property(strong, nonatomic) id <FullscreenTransitionDelegate> fullscreenTransitionDelegate;
-@property(strong, nonatomic) IBOutlet UIScrollView * galleryScrollView;
-@property(strong, nonatomic) IBOutlet UIScrollView * detailScrollView;
-@property(strong, nonatomic) IBOutlet UIView * detailView;
-
-@property(strong, nonatomic) IBOutlet UIImageView * zoomView;
-@property(strong, nonatomic) IBOutlet UIView * infoView;
-@property(strong, nonatomic) IBOutlet UITextView * infoTextView;
-
-@property(strong, nonatomic) IBOutlet TimelineVisualizationView * visualization;
-
-@property(nonatomic, strong) NSMutableArray * nextDocumentSet;
-@property(nonatomic, strong) NSMutableArray * activeDocuments;
-@property(nonatomic, strong) NSMutableArray * prevDocumentSet;
-
-
-- (void)showDetailView;
-- (void)hideDetailView;
-- (void)showInfoView;
-- (void)hideInfoView;
-
-
-- (IBAction)didTouchThumbnail:(id)sender;
-- (IBAction)didTouchDetailCloseButton:(id)sender;
-- (IBAction)didTouchDetailInfoButton:(id)sender;
-- (IBAction)didTouchInfoCloseButton:(id)sender;
-- (IBAction)didTouchLeftScrollButton:(id)sender;
-- (IBAction)didTouchRightScrollButton:(id)sender;
-
-
-
-
-@end
View
270 Source/Views and Controllers/GalleryViewController.m
@@ -1,270 +0,0 @@
-//
-// GalleryViewController.m
-// Wildflowers of Detroit Iphone
-//
-// Created by Deep Winter on 1/9/12.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
-//
-
-#import "GalleryViewController.h"
-#import "RHDataModel.h"
-
-#define kRowHeight 100
-#define kRowWidth 422
-#define kThumbnailPaddingLeft 10
-#define kThumbnailPaddingVertical 10
-#define kThumbnailWidth 50
-#define kThumbnailHeight 50
-#define kThumbnailsPerRow 7
-#define kTabBarWidth 58
-#define kUserDocumentsPerPage 50
-#define kDetailScrollPreloadCount 5
-
-@implementation GalleryViewController
-
-@synthesize galleryScrollView, detailScrollView, detailView;
-@synthesize fullscreenTransitionDelegate;
-@synthesize zoomView, infoTextView, infoView;
-@synthesize visualization;
-
-@synthesize activeDocuments, nextDocumentSet, prevDocumentSet;
-
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
-{
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
-}
-
-- (void)didReceiveMemoryWarning
-{
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
-}
-
-#pragma mark - View lifecycle
-
-- (void) setupGalleryScrollView{
-
- activeDocuments = [[NSMutableArray alloc] init];
-
- //Get first 50 user documents and lay out their thumbnails
- NSArray * userDocuments = [RHDataModel
- getGalleryDocumentsWithStartKey: nil andLimit: nil];
- float count = [userDocuments count];
- int scrollViewPages = ceil( count / 21.0);
- CGRect frame = self.galleryScrollView.frame;
-
- [self.galleryScrollView setContentSize:CGSizeMake(kRowWidth * scrollViewPages , frame.size.height)];
-
-
- for(int i=0; i<[userDocuments count]; i++){
- NSDictionary * document = [userDocuments objectAtIndex:i];
- UIButton * thumbnailButton = [UIButton buttonWithType:UIButtonTypeCustom];
-
- [activeDocuments addObject:document];
-
- CGRect frame;
- frame.size.width = kThumbnailWidth;
- frame.size.height = kThumbnailHeight;
- frame.origin.x = (i % kThumbnailsPerRow) * kThumbnailWidth + (i % kThumbnailsPerRow +1) * kThumbnailPaddingLeft
- + kRowWidth * (i / 21);
- frame.origin.y = ((i%21 / kThumbnailsPerRow) * (kThumbnailHeight + kThumbnailPaddingVertical) + kThumbnailPaddingVertical);
- thumbnailButton.frame = frame;
-
-
- [thumbnailButton setImage: [document valueForKey:@"thumb"]
- forState:UIControlStateNormal];
-
- [thumbnailButton addTarget:self action:@selector(didTouchThumbnail:) forControlEvents:UIControlEventTouchUpInside];
-
- thumbnailButton.tag = [activeDocuments indexOfObject:document];
-
- thumbnailButton.contentMode = UIViewContentModeCenter;
- thumbnailButton.imageView.contentMode = UIViewContentModeCenter;
-
- [self.galleryScrollView addSubview:thumbnailButton];
- }
-}
-
-- (void)viewDidLoad
-{
- [super viewDidLoad];
- // Do any additional setup after loading the view from its nib.
-
-}
-
-- (void)viewDidUnload
-{
- [super viewDidUnload];
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
-}
-
-- (void)viewWillAppear:(BOOL)animated{
- [self setupGalleryScrollView];
-}
-
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
-{
- // Return YES for supported orientations
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
-}
-
-- (void)showDetailView{
- /*
- layout some scroll images for demoing
- */
- NSArray * userDocuments = [RHDataModel getGalleryDocumentsWithStartKey:nil andLimit:nil ];
- int scrollViewPages = [userDocuments count];
-
- [self.detailScrollView setContentSize:CGSizeMake( scrollViewPages * 480, 320)];
-
- for(int i=0; i<[userDocuments count]; i++){
- NSDictionary * document = [userDocuments objectAtIndex:i];
- if([document objectForKey:@"medium"] == nil){
- continue;
- }
-
- UIImage * image = [document objectForKey:@"medium"];
-
- UIImageView * scrollPage = [[UIImageView alloc]init ];
- scrollPage.image = image;
-
- scrollPage.tag = [[document objectForKey:@"_id"] intValue];
-
- CGRect pageFrame = scrollPage.frame;
- pageFrame.origin.x = i*480;
- pageFrame.origin.y = 0;
- pageFrame.size.width = 480;
- pageFrame.size.height = 320;
- scrollPage.frame = pageFrame;
-
- [self.detailScrollView addSubview:scrollPage];
- }
-
-
- [self.view addSubview: self.detailView];
- [self.zoomView removeFromSuperview];
-}
-
-- (void)hideDetailView{
- [self.detailView removeFromSuperview];
- [fullscreenTransitionDelegate subviewReleasingFullscreen];
-
-}
-
-- (void)layoutDetailView{
- [self.detailScrollView setContentSize:CGSizeMake(480 * kDetailScrollPreloadCount, 320)];
- //???
-}
-
-- (void)showInfoView{
- CGRect frame = self.infoView.frame;
- frame.origin.x = (480 - frame.size.width) / 2;
- frame.origin.y = (320 - frame.size.height) /2;
- self.infoView.frame = frame;
- [self.view addSubview:self.infoView];
-}
-
-- (void)hideInfoView{
- [self.infoView removeFromSuperview];
-}
-
-- (IBAction)didTouchRightScrollButton:(id)sender{
- CGPoint offset = self.detailScrollView.contentOffset;
- if(offset.x < self.detailScrollView.contentSize.width){
- offset.x += 480;
- self.detailScrollView.contentOffset = offset;
- }
-}
-
-- (IBAction)didTouchLeftScrollButton:(id)sender{
- CGPoint offset = self.detailScrollView.contentOffset;
- if(offset.x > 0){
- offset.x -= 480;
- self.detailScrollView.contentOffset = offset;
- }
-}
-
-
-#pragma mark - IBActions
-
-- (IBAction)didTouchThumbnail:(id)sender{
-
- UIButton * senderButton = (UIButton *) sender;
- NSDictionary * relevantDocument = (NSDictionary *) [activeDocuments objectAtIndex:senderButton.tag];
- UIImage * zoomImage = [relevantDocument objectForKey:@"medium"];
- self.zoomView.image = zoomImage;
-
- CGPoint senderOrigin = [senderButton.superview convertPoint:senderButton.frame.origin toView:self.view];
-// User this sender origin to place the zoom view
-
- //place detail scroll view
- CGRect frame;
- frame.origin.x = senderOrigin.x;
- frame.origin.y = senderOrigin.y ;
- // + (kThumbnailHeight - kThumbnailWidth * 320 / 480) / 2; // this term is the vert offset of the actual image
- frame.size.width = kThumbnailWidth;
- frame.size.height = frame.size.width; // 320 * kThumbnailWidth / 480;
-
- self.zoomView.frame = frame;
-
- [self.view addSubview:self.zoomView];
-
-
- self.detailScrollView.autoresizingMask = 0;
- /*UIViewAutoresizingFlexibleWidth |
- UIViewAutoresizingFlexibleHeight |
- // UIViewAutoresizingFlexibleLeftMargin |
- UIViewAutoresizingFlexibleRightMargin |
- //UIViewAutoresizingFlexibleTopMargin |
- UIViewAutoresizingFlexibleBottomMargin;
- */
-
- //animate the zoom in, making the detail scroll view fill the screen
- [UIView beginAnimations:nil context:NULL];
- [UIView setAnimationDuration: 0.50];
-
-
- [fullscreenTransitionDelegate subviewRequestingFullscreen];
-
- // CGRect viewFrame = self.view.frame;
- // viewFrame.origin.x = - self.detailScrollView.frame.origin.x;
- // viewFrame.origin.y = - self.detailScrollView.frame.origin.y;
- // viewFrame.size.width = 480 * 480 / kThumbnailWidth;
- // viewFrame.size.height = 320 * 480 / kThumbnailWidth;
- // self.view.frame = viewFrame;
-
- CGRect zoomFrame= self.zoomView.frame;
- zoomFrame.origin.x = 0;
- zoomFrame.origin.y = 0;
- zoomFrame.size.width = 480;
- zoomFrame.size.height = 320;
- self.zoomView.frame = zoomFrame;
-
- [UIView setAnimationDelegate:self];
- [UIView setAnimationDidStopSelector:@selector(showDetailView)];
- [UIView commitAnimations];
-
-}
-
-- (IBAction)didTouchDetailCloseButton:(id)sender{
- [self hideDetailView];
-}
-
-- (IBAction)didTouchDetailInfoButton:(id)sender {
- [self showInfoView];
-}
-
-- (IBAction)didTouchInfoCloseButton:(id)sender{
- [self hideInfoView];
-}
-
-
-@end
View
732 Source/Views and Controllers/GalleryViewController.xib
@@ -1,732 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
- <data>
- <int key="IBDocument.SystemTarget">1280</int>
- <string key="IBDocument.SystemVersion">10K549</string>
- <string key="IBDocument.InterfaceBuilderVersion">1938</string>
- <string key="IBDocument.AppKitVersion">1038.36</string>
- <string key="IBDocument.HIToolboxVersion">461.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">933</string>
- </object>
- <array key="IBDocument.IntegratedClassDependencies">
- <string>IBUIView</string>
- <string>IBUIImageView</string>
- <string>IBUILabel</string>
- <string>IBProxyObject</string>
- <string>IBUITextView</string>
- <string>IBUIScrollView</string>
- <string>IBUIButton</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="IBUIImageView" id="788263241">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">310</int>
- <string key="NSFrameSize">{480, 320}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
- <int key="IBUIContentMode">1</int>
- <bool key="IBUIUserInteractionEnabled">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBUIView" id="686133553">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">310</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="IBUIScrollView" id="537439171">
- <reference key="NSNextResponder" ref="686133553"/>
- <int key="NSvFlags">274</int>
- <string key="NSFrameSize">{480, 320}</string>
- <reference key="NSSuperview" ref="686133553"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="620382628"/>
- <object class="NSColor" key="IBUIBackgroundColor" id="933529078">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- <bool key="IBUIClipsSubviews">YES</bool>
- <bool key="IBUIMultipleTouchEnabled">YES</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <bool key="IBUIPagingEnabled">YES</bool>
- </object>
- <object class="IBUIButton" id="620382628">
- <reference key="NSNextResponder" ref="686133553"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{440, 20}, {22, 22}}</string>
- <reference key="NSSuperview" ref="686133553"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="1008012536"/>
- <bool key="IBUIOpaque">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIContentHorizontalAlignment">0</int>
- <int key="IBUIContentVerticalAlignment">0</int>
- <reference key="IBUIHighlightedTitleColor" ref="933529078"/>
- <object class="NSColor" key="IBUINormalTitleColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
- </object>
- <object class="NSColor" key="IBUINormalTitleShadowColor" id="187086140">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC41AA</bytes>
- </object>
- <object class="NSCustomResource" key="IBUINormalBackgroundImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">up.png</string>
- </object>
- <object class="IBUIFontDescription" key="IBUIFontDescription" id="886247447">
- <int key="type">2</int>
- <double key="pointSize">15</double>
- </object>
- <object class="NSFont" key="IBUIFont" id="384402726">
- <string key="NSName">Helvetica-Bold</string>
- <double key="NSSize">15</double>
- <int key="NSfFlags">16</int>
- </object>
- </object>
- <object class="IBUIButton" id="904303407">
- <reference key="NSNextResponder" ref="686133553"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{418, 258}, {42, 42}}</string>
- <reference key="NSSuperview" ref="686133553"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
- <bool key="IBUIOpaque">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIContentHorizontalAlignment">0</int>
- <int key="IBUIContentVerticalAlignment">0</int>
- <reference key="IBUIHighlightedTitleColor" ref="933529078"/>
- <object class="NSColor" key="IBUINormalTitleColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
- </object>
- <reference key="IBUINormalTitleShadowColor" ref="187086140"/>
- <object class="NSCustomResource" key="IBUINormalBackgroundImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">right.png</string>
- </object>
- <reference key="IBUIFontDescription" ref="886247447"/>
- <reference key="IBUIFont" ref="384402726"/>
- </object>
- <object class="IBUIButton" id="66602438">
- <reference key="NSNextResponder" ref="686133553"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 258}, {42, 42}}</string>
- <reference key="NSSuperview" ref="686133553"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="904303407"/>
- <bool key="IBUIOpaque">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIContentHorizontalAlignment">0</int>
- <int key="IBUIContentVerticalAlignment">0</int>
- <reference key="IBUIHighlightedTitleColor" ref="933529078"/>
- <object class="NSColor" key="IBUINormalTitleColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
- </object>
- <reference key="IBUINormalTitleShadowColor" ref="187086140"/>
- <object class="NSCustomResource" key="IBUINormalBackgroundImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">left.png</string>
- </object>
- <reference key="IBUIFontDescription" ref="886247447"/>
- <reference key="IBUIFont" ref="384402726"/>
- </object>
- <object class="IBUIButton" id="1008012536">
- <reference key="NSNextResponder" ref="686133553"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{438, 57}, {20, 20}}</string>
- <reference key="NSSuperview" ref="686133553"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="66602438"/>
- <bool key="IBUIOpaque">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIContentHorizontalAlignment">0</int>
- <int key="IBUIContentVerticalAlignment">0</int>
- <reference key="IBUIHighlightedTitleColor" ref="933529078"/>
- <object class="NSColor" key="IBUINormalTitleColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
- </object>
- <reference key="IBUINormalTitleShadowColor" ref="187086140"/>
- <object class="NSCustomResource" key="IBUINormalBackgroundImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">info.png</string>
- </object>
- <reference key="IBUIFontDescription" ref="886247447"/>
- <reference key="IBUIFont" ref="384402726"/>
- </object>
- </array>
- <string key="NSFrameSize">{480, 320}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="537439171"/>
- <object class="NSColor" key="IBUIBackgroundColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- <object class="NSColorSpace" key="NSCustomColorSpace">
- <int key="NSID">2</int>
- </object>
- </object>
- <bool key="IBUIClipsSubviews">YES</bool>
- <int key="IBUIContentMode">9</int>
- <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
- <int key="IBUIInterfaceOrientation">3</int>
- <int key="interfaceOrientation">3</int>
- </object>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBUIView" id="191373211">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">274</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="IBUIScrollView" id="451867854">
- <reference key="NSNextResponder" ref="191373211"/>
- <int key="NSvFlags">310</int>
- <string key="NSFrameSize">{480, 290}</string>
- <reference key="NSSuperview" ref="191373211"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
- <object class="NSColor" key="IBUIBackgroundColor" id="600772441">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MCAwIDAAA</bytes>
- </object>
- <bool key="IBUIClipsSubviews">YES</bool>
- <int key="IBUIContentMode">9</int>
- <bool key="IBUIMultipleTouchEnabled">YES</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <bool key="IBUIPagingEnabled">YES</bool>
- <int key="IBUIIndicatorStyle">2</int>
- </object>
- </array>
- <string key="NSFrameSize">{480, 320}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="451867854"/>
- <reference key="IBUIBackgroundColor" ref="600772441"/>
- <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
- <int key="IBUIInterfaceOrientation">3</int>
- <int key="interfaceOrientation">3</int>
- </object>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBUIView" id="536734769">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">292</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="IBUIImageView" id="700500769">
- <reference key="NSNextResponder" ref="536734769"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{0, 1}, {369, 214}}</string>
- <reference key="NSSuperview" ref="536734769"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="552949011"/>
- <bool key="IBUIUserInteractionEnabled">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <object class="NSCustomResource" key="IBUIImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">infoBack.png</string>
- </object>
- </object>
- <object class="IBUITextView" id="467524966">
- <reference key="NSNextResponder" ref="536734769"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 84}, {298, 64}}</string>
- <reference key="NSSuperview" ref="536734769"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
- <object class="NSColor" key="IBUIBackgroundColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
- </object>
- <bool key="IBUIClipsSubviews">YES</bool>
- <float key="IBUIAlpha">0.5</float>
- <bool key="IBUIMultipleTouchEnabled">YES</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <string key="IBUIText">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
- <object class="NSColor" key="IBUITextColor" id="259884877">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MSAxIDEAA</bytes>
- </object>
- <object class="IBUITextInputTraits" key="IBUITextInputTraits">
- <int key="IBUIAutocapitalizationType">2</int>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBUIFontDescription" key="IBUIFontDescription">
- <int key="type">1</int>
- <double key="pointSize">14</double>
- </object>
- <object class="NSFont" key="IBUIFont">
- <string key="NSName">Helvetica</string>
- <double key="NSSize">14</double>
- <int key="NSfFlags">16</int>
- </object>
- </object>
- <object class="IBUIButton" id="49097926">
- <reference key="NSNextResponder" ref="536734769"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{345, 1}, {24, 21}}</string>
- <reference key="NSSuperview" ref="536734769"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="636092415"/>
- <bool key="IBUIOpaque">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIContentHorizontalAlignment">0</int>
- <int key="IBUIContentVerticalAlignment">0</int>
- <string key="IBUINormalTitle">x</string>
- <reference key="IBUIHighlightedTitleColor" ref="933529078"/>
- <reference key="IBUINormalTitleColor" ref="933529078"/>
- <reference key="IBUINormalTitleShadowColor" ref="187086140"/>
- <reference key="IBUIFontDescription" ref="886247447"/>
- <reference key="IBUIFont" ref="384402726"/>
- </object>
- <object class="IBUILabel" id="552949011">
- <reference key="NSNextResponder" ref="536734769"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 20}, {42, 21}}</string>
- <reference key="NSSuperview" ref="536734769"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="49097926"/>
- <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">Label</string>
- <reference key="IBUITextColor" ref="259884877"/>
- <nil key="IBUIHighlightedColor"/>
- <int key="IBUIBaselineAdjustment">1</int>
- <float key="IBUIMinimumFontSize">10</float>
- <object class="IBUIFontDescription" key="IBUIFontDescription" id="1047460324">
- <string key="name">Helvetica</string>
- <string key="family">Helvetica</string>
- <int key="traits">0</int>
- <double key="pointSize">12</double>
- </object>
- <object class="NSFont" key="IBUIFont" id="814956571">
- <string key="NSName">Helvetica</string>
- <double key="NSSize">12</double>
- <int key="NSfFlags">16</int>
- </object>
- </object>
- <object class="IBUILabel" id="636092415">
- <reference key="NSNextResponder" ref="536734769"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 49}, {42, 21}}</string>
- <reference key="NSSuperview" ref="536734769"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="467524966"/>
- <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">Label</string>
- <reference key="IBUITextColor" ref="259884877"/>
- <nil key="IBUIHighlightedColor"/>
- <int key="IBUIBaselineAdjustment">1</int>
- <float key="IBUIMinimumFontSize">10</float>
- <reference key="IBUIFontDescription" ref="1047460324"/>
- <reference key="IBUIFont" ref="814956571"/>
- </object>
- </array>
- <string key="NSFrameSize">{369, 215}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="700500769"/>
- <object class="NSColor" key="IBUIBackgroundColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MCAwAA</bytes>
- </object>
- <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
- <int key="IBUIInterfaceOrientation">3</int>
- <int key="interfaceOrientation">3</int>
- </object>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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">view</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="191373211"/>
- </object>
- <int key="connectionID">3</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">detailView</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="686133553"/>
- </object>
- <int key="connectionID">13</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">zoomView</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="788263241"/>
- </object>
- <int key="connectionID">14</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">infoTextView</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="467524966"/>
- </object>
- <int key="connectionID">25</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">infoView</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="536734769"/>
- </object>
- <int key="connectionID">29</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">detailScrollView</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="537439171"/>
- </object>
- <int key="connectionID">9</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">galleryScrollView</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="451867854"/>
- </object>
- <int key="connectionID">6</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchEventConnection" key="connection">
- <string key="label">didTouchDetailCloseButton:</string>
- <reference key="source" ref="620382628"/>
- <reference key="destination" ref="372490531"/>
- <int key="IBEventType">7</int>
- </object>
- <int key="connectionID">18</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchEventConnection" key="connection">
- <string key="label">didTouchLeftScrollButton:</string>
- <reference key="source" ref="66602438"/>
- <reference key="destination" ref="372490531"/>
- <int key="IBEventType">7</int>
- </object>
- <int key="connectionID">31</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchEventConnection" key="connection">
- <string key="label">didTouchRightScrollButton:</string>
- <reference key="source" ref="904303407"/>
- <reference key="destination" ref="372490531"/>
- <int key="IBEventType">7</int>
- </object>
- <int key="connectionID">32</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchEventConnection" key="connection">
- <string key="label">didTouchDetailInfoButton:</string>
- <reference key="source" ref="1008012536"/>
- <reference key="destination" ref="372490531"/>
- <int key="IBEventType">7</int>
- </object>
- <int key="connectionID">26</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchEventConnection" key="connection">
- <string key="label">didTouchInfoCloseButton:</string>
- <reference key="source" ref="49097926"/>
- <reference key="destination" ref="372490531"/>
- <int key="IBEventType">7</int>
- </object>
- <int key="connectionID">30</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="191373211"/>
- <array class="NSMutableArray" key="children">
- <reference ref="451867854"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">Gallery View</string>
- </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">12</int>
- <reference key="object" ref="686133553"/>
- <array class="NSMutableArray" key="children">
- <reference ref="1008012536"/>
- <reference ref="66602438"/>
- <reference ref="904303407"/>
- <reference ref="620382628"/>
- <reference ref="537439171"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">Detail View</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">10</int>
- <reference key="object" ref="788263241"/>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">27</int>
- <reference key="object" ref="536734769"/>
- <array class="NSMutableArray" key="children">
- <reference ref="552949011"/>
- <reference ref="636092415"/>
- <reference ref="467524966"/>
- <reference ref="700500769"/>
- <reference ref="49097926"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">Info View</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">24</int>
- <reference key="object" ref="467524966"/>
- <reference key="parent" ref="536734769"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">28</int>
- <reference key="object" ref="49097926"/>
- <reference key="parent" ref="536734769"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">33</int>
- <reference key="object" ref="552949011"/>
- <reference key="parent" ref="536734769"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">34</int>
- <reference key="object" ref="636092415"/>
- <reference key="parent" ref="536734769"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">20</int>
- <reference key="object" ref="904303407"/>
- <reference key="parent" ref="686133553"/>
- <string key="objectName">Right</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">19</int>
- <reference key="object" ref="66602438"/>
- <reference key="parent" ref="686133553"/>
- <string key="objectName">Left</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">21</int>
- <reference key="object" ref="1008012536"/>
- <reference key="parent" ref="686133553"/>
- <string key="objectName">Info</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">17</int>
- <reference key="object" ref="620382628"/>
- <reference key="parent" ref="686133553"/>
- <string key="objectName">UpAndOut</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">8</int>
- <reference key="object" ref="537439171"/>
- <reference key="parent" ref="686133553"/>
- <string key="objectName">Detail Scroll View</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">35</int>
- <reference key="object" ref="700500769"/>
- <reference key="parent" ref="536734769"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">5</int>
- <reference key="object" ref="451867854"/>
- <reference key="parent" ref="191373211"/>
- <string key="objectName">Gallery Scroll View</string>
- </object>
- </array>
- </object>
- <dictionary class="NSMutableDictionary" key="flattenedProperties">
- <string key="-1.CustomClassName">GalleryViewController</string>
- <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="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="12.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="17.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="20.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="27.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="28.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="33.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="34.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="35.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="8.CustomClassName">ImageScrollView</string>
- <string key="8.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">35</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <array class="NSMutableArray" key="referencedPartialClassDescriptions">
- <object class="IBPartialClassDescription">
- <string key="className">GalleryViewController</string>
- <string key="superclassName">UIViewController</string>
- <dictionary class="NSMutableDictionary" key="actions">
- <string key="didTouchDetailCloseButton:">id</string>
- <string key="didTouchDetailInfoButton:">id</string>
- <string key="didTouchInfoCloseButton:">id</string>
- <string key="didTouchLeftScrollButton:">id</string>
- <string key="didTouchRightScrollButton:">id</string>
- <string key="didTouchThumbnail:">id</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="actionInfosByName">
- <object class="IBActionInfo" key="didTouchDetailCloseButton:">
- <string key="name">didTouchDetailCloseButton:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="didTouchDetailInfoButton:">
- <string key="name">didTouchDetailInfoButton:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="didTouchInfoCloseButton:">
- <string key="name">didTouchInfoCloseButton:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="didTouchLeftScrollButton:">
- <string key="name">didTouchLeftScrollButton:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="didTouchRightScrollButton:">
- <string key="name">didTouchRightScrollButton:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="didTouchThumbnail:">
- <string key="name">didTouchThumbnail:</string>
- <string key="candidateClassName">id</string>
- </object>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="outlets">
- <string key="detailScrollView">UIScrollView</string>
- <string key="detailView">UIView</string>
- <string key="galleryScrollView">UIScrollView</string>
- <string key="infoTextView">UITextView</string>
- <string key="infoView">UIView</string>
- <string key="visualization">TimelineVisualizationView</string>
- <string key="zoomView">UIImageView</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
- <object class="IBToOneOutletInfo" key="detailScrollView">
- <string key="name">detailScrollView</string>
- <string key="candidateClassName">UIScrollView</string>
- </object>
- <object class="IBToOneOutletInfo" key="detailView">
- <string key="name">detailView</string>
- <string key="candidateClassName">UIView</string>
- </object>
- <object class="IBToOneOutletInfo" key="galleryScrollView">
- <string key="name">galleryScrollView</string>
- <string key="candidateClassName">UIScrollView</string>
- </object>
- <object class="IBToOneOutletInfo" key="infoTextView">
- <string key="name">infoTextView</string>
- <string key="candidateClassName">UITextView</string>
- </object>
- <object class="IBToOneOutletInfo" key="infoView">
- <string key="name">infoView</string>
- <string key="candidateClassName">UIView</string>
- </object>
- <object class="IBToOneOutletInfo" key="visualization">
- <string key="name">visualization</string>
- <string key="candidateClassName">TimelineVisualizationView</string>
- </object>
- <object class="IBToOneOutletInfo" key="zoomView">
- <string key="name">zoomView</string>
- <string key="candidateClassName">UIImageView</string>
- </object>
- </dictionary>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/GalleryViewController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">ImageScrollView</string>
- <string key="superclassName">UIScrollView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/ImageScrollView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">TimelineVisualizationView</string>
- <string key="superclassName">UIView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/TimelineVisualizationView.h</string>
- </object>
- </object>
- </array>
- </object>
- <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="info.png">{22, 22}</string>
- <string key="infoBack.png">{369, 214}</string>
- <string key="left.png">{42, 42}</string>
- <string key="right.png">{42, 42}</string>
- <string key="up.png">{22, 22}</string>
- </dictionary>
- <string key="IBCocoaTouchPluginVersion">933</string>
- </data>
-</archive>
View
11 Source/Views and Controllers/MapViewController.m
@@ -176,7 +176,7 @@ - (void) setupGalleryScrollView{
frame.origin.y = ((i%21 / kThumbnailsPerRow) * (kThumbnailHeight + kThumbnailPaddingVertical) + kThumbnailPaddingVertical);
thumbnailButton.frame = frame;
- UIImage * thumbnailImage = [document valueForKey:@"thumb"];
+ UIImage * thumbnailImage = [document getThumbnail];
if(thumbnailImage != nil){
[thumbnailButton setImage: thumbnailImage
forState:UIControlStateNormal];
@@ -476,7 +476,7 @@ - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnno
calloutButton.frame = frame;
RHDocument * doc = [activeDocuments objectAtIndex:rhusMapAnnotation.tag];
- UIImage * calloutImage = [doc objectForKey:@"thumb"];
+ UIImage * calloutImage = [doc getThumbnail];
[calloutButton setBackgroundImage:calloutImage forState:UIControlStateNormal];
annotationView.leftCalloutAccessoryView = calloutButton;
@@ -538,11 +538,11 @@ - (void)showDetailViewForIndex: (NSInteger) index{
//TODO: currently this reruns the layout every time you click a thumb/callout
for(int i=0; i<[activeDocuments count]; i++){
RHDocument * document = [activeDocuments objectAtIndex:i];
- if([document objectForKey:@"medium"] == nil){
+ if([document getImage] == nil){
continue;
}
- UIImage * image = [document objectForKey:@"medium"];
+ UIImage * image = [document getImage];
UIImageView * scrollPage = [[UIImageView alloc]init ];
scrollPage.image = image;
@@ -620,7 +620,8 @@ - (IBAction)didTouchThumbnail:(id)sender{
UIButton * senderButton = (UIButton *) sender;
NSDictionary * relevantDocument = (NSDictionary *) [activeDocuments objectAtIndex:senderButton.tag];
- UIImage * zoomImage = [relevantDocument objectForKey:@"medium"];
+ RHDocument * document = [[RHDocument alloc] initWithDictionary:relevantDocument];
+ UIImage * zoomImage = [document getImage];
self.zoomView.image = zoomImage;
CGPoint senderOrigin = [senderButton.superview convertPoint:senderButton.frame.origin toView:self.view];
Please sign in to comment.
Something went wrong with that request. Please try again.