If the file is downloaded, open the file, else do nothing (will be implemented later). Refactor legacy code.
[super dealloc];
}
-#pragma mark - Internal
-
-- (CGFloat)findLabelHeight:(NSString*)text font:(UIFont *)font {
- CGSize textLabelSize;
- if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
- // 616, 678
- textLabelSize = CGSizeMake(596.0, 9000.0f);
- } else {
- textLabelSize = CGSizeMake(280.0, 9000.0f);
- }
- CGSize stringSize = [text sizeWithFont:font constrainedToSize:textLabelSize lineBreakMode:UILineBreakModeCharacterWrap];
- return stringSize.height;
-}
-
#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- (CGFloat)tableView:(UITableView *)aTableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
CGFloat result;
-
if ([groups count] > 0 && indexPath.row < [groups count]) {
NSString *groupName = [[groups allKeys] objectAtIndex:indexPath.row];
NSString *groupUsers = [groups objectForKey:groupName];
-
- result = 22.0 + [self findLabelHeight:[NSString stringWithFormat:@"%@", groupUsers] font:[UIFont systemFontOfSize:18.0]];
-
+ result = 22.0 + [[NSString stringWithFormat:@"%@", groupUsers] sizeWithFont:[UIFont systemFontOfSize:18.0]
+ constrainedToSize:(([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) ?
+ CGSizeMake(596.0, 9000.0) :
+ CGSizeMake(280.0, 9000.0))
+ lineBreakMode:UILineBreakModeCharacterWrap].height;
return MAX(aTableView.rowHeight, result);
}
return aTableView.rowHeight;
self.objectDownloadRequests = [NSMutableDictionary dictionary];
[objectDownloadRequests setObject:request forKey:object.fullPath];
return [self callbackWithRequest:request success:^(OpenStackRequest *request) {
+ if (!object.hash)
+ object.hash = [request.responseHeaders objectForKey:@"X-Object-Hash"];
OpenStackAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
- NSString *filePath = [appDelegate.cacheDirectoryPath stringByAppendingFormat:@"/%@.%@",object.hash, object.name.pathExtension];
+ NSString *filePath = [appDelegate.cacheDirectoryPath stringByAppendingFormat:@"/%@.%@", object.hash, object.name.pathExtension];
[[request responseData] writeToFile:filePath atomically:YES];
@synchronized(appDelegate.cachedObjectsDictionary) {
- if (!object.hash)
- object.hash = [request.responseHeaders objectForKey:@"X-Object-Hash"];
[appDelegate.cachedObjectsDictionary setObject:filePath forKey:object.hash];
[appDelegate saveCacheDictionary];
}
#pragma mark -
#pragma mark Table view data source
-- (CGFloat)findLabelHeight:(NSString*)text font:(UIFont *)font {
- CGSize textLabelSize;
-
- if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
- textLabelSize = CGSizeMake(577.0, 9000.0f);
- } else {
- textLabelSize = CGSizeMake(260.0, 9000.0f);
- }
- // pad \n\n to fix layout bug
- CGSize stringSize = [text sizeWithFont:font constrainedToSize:textLabelSize lineBreakMode:UILineBreakModeWordWrap];
- return stringSize.height;
-}
-
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section {
if (section == deleteSection) {
return @"Only empty containers can be deleted.";
@property (nonatomic, retain) Folder *folder;
@property (nonatomic, retain) FolderViewController *folderViewController;
-- (CGFloat)findLabelHeight:(NSString*)text font:(UIFont *)font;
- (void)reloadMetadataSection;
@end
return 0;
}
-- (CGFloat)findLabelHeight:(NSString*)text font:(UIFont *)font {
- CGSize textLabelSize;
- if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
- textLabelSize = CGSizeMake(537.0, 9000.0f);
- } else {
- textLabelSize = CGSizeMake(221.0, 9000.0f);
- }
-
- CGSize stringSize = [text sizeWithFont:font constrainedToSize:textLabelSize lineBreakMode:UILineBreakModeCharacterWrap];
- return stringSize.height;
-}
-
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- CGFloat result;
-
- if (indexPath.section == kOverview) {
+ CGFloat result = tableView.rowHeight;
+ if ((indexPath.section == kOverview) && ((indexPath.row == 0) || (indexPath.row == 1))) {
+ NSString *text;
if (indexPath.row == 0) {
- result = 22 + [self findLabelHeight:folder.name font:[UIFont systemFontOfSize:18.0]];
-
- return MAX(tableView.rowHeight, result);
+ text = folder.name;
} else if (indexPath.row == 1) {
- NSString *folderFullPathToShow = folder.fullPath;
- if ([folderFullPathToShow hasPrefix:@"/"]) {
- folderFullPathToShow = [folderFullPathToShow substringFromIndex:1];
+ text = folder.fullPath;
+ if ([text hasPrefix:@"/"]) {
+ text = [text substringFromIndex:1];
}
- result = 22 + [self findLabelHeight:folderFullPathToShow font:[UIFont systemFontOfSize:18.0]];
-
- return MAX(tableView.rowHeight, result);
}
+ result = 22.0 + [text sizeWithFont:[UIFont systemFontOfSize:18.0]
+ constrainedToSize:(([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) ?
+ CGSizeMake(537.0, 9000.0) :
+ CGSizeMake(221.0, 9000.0))
+ lineBreakMode:UILineBreakModeCharacterWrap].height;
}
-
- return tableView.rowHeight;
+ return MAX(tableView.rowHeight, result);
}
@class OpenStackAccount, Container, StorageObject, ContainersViewController, FolderDetailViewController, StorageObjectViewController;
-@interface FolderViewController : OpenStackViewController <UITableViewDelegate, UITableViewDataSource, UISearchDisplayDelegate, UIActionSheetDelegate> {
+@interface FolderViewController : OpenStackViewController <UITableViewDelegate, UITableViewDataSource, UISearchDisplayDelegate, UIActionSheetDelegate, UIDocumentInteractionControllerDelegate> {
OpenStackAccount *account;
Container *container;
Folder *folder;
FolderDetailViewController *folderDetailVC;
StorageObjectViewController *selectedObjectViewController;
+
+ UIDocumentInteractionController *documentInteractionController;
}
@property (nonatomic, retain) OpenStackAccount *account;
@property (nonatomic, assign) FolderSortDirection sortDateDirection;
@property (nonatomic, assign) FolderDetailViewController *folderDetailVC;
@property (nonatomic, assign) StorageObjectViewController *selectedObjectViewController;
+@property (nonatomic, retain) UIDocumentInteractionController *documentInteractionController;
- (IBAction)homeButtonPressed:(id)sender;
- (IBAction)refreshButtonPressed:(id)sender;
#import "APICallback.h"
#import <MobileCoreServices/MobileCoreServices.h>
#import "ComputeModel.h"
+#import "MediaViewController.h"
static NSString *kSortTypeKey = @"sortType";
static NSString *kSortNameDirectionKey = @"sortNameDirection";
@synthesize account, container, folder, name, containersViewController, selectedContainerIndexPath, contentsLoaded, parentFolderViewController, selectedFolderIndexPath, tableView, needsRefreshing, folderHasBeenRemoved, refreshWhenAppeared, folderDetailVC, selectedObjectViewController, refreshButton;
@synthesize searchBar, searchDisplayController, searchFilter, searchActiveOnRotation;
@synthesize sortTypeButton, sortDirectionButton, sortType, sortNameDirection, sortDateDirection;
+@synthesize documentInteractionController;
#pragma mark - View lifecycle
[searchFilter release];
[sortTypeButton release];
[sortDirectionButton release];
+ [documentInteractionController release];
[super dealloc];
}
if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
cell.accessoryType = UITableViewCellAccessoryNone;
} else {
- cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+ cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
}
CFStringRef mimeType = (CFStringRef)cellObject.contentType;
}
[vc release];
} else if ([[item class] isEqual:[StorageObject class]]) {
- StorageObjectViewController *vc = [[StorageObjectViewController alloc] initWithNibName:@"StorageObjectViewController" bundle:nil];
- vc.account = self.account;
- vc.container = self.container;
- vc.folder = self.folder;
- vc.object = item;
- vc.folderViewController = self;
- [self presentPrimaryViewController:vc];
if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
+ StorageObjectViewController *vc = [[StorageObjectViewController alloc] initWithNibName:@"StorageObjectViewController" bundle:nil];
+ vc.account = self.account;
+ vc.container = self.container;
+ vc.folder = self.folder;
+ vc.object = item;
+ vc.folderViewController = self;
+ [self presentPrimaryViewController:vc];
self.selectedObjectViewController = vc;
OpenStackAppDelegate *app = [[UIApplication sharedApplication] delegate];
if (app.rootViewController.popoverController) {
[app.rootViewController.popoverController dismissPopoverAnimated:YES];
}
+ [vc release];
} else {
+ StorageObject *cellObject = (StorageObject *)item;
+ BOOL fileDownloaded = NO;
+ OpenStackAppDelegate *app = [[UIApplication sharedApplication] delegate];
+ NSString *filePath = [app.cachedObjectsDictionary objectForKey:cellObject.hash];
+ if (filePath) {
+ if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) {
+ fileDownloaded = YES;
+ } else {
+ [app.cachedObjectsDictionary removeObjectForKey:cellObject.hash];
+ [app saveCacheDictionary];
+ }
+ }
+ if (fileDownloaded) {
+ self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:filePath]];
+ self.documentInteractionController.delegate = self;
+ self.documentInteractionController.name = cellObject.name;
+
+ UITableViewCell *openFileCell = [self.tableView cellForRowAtIndexPath:indexPath];
+ CGRect frameToPresentMenuFrom = CGRectMake(openFileCell.frame.origin.x,
+ openFileCell.frame.origin.y - self.tableView.contentOffset.y,
+ openFileCell.frame.size.width,
+ openFileCell.frame.size.height);
+ if (![self.documentInteractionController presentOptionsMenuFromRect:frameToPresentMenuFrom inView:self.view animated:YES]) {
+ if ([cellObject isPlayableMedia]) {
+ MediaViewController *vc = [[MediaViewController alloc] initWithNibName:@"MediaViewController" bundle:nil];
+ vc.container = self.container;
+ vc.object = cellObject;
+ [self.navigationController pushViewController:vc animated:YES];
+ [vc release];
+ } else {
+ [self alert:@"Error" message:@"This file could not be opened."];
+ }
+ }
+ } else {
+ // XXX else load download view controller
+ }
[aTableView deselectRowAtIndexPath:indexPath animated:YES];
}
- [vc release];
}
}
}
- (void)tableView:(UITableView *)aTableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
- FolderDetailViewController *vc = [[FolderDetailViewController alloc] initWithNibName:@"FolderDetailViewController" bundle:nil];
- vc.account = account;
- vc.container = container;
- vc.folder = [[self searchResults] objectAtIndex:indexPath.row];
- vc.folderViewController = self;
- [self.navigationController pushViewController:vc animated:YES];
- [vc release];
+ if (folder.objectsAndFoldersCount) {
+ id item = [[self searchResults] objectAtIndex:indexPath.row];
+ if ([[item class] isEqual:[Folder class]]) {
+ FolderDetailViewController *vc = [[FolderDetailViewController alloc] initWithNibName:@"FolderDetailViewController" bundle:nil];
+ vc.account = account;
+ vc.container = container;
+ vc.folder = item;
+ vc.folderViewController = self;
+ [self.navigationController pushViewController:vc animated:YES];
+ [vc release];
+ } else if ([[item class] isEqual:[StorageObject class]]) {
+ StorageObjectViewController *vc = [[StorageObjectViewController alloc] initWithNibName:@"StorageObjectViewController" bundle:nil];
+ vc.account = self.account;
+ vc.container = self.container;
+ vc.folder = self.folder;
+ vc.object = item;
+ vc.folderViewController = self;
+ [self.navigationController pushViewController:vc animated:YES];
+ [vc release];
+ }
+ }
}
#pragma mark - UISearchDisplayDelegate
}
}
+#pragma mark - UIDocumentInteractionControllerDelegate
+
+- (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller {
+ return self.navigationController;
+}
+
@end
#pragma mark -
#pragma mark Table view data source
-- (CGFloat)findLabelHeight:(NSString*)text font:(UIFont *)font {
- CGSize textLabelSize = CGSizeMake(280.0, 9000.0f);
- // pad \n\n to fix layout bug
- CGSize stringSize = [text sizeWithFont:font constrainedToSize:textLabelSize lineBreakMode:UILineBreakModeCharacterWrap];
- return stringSize.height;
-}
-
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *text = @"";
if (indexPath.section == kRequest) {
} else if (indexPath.section == kResponse) {
//text = [logEntry responseDescription];
text = responseDescription;
- }
- return 20.0 + [self findLabelHeight:text font:[UIFont fontWithName:@"Courier" size:12.0]];
+ }
+ return 20.0 + [text sizeWithFont:[UIFont fontWithName:@"Courier" size:12.0]
+ constrainedToSize:CGSizeMake(280.0, 9000.0)
+ lineBreakMode:UILineBreakModeCharacterWrap].height;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
// The OpenStack project is provided under the Apache 2.0 license.
//
-#import "OpenStackViewController.h"
#import "ASIProgressDelegate.h"
#import <MessageUI/MFMailComposeViewController.h>
@class OpenStackAccount, Container, Folder, StorageObject, AnimatedProgressView, FolderViewController;
-@interface StorageObjectViewController : OpenStackViewController <UITableViewDelegate, UITableViewDataSource, UIDocumentInteractionControllerDelegate, ASIProgressDelegate, UIActionSheetDelegate, MFMailComposeViewControllerDelegate> {
+@interface StorageObjectViewController : UITableViewController <UIDocumentInteractionControllerDelegate, ASIProgressDelegate, UIActionSheetDelegate, MFMailComposeViewControllerDelegate> {
OpenStackAccount *account;
Container *container;
Folder *folder;
AnimatedProgressView *downloadProgressView;
BOOL fileDownloading;
UIActionSheet *cdnURLActionSheet;
- IBOutlet UITableView *tableView;
- IBOutlet UIBarButtonItem *homeButton;
FolderViewController *folderViewController;
UISwitch *objectIsPublicSwitch;
UIDocumentInteractionController *documentInteractionController;
- NSInteger actionsSection;
- NSInteger deleteSection;
- NSInteger versionsSection;
NSInteger publicLinkSection;
NSInteger permissionsSection;
+ NSInteger versionsSection;
+ NSInteger deleteSection;
NSString *oldObjectSharingString;
NSString *oldPublicURI;
@property (nonatomic, retain) Container *container;
@property (nonatomic, retain) Folder *folder;
@property (nonatomic, retain) StorageObject *object;
-@property (nonatomic, retain) IBOutlet UITableView *tableView;
@property (nonatomic, retain) FolderViewController *folderViewController;
@property (nonatomic, retain) NSString *oldPubicURI;
@property (nonatomic, retain) UIDocumentInteractionController *documentInteractionController;
@property (nonatomic, retain) NSString *versionID;
- (void)setProgress:(float)newProgress;
-- (IBAction)homeButtonPressed:(id)sender;
- (void)reloadMetadataSection;
@end
#import "ActivityIndicatorView.h"
#define kDetails 0
+#define kActions 1
#define kMetadata 2
#define maxMetadataViewableLength 12
// TODO: try downloading directly to the file to save memory. don't use object.data
/*
- Name whatever.txt
- Full Path
- Size 123 KB
- Content Type text/plain
-
- Metadata
- Key Value -> tap goes to a metadata item VC to edit or delete
- Key Value
- Add Metadata... (if max not already reached)
+Name whatever.txt
+Full Path folder/whatever.txt
+Size 123 KB
+Type text/plain
+Last Modified 2012-12-21 11:11:00
+
+Download File (if downloaded, Open File and Mail File as Attachment)
+"After you download the file, you'll be able to attempt to open it and mail is as an attachment."
+
+Metadata
+Key Value -> tap goes to a metadata item VC to edit or delete
+Key Value
+Add Metadata... (if max not already reached)
+
+Public URL On/Off
+
+Share
- Download File (if downloaded, Open File and Mail File as Attachment)
- "After you download the file, you'll be able to attempt to open it and mail is as an attachment."
+Versions
- Delete Object
- */
+Delete Object
+*/
@implementation StorageObjectViewController
-@synthesize account, container, folder, object, tableView, folderViewController;
+@synthesize account, container, folder, object, folderViewController;
@synthesize oldPubicURI, documentInteractionController, actionSelectedIndexPath, objectIsReadOnly, versionID;
+#pragma mark - View lifecycle
+
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) || (toInterfaceOrientation == UIInterfaceOrientationPortrait);
}
-- (void)setBackgroundView {
- UIImageView *logo = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cloudfiles-large.png"]];
-
- if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
- UIView *backgroundContainer = [[UIView alloc] init];
- backgroundContainer.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
- backgroundContainer.backgroundColor = [UIColor iPadTableBackgroundColor];
- logo.contentMode = UIViewContentModeScaleAspectFit;
- logo.frame = CGRectMake(100.0, 100.0, 1000.0, 1000.0);
- logo.alpha = 0.5;
- [backgroundContainer addSubview:logo];
- tableView.backgroundView = backgroundContainer;
- [backgroundContainer release];
- } else {
- self.tableView.backgroundView = nil;
- }
- [logo release];
-}
-
-- (IBAction)homeButtonPressed:(id)sender {
- [self.navigationController popToRootViewControllerAnimated:YES];
-}
-
-#pragma mark - View lifecycle
-
- (void)viewDidLoad {
[super viewDidLoad];
-
+
objectIsPublicSwitch = [[UISwitch alloc] init];
[objectIsPublicSwitch addTarget:self action:@selector(objectIsPublicSwitchChanged:) forControlEvents:UIControlEventValueChanged];
downloadProgressView.frame = rect;
}
- //[self setBackgroundView];
- actionsSection = 1;
publicLinkSection = 3;
permissionsSection = 4;
versionsSection = 5;
}
}
-#pragma mark - Table view data source
+#pragma mark - Memory management
+
+- (void)dealloc {
+ if (fileDownloading) {
+ OpenStackRequest *request = [self.account.manager.objectDownloadRequests objectForKey:object.fullPath];
+ [request setDownloadProgressDelegate:nil];
+ }
+ [account release];
+ [downloadProgressView release];
+ [cdnURLActionSheet release];
+ [folderViewController release];
+ [objectIsPublicSwitch release];
+ [permissions release];
+ [documentInteractionController release];
+ [actionSelectedIndexPath release];
+ [versionID release];
+ [super dealloc];
+}
+
+#pragma mark - Internal
+
+- (void)objectIsPublicSwitchChanged:(id)sender {
+ NSString *activityMessage = [NSString stringWithFormat:@"Enabling public link.."];
+ self.oldPubicURI = object.publicURI;
+
+ if (objectIsPublic) {
+ activityMessage = [NSString stringWithFormat:@"Disabling public link.."];
+ object.publicURI = @"";
+ } else {
+ object.publicURI = @"TRUE";
+ }
+ __block ActivityIndicatorView *activityIndicatorView = [ActivityIndicatorView activityIndicatorViewWithText:activityMessage
+ andAddToView:self.view
+ scrollOffset:self.tableView.contentOffset.y];
+ objectIsPublic = !objectIsPublic;
+ [[self.account.manager writeObjectMetadata:container object:object]
+ success:^(OpenStackRequest *request) {
+ NSIndexPath *publicURICellIndexPath = [NSIndexPath indexPathForRow:1 inSection:publicLinkSection];
+ if (objectIsPublic) {
+ [[self.account.manager getObjectInfo:container object:object version:versionID]
+ success:^(OpenStackRequest *request) {
+ [activityIndicatorView removeFromSuperview];
+ object.publicURI = [request.responseHeaders objectForKey:@"X-Object-Public"];
+ NSIndexPath *publicURICellIndexPath = [NSIndexPath indexPathForRow:1 inSection:publicLinkSection];
+ [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:publicURICellIndexPath]
+ withRowAnimation:UITableViewRowAnimationBottom];
+ }
+ failure:^(OpenStackRequest *request) {
+ [activityIndicatorView removeFromSuperview];
+ [self alert:@"There was a problem retrieving the public link from the server." request:request];
+ }];
+ } else {
+ [activityIndicatorView removeFromSuperview];
+ [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:publicURICellIndexPath]
+ withRowAnimation:UITableViewRowAnimationTop];
+ }
+ }
+ failure:^(OpenStackRequest *request) {
+ [activityIndicatorView removeFromSuperview];
+ objectIsPublic = !objectIsPublic;
+ objectIsPublicSwitch.on = !objectIsPublicSwitch.on;
+ object.publicURI = oldPubicURI;
+ [self alert:@"There was a problem enabling the public link." request:request];
+ }];
+}
+
+#pragma mark - Actions
+
+- (void)reloadMetadataSection {
+ __block ActivityIndicatorView *activityIndicatorView = [ActivityIndicatorView activityIndicatorViewWithText:@"Loading metadata..."
+ andAddToView:self.view];
+ [[self.account.manager getObjectInfo:container object:object version:versionID]
+ success:^(OpenStackRequest *request) {
+ [activityIndicatorView removeFromSuperview];
+ object.metadata = [NSMutableDictionary dictionary];
+ for (NSString *header in request.responseHeaders) {
+ NSString *metadataKey;
+ NSString *metadataValue;
+ if ([header rangeOfString:@"X-Object-Meta-"].location != NSNotFound) {
+ metadataKey = [NSString decodeFromPercentEscape:[header substringFromIndex:14]];
+ metadataValue = [NSString decodeFromPercentEscape:[request.responseHeaders objectForKey:header]];
+ [object.metadata setObject:metadataValue forKey:metadataKey];
+ }
+ }
+ NSIndexSet *metadataSections = [NSIndexSet indexSetWithIndex:kMetadata];
+ [self.tableView reloadSections:metadataSections withRowAnimation:UITableViewRowAnimationFade];
+ }
+ failure:^(OpenStackRequest *request) {
+ [activityIndicatorView removeFromSuperview];
+ [self alert:@"There was a problem retrieving the object's metadata." request:request];
+ }];
+}
+
+#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
int numberOfSections = 7;
- if (deleteSection < 0)
- numberOfSections--;
- if (versionsSection < 0)
- numberOfSections--;
if (publicLinkSection < 0)
numberOfSections--;
if (permissionsSection < 0)
numberOfSections--;
+ if (versionsSection < 0)
+ numberOfSections--;
+ if (deleteSection < 0)
+ numberOfSections--;
return numberOfSections;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == kDetails) {
return (object.lastModifiedString ? 5: 4);
+ } else if (section == kActions) {
+ return 2;
} else if (section == kMetadata) {
if (objectIsReadOnly) {
return [object.metadata count];
} else {
return 1 + [object.metadata count];
}
- } else if (section == actionsSection) {
- return 2;
} else if (section == publicLinkSection) {
return objectIsPublic ? 2 : 1;
} else if (section == permissionsSection) {
}
}
-- (CGFloat)findLabelHeight:(NSString*)text font:(UIFont *)font {
- CGSize textLabelSize;
- if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
- // 616, 678
- textLabelSize = CGSizeMake(596.0, 9000.0f);
- } else {
- textLabelSize = CGSizeMake(280.0, 9000.0f);
- }
- CGSize stringSize = [text sizeWithFont:font constrainedToSize:textLabelSize lineBreakMode:UILineBreakModeCharacterWrap];
- return stringSize.height;
-}
-
- (CGFloat)tableView:(UITableView *)aTableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
CGFloat result = aTableView.rowHeight;
-
- if (indexPath.section == kDetails && indexPath.row == 1) {
- CGSize textLabelSize;
- if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
- textLabelSize = CGSizeMake(537.0, 9000.0f);
- } else {
- textLabelSize = CGSizeMake(221.0, 9000.0f);
- }
- CGSize stringSize = [object.fullPath sizeWithFont:[UIFont systemFontOfSize:18.0] constrainedToSize:textLabelSize lineBreakMode:UILineBreakModeWordWrap];
- return 22.0 + stringSize.height;
- } else if (indexPath.section == kDetails && indexPath.row == 0) {
- CGSize textLabelSize;
- if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
- textLabelSize = CGSizeMake(537.0, 9000.0f);
- } else {
- textLabelSize = CGSizeMake(221.0, 9000.0f);
+ if ((indexPath.section == kDetails) && ((indexPath.row == 0) || (indexPath.row == 1))) {
+ NSString *text;
+ if (indexPath.row == 0) {
+ text = object.name;
+ } else if (indexPath.row == 1) {
+ text = object.fullPath;
}
- CGSize stringSize = [object.name sizeWithFont:[UIFont systemFontOfSize:18.0] constrainedToSize:textLabelSize lineBreakMode:UILineBreakModeWordWrap];
- return 22.0 + stringSize.height;
- } else if (indexPath.section == publicLinkSection && indexPath.row == 1) {
- NSString *publicLinkUrl = [NSString stringWithFormat:@"%@%@",
- account.pithosPublicLinkURLPrefix,
- self.object.publicURI];
-
- result = 30.0 + [self findLabelHeight:publicLinkUrl font:[UIFont systemFontOfSize:15.0]];
+ result = 22.0 + [text sizeWithFont:[UIFont systemFontOfSize:18.0]
+ constrainedToSize:(([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) ?
+ CGSizeMake(537.0, 9000.0) :
+ CGSizeMake(221.0, 9000.0))
+ lineBreakMode:UILineBreakModeCharacterWrap].height;
+ } else if ((indexPath.section == publicLinkSection) && (indexPath.row == 1)) {
+ NSURL *publicLinkURL = [account.pithosPublicLinkURLPrefix URLByAppendingPathComponent:
+ [NSString encodeToPercentEscape:[self.object.publicURI substringFromIndex:1]
+ charactersToEncode:@"!*'();:@&=+$,?%#[]"]];
+ result = 30.0 + [[publicLinkURL description] sizeWithFont:[UIFont systemFontOfSize:18.0]
+ constrainedToSize:(([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) ?
+ CGSizeMake(596.0, 9000.0) :
+ CGSizeMake(280.0, 9000.0))
+ lineBreakMode:UILineBreakModeCharacterWrap].height;
}
return MAX(aTableView.rowHeight, result);
}
cell.textView.backgroundColor = [UIColor clearColor];
cell.textView.font = [UIFont systemFontOfSize:15.0];
cell.textView.dataDetectorTypes = UIDataDetectorTypeLink;
- cell.textView.text = [NSString stringWithFormat:@"%@%@",
- account.pithosPublicLinkURLPrefix,
- [NSString encodeToPercentEscape:self.object.publicURI charactersToEncode:@"!*'();:@&=+$,?%#[]"]];
+ cell.textView.text = [[account.pithosPublicLinkURLPrefix URLByAppendingPathComponent:
+ [NSString encodeToPercentEscape:[self.object.publicURI substringFromIndex:1]
+ charactersToEncode:@"!*'();:@&=+$,?%#[]"]] description];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.accessoryView = UITableViewCellAccessoryNone;
return cell;
if (indexPath.section == deleteSection) {
static NSString *CellIdentifier = @"DeleteCell";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
cell.selectionStyle = UITableViewCellSelectionStyleBlue;
cell.detailTextLabel.lineBreakMode = UILineBreakModeTailTruncation;
cell.detailTextLabel.text = accessType;
}
- } else if (indexPath.section == actionsSection) {
+ } else if (indexPath.section == kActions) {
if (fileDownloading) {
if (actionSelectedIndexPath.row == indexPath.row) {
cell.accessoryView = downloadProgressView;
return cell;
}
-#pragma mark -
-#pragma mark Table view delegate
-
-- (void)reloadActionsTitleRow:(NSTimer *)timer {
- [[timer.userInfo objectForKey:@"tableView"] reloadRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:0 inSection:actionsSection]] withRowAnimation:UITableViewRowAnimationNone];
-}
+#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == kMetadata) {
vc.folderViewController = folderViewController;
[self.navigationController pushViewController:vc animated:YES];
[vc release];
- } else if (indexPath.section == actionsSection) {
+ } else if (indexPath.section == kActions) {
if (!fileDownloaded) {
if (!fileDownloading) {
// download the file
[self alert:@"File failed to download." request:request];
[self.tableView reloadData];
}];
- [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:indexPath.row inSection:actionsSection]] withRowAnimation:UITableViewRowAnimationNone];
+ [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:indexPath.row inSection:kActions]] withRowAnimation:UITableViewRowAnimationNone];
}
} else if (indexPath.row == 0) {
if (fileDownloaded) {
}
}
- [self.tableView deselectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:actionsSection] animated:YES];
+ [self.tableView deselectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:kActions] animated:YES];
}
} else if (indexPath.row == 1) {
}
}
-
-#pragma mark -
-#pragma mark Document Interaction Controller Delegate
+#pragma mark - UIDocumentInteractionControllerDelegate
- (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *) controller {
return self.navigationController;
}
-- (void)documentInteractionControllerDidEndPreview:(UIDocumentInteractionController *)controllers {
- [self.tableView deselectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:actionsSection] animated:YES];
-}
-
-#pragma mark -
-#pragma mark Action Sheet Delegate
+#pragma mark - UIActionSheetDelegate
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}
-#pragma mark - Mail Composer Delegate
+#pragma mark - MFMailComposeViewControllerDelegate
// Dismisses the email composition interface when users tap Cancel or Send.
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error {
[self dismissModalViewControllerAnimated:YES];
- [self.tableView deselectRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:actionsSection] animated:YES];
-}
-
-#pragma mark - Switches
-
-- (void)objectIsPublicSwitchChanged:(id)sender {
- NSString *activityMessage = [NSString stringWithFormat:@"Enabling public link.."];
- self.oldPubicURI = object.publicURI;
-
- if (objectIsPublic) {
- activityMessage = [NSString stringWithFormat:@"Disabling public link.."];
- object.publicURI = @"";
- } else {
- object.publicURI = @"TRUE";
- }
- __block ActivityIndicatorView *activityIndicatorView = [ActivityIndicatorView activityIndicatorViewWithText:activityMessage
- andAddToView:self.view
- scrollOffset:self.tableView.contentOffset.y];
- objectIsPublic = !objectIsPublic;
- [[self.account.manager writeObjectMetadata:container object:object]
- success:^(OpenStackRequest *request) {
- NSIndexPath *publicURICellIndexPath = [NSIndexPath indexPathForRow:1 inSection:publicLinkSection];
- if (objectIsPublic) {
- [[self.account.manager getObjectInfo:container object:object version:versionID]
- success:^(OpenStackRequest *request) {
- [activityIndicatorView removeFromSuperview];
- object.publicURI = [request.responseHeaders objectForKey:@"X-Object-Public"];
- NSIndexPath *publicURICellIndexPath = [NSIndexPath indexPathForRow:1 inSection:publicLinkSection];
- [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:publicURICellIndexPath]
- withRowAnimation:UITableViewRowAnimationBottom];
- }
- failure:^(OpenStackRequest *request) {
- [activityIndicatorView removeFromSuperview];
- [self alert:@"There was a problem retrieving the public link from the server." request:request];
- }];
- } else {
- [activityIndicatorView removeFromSuperview];
- [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:publicURICellIndexPath]
- withRowAnimation:UITableViewRowAnimationTop];
- }
- }
- failure:^(OpenStackRequest *request) {
- [activityIndicatorView removeFromSuperview];
- objectIsPublic = !objectIsPublic;
- objectIsPublicSwitch.on = !objectIsPublicSwitch.on;
- object.publicURI = oldPubicURI;
- [self alert:@"There was a problem enabling the public link." request:request];
- }];
-}
-
-#pragma mark - Memory management
-
-- (void)dealloc {
- if (fileDownloading) {
- OpenStackRequest *request = [self.account.manager.objectDownloadRequests objectForKey:object.fullPath];
- [request setDownloadProgressDelegate:nil];
- }
- [account release];
- [downloadProgressView release];
- [cdnURLActionSheet release];
- [tableView release];
- [folderViewController release];
- [objectIsPublicSwitch release];
- [permissions release];
- [documentInteractionController release];
- [actionSelectedIndexPath release];
- [versionID release];
- [super dealloc];
-}
-
-#pragma mark - Helper functions
-
-- (void)reloadMetadataSection {
- __block ActivityIndicatorView *activityIndicatorView = [ActivityIndicatorView activityIndicatorViewWithText:@"Loading metadata..."
- andAddToView:self.view];
- [[self.account.manager getObjectInfo:container object:object version:versionID]
- success:^(OpenStackRequest *request) {
- [activityIndicatorView removeFromSuperview];
- object.metadata = [NSMutableDictionary dictionary];
- for (NSString *header in request.responseHeaders) {
- NSString *metadataKey;
- NSString *metadataValue;
- if ([header rangeOfString:@"X-Object-Meta-"].location != NSNotFound) {
- metadataKey = [NSString decodeFromPercentEscape:[header substringFromIndex:14]];
- metadataValue = [NSString decodeFromPercentEscape:[request.responseHeaders objectForKey:header]];
- [object.metadata setObject:metadataValue forKey:metadataKey];
- }
- }
- NSIndexSet *metadataSections = [NSIndexSet indexSetWithIndex:kMetadata];
- [self.tableView reloadSections:metadataSections withRowAnimation:UITableViewRowAnimationFade];
- }
- failure:^(OpenStackRequest *request) {
- [activityIndicatorView removeFromSuperview];
- [self alert:@"There was a problem retrieving the object's metadata." request:request];
- }];
+ [self.tableView deselectRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:kActions] animated:YES];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1280</int>
- <string key="IBDocument.SystemVersion">11D50b</string>
- <string key="IBDocument.InterfaceBuilderVersion">1938</string>
- <string key="IBDocument.AppKitVersion">1138.32</string>
- <string key="IBDocument.HIToolboxVersion">568.00</string>
+ <int key="IBDocument.SystemTarget">1536</int>
+ <string key="IBDocument.SystemVersion">11G63</string>
+ <string key="IBDocument.InterfaceBuilderVersion">2843</string>
+ <string key="IBDocument.AppKitVersion">1138.51</string>
+ <string key="IBDocument.HIToolboxVersion">569.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>
+ <string key="NS.object.0">1929</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>IBProxyObject</string>
- <string>IBUIView</string>
<string>IBUITableView</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
- <object class="IBUIView" id="177554816">
+ <object class="IBUITableView" id="875748033">
<reference key="NSNextResponder"/>
- <int key="NSvFlags">292</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBUITableView" id="875748033">
- <reference key="NSNextResponder" ref="177554816"/>
- <int key="NSvFlags">274</int>
- <string key="NSFrameSize">{320, 460}</string>
- <string key="NSBounds">{{0, 3}, {320, 460}}</string>
- <reference key="NSSuperview" ref="177554816"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
- <object class="NSColor" key="IBUIBackgroundColor">
- <int key="NSColorSpace">10</int>
- <object class="NSImage" key="NSImage">
- <int key="NSImageFlags">549453824</int>
- <string key="NSSize">{512, 1}</string>
- <object class="NSMutableArray" key="NSReps">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="0"/>
- <object class="NSBitmapImageRep">
- <object class="NSData" key="NSTIFFRepresentation">
- <bytes key="NS.bytes">TU0AKgAACAjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/
-y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/
-xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/
-xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/
-xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/
-xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/
-xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/
-y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/
-y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/
-xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/
-xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/
-xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/
-xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/
-xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/
-y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/
-y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/
-xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/
-xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/
-xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/
-xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/
-xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/
-y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/
-y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/
-xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/
-xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/
-xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/
-xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/
-xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/
-y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/
-y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/
-xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/
-xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/
-xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/
-xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/
-xczS/8vS2P/L0tj/xczU/wANAQAAAwAAAAECAAAAAQEAAwAAAAEAAQAAAQIAAwAAAAQAAAiqAQMAAwAA
-AAEAAQAAAQYAAwAAAAEAAgAAAREABAAAAAEAAAAIARIAAwAAAAEAAQAAARUAAwAAAAEABAAAARYAAwAA
-AAEAAQAAARcABAAAAAEAAAgAARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAQAAAiyAAAAAAAI
-AAgACAAIAAEAAQABAAE</bytes>
- </object>
- </object>
- </object>
- </object>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MCAwAA</bytes>
- </object>
- </object>
- <string key="IBUIColorCocoaTouchKeyPath">groupTableViewBackgroundColor</string>
- </object>
- <bool key="IBUIOpaque">NO</bool>
- <bool key="IBUIClipsSubviews">YES</bool>
- <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
- <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <bool key="IBUIBouncesZoom">NO</bool>
- <int key="IBUIStyle">1</int>
- <int key="IBUISeparatorStyle">1</int>
- <int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
- <bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
- <float key="IBUIRowHeight">44</float>
- <float key="IBUISectionHeaderHeight">10</float>
- <float key="IBUISectionFooterHeight">10</float>
- </object>
- </object>
- <string key="NSFrameSize">{320, 460}</string>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <string key="NSBounds">{{0, 3}, {320, 460}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="875748033"/>
+ <reference key="NSNextKeyView"/>
<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>
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MCAwIDAgMAA</bytes>
+ <string key="IBUIColorCocoaTouchKeyPath">groupTableViewBackgroundColor</string>
</object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIBouncesZoom">NO</bool>
+ <int key="IBUIStyle">1</int>
+ <int key="IBUISeparatorStyle">1</int>
+ <int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
+ <bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
+ <float key="IBUIRowHeight">44</float>
+ <float key="IBUISectionHeaderHeight">10</float>
+ <float key="IBUISectionFooterHeight">10</float>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
- <reference key="destination" ref="177554816"/>
- </object>
- <int key="connectionID">13</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">tableView</string>
- <reference key="source" ref="372490531"/>
<reference key="destination" ref="875748033"/>
</object>
- <int key="connectionID">15</int>
+ <int key="connectionID">36</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">dataSource</string>
+ <string key="label">delegate</string>
<reference key="source" ref="875748033"/>
<reference key="destination" ref="372490531"/>
</object>
- <int key="connectionID">16</int>
+ <int key="connectionID">17</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">delegate</string>
+ <string key="label">dataSource</string>
<reference key="source" ref="875748033"/>
<reference key="destination" ref="372490531"/>
</object>
- <int key="connectionID">17</int>
+ <int key="connectionID">16</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">8</int>
- <reference key="object" ref="177554816"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="875748033"/>
- </object>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="875748033"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <reference key="parent" ref="177554816"/>
+ <reference key="parent" ref="0"/>
</object>
</object>
</object>
<string>-1.IBPluginDependency</string>
<string>-2.CustomClassName</string>
<string>-2.IBPluginDependency</string>
- <string>8.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
</object>
- <object class="NSMutableArray" key="dict.values">
+ <object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>StorageObjectViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">34</int>
+ <int key="maxID">36</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
- <string key="className">OpenStackViewController</string>
- <string key="superclassName">UIViewController</string>
- <object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">toolbar</string>
- <string key="NS.object.0">UIToolbar</string>
- </object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <string key="NS.key.0">toolbar</string>
- <object class="IBToOneOutletInfo" key="NS.object.0">
- <string key="name">toolbar</string>
- <string key="candidateClassName">UIToolbar</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/OpenStackViewController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">StorageObjectViewController</string>
- <string key="superclassName">OpenStackViewController</string>
+ <string key="superclassName">UITableViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">homeButtonPressed:</string>
<string key="NS.object.0">id</string>
<string key="candidateClassName">id</string>
</object>
</object>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>homeButton</string>
- <string>tableView</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>UIBarButtonItem</string>
- <string>UITableView</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>homeButton</string>
- <string>tableView</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBToOneOutletInfo">
- <string key="name">homeButton</string>
- <string key="candidateClassName">UIBarButtonItem</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">tableView</string>
- <string key="candidateClassName">UITableView</string>
- </object>
- </object>
- </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/StorageObjectViewController.h</string>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <real value="1280" key="NS.object.0"/>
+ <real value="1536" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">933</string>
+ <string key="IBCocoaTouchPluginVersion">1929</string>
</data>
</archive>