Skip to content

Commit

Permalink
Re-factored remote load controller because the name sucked. Back to t…
Browse files Browse the repository at this point in the history
…he old name, with the new functionality.
  • Loading branch information
capttaco committed Apr 8, 2010
1 parent ab144f9 commit e8f8177
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 39 deletions.
22 changes: 16 additions & 6 deletions Briefs.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@
D482E51A10EEFB0D00678404 /* gray-button-bg.png in Resources */ = {isa = PBXBuildFile; fileRef = D482E51810EEFB0D00678404 /* gray-button-bg.png */; };
D482E54510F03FE000678404 /* BFColor.m in Sources */ = {isa = PBXBuildFile; fileRef = D482E54410F03FE000678404 /* BFColor.m */; };
D4991095109FEA85008C5E17 /* BFParagraphCellController.m in Sources */ = {isa = PBXBuildFile; fileRef = D4991094109FEA85008C5E17 /* BFParagraphCellController.m */; };
D4A0C262116AD85C0088E5F6 /* BFRemoteLoadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D4A0C260116AD85C0088E5F6 /* BFRemoteLoadViewController.m */; };
D4A0C262116AD85C0088E5F6 /* BFLoadingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D4A0C260116AD85C0088E5F6 /* BFLoadingViewController.m */; };
D4A0C263116AD85C0088E5F6 /* BFRemoteLoadViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D4A0C261116AD85C0088E5F6 /* BFRemoteLoadViewController.xib */; };
D4A0C266116AD9660088E5F6 /* BFProgressBar.m in Sources */ = {isa = PBXBuildFile; fileRef = D4A0C265116AD9660088E5F6 /* BFProgressBar.m */; };
D4A0C269116AF9610088E5F6 /* pop-up-320bg.png in Resources */ = {isa = PBXBuildFile; fileRef = D4A0C268116AF9610088E5F6 /* pop-up-320bg.png */; };
D4A0C31F116D81420088E5F6 /* pop-slider-bg-filled.png in Resources */ = {isa = PBXBuildFile; fileRef = D4A0C31E116D81420088E5F6 /* pop-slider-bg-filled.png */; };
D4A0C33E116D84360088E5F6 /* BFRemoteBriefViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D4A0C33C116D84360088E5F6 /* BFRemoteBriefViewController.m */; };
D4A0C33F116D84360088E5F6 /* FullPageRemoteLoad.xib in Resources */ = {isa = PBXBuildFile; fileRef = D4A0C33D116D84360088E5F6 /* FullPageRemoteLoad.xib */; };
D4A394BA1130F926004971E9 /* flag.png in Resources */ = {isa = PBXBuildFile; fileRef = D4A394B91130F926004971E9 /* flag.png */; };
D4A3976D113B70AB004971E9 /* BFRootView+TapHoldGesture.m in Sources */ = {isa = PBXBuildFile; fileRef = D4A3976C113B70AB004971E9 /* BFRootView+TapHoldGesture.m */; };
D4A3979C113B7591004971E9 /* BFActor.m in Sources */ = {isa = PBXBuildFile; fileRef = D4A39792113B7591004971E9 /* BFActor.m */; };
Expand Down Expand Up @@ -258,13 +260,16 @@
D482E54410F03FE000678404 /* BFColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFColor.m; sourceTree = "<group>"; };
D4991093109FEA85008C5E17 /* BFParagraphCellController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFParagraphCellController.h; sourceTree = "<group>"; };
D4991094109FEA85008C5E17 /* BFParagraphCellController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFParagraphCellController.m; sourceTree = "<group>"; };
D4A0C25F116AD85C0088E5F6 /* BFRemoteLoadViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFRemoteLoadViewController.h; sourceTree = "<group>"; };
D4A0C260116AD85C0088E5F6 /* BFRemoteLoadViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFRemoteLoadViewController.m; sourceTree = "<group>"; };
D4A0C25F116AD85C0088E5F6 /* BFLoadingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFLoadingViewController.h; sourceTree = "<group>"; };
D4A0C260116AD85C0088E5F6 /* BFLoadingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFLoadingViewController.m; sourceTree = "<group>"; };
D4A0C261116AD85C0088E5F6 /* BFRemoteLoadViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = BFRemoteLoadViewController.xib; path = Classes/BFRemoteLoadViewController.xib; sourceTree = "<group>"; };
D4A0C264116AD9660088E5F6 /* BFProgressBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFProgressBar.h; sourceTree = "<group>"; };
D4A0C265116AD9660088E5F6 /* BFProgressBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFProgressBar.m; sourceTree = "<group>"; };
D4A0C268116AF9610088E5F6 /* pop-up-320bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "pop-up-320bg.png"; path = "images/bg/pop-up-320bg.png"; sourceTree = "<group>"; };
D4A0C31E116D81420088E5F6 /* pop-slider-bg-filled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "pop-slider-bg-filled.png"; path = "images/bg/pop-slider-bg-filled.png"; sourceTree = "<group>"; };
D4A0C33B116D84360088E5F6 /* BFRemoteBriefViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFRemoteBriefViewController.h; sourceTree = "<group>"; };
D4A0C33C116D84360088E5F6 /* BFRemoteBriefViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFRemoteBriefViewController.m; sourceTree = "<group>"; };
D4A0C33D116D84360088E5F6 /* FullPageRemoteLoad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = FullPageRemoteLoad.xib; path = Classes/FullPageRemoteLoad.xib; sourceTree = "<group>"; };
D4A394B91130F926004971E9 /* flag.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = flag.png; path = images/flag.png; sourceTree = "<group>"; };
D4A3976B113B70AB004971E9 /* BFRootView+TapHoldGesture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "BFRootView+TapHoldGesture.h"; sourceTree = "<group>"; };
D4A3976C113B70AB004971E9 /* BFRootView+TapHoldGesture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BFRootView+TapHoldGesture.m"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -431,6 +436,7 @@
76FD02EB104CAF4E002E96FA /* nib */ = {
isa = PBXGroup;
children = (
D4A0C33D116D84360088E5F6 /* FullPageRemoteLoad.xib */,
D4A0C261116AD85C0088E5F6 /* BFRemoteLoadViewController.xib */,
D43CE396115465CE00DA07D5 /* BFPreviewBriefViewController.xib */,
D43CE3811154644A00DA07D5 /* BFPagedBrowseViewController.xib */,
Expand Down Expand Up @@ -647,8 +653,10 @@
D43CE3801154644A00DA07D5 /* BFPagedBrowseViewController.m */,
D43CE394115465CE00DA07D5 /* BFPreviewBriefViewController.h */,
D43CE395115465CE00DA07D5 /* BFPreviewBriefViewController.m */,
D4A0C25F116AD85C0088E5F6 /* BFRemoteLoadViewController.h */,
D4A0C260116AD85C0088E5F6 /* BFRemoteLoadViewController.m */,
D4A0C25F116AD85C0088E5F6 /* BFLoadingViewController.h */,
D4A0C260116AD85C0088E5F6 /* BFLoadingViewController.m */,
D4A0C33B116D84360088E5F6 /* BFRemoteBriefViewController.h */,
D4A0C33C116D84360088E5F6 /* BFRemoteBriefViewController.m */,
);
name = controllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -935,6 +943,7 @@
D4A0C263116AD85C0088E5F6 /* BFRemoteLoadViewController.xib in Resources */,
D4A0C269116AF9610088E5F6 /* pop-up-320bg.png in Resources */,
D4A0C31F116D81420088E5F6 /* pop-slider-bg-filled.png in Resources */,
D4A0C33F116D84360088E5F6 /* FullPageRemoteLoad.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1004,8 +1013,9 @@
D43CE5331157055100DA07D5 /* BFPagedContainerView.m in Sources */,
D43CEAB11160376500DA07D5 /* BFArrayBriefDataSource.m in Sources */,
D43CEC36116061CD00DA07D5 /* BriefRef.m in Sources */,
D4A0C262116AD85C0088E5F6 /* BFRemoteLoadViewController.m in Sources */,
D4A0C262116AD85C0088E5F6 /* BFLoadingViewController.m in Sources */,
D4A0C266116AD9660088E5F6 /* BFProgressBar.m in Sources */,
D4A0C33E116D84360088E5F6 /* BFRemoteBriefViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
4 changes: 2 additions & 2 deletions Classes/BFBriefcastViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

#import "BFTableViewController.h"
#import "BFRemoteBriefEventDelegate.h"
#import "BFRemoteLoadViewController.h"
#import "BFLoadingViewController.h"
#import "BriefcastRef.h"

@interface BFBriefcastViewController : BFTableViewController <BFRemoteBriefEventDelegate, BFRemoteLoadViewDelegate>
@interface BFBriefcastViewController : BFTableViewController <BFRemoteBriefEventDelegate, BFLoadingViewDelegate>
{
NSMutableArray *enclosedBriefs;
NSString *channelTitle;
Expand Down
10 changes: 5 additions & 5 deletions Classes/BFBriefcastViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ - (IBAction)reloadBriefcast

- (void)shouldDownloadBrief:(id)sender atURL:(NSString *)url
{
BFRemoteLoadViewController *loading = [[BFRemoteLoadViewController alloc] init];
BFLoadingViewController *loading = [[BFLoadingViewController alloc] init];
[loading view].frame = CGRectOffset([loading view].frame, 0, 72);
[loading setDelegate:self];

Expand All @@ -80,7 +80,7 @@ - (void)shouldLaunchBrief:(id)sender atURL:(NSString *)url
#pragma mark -
#pragma mark BFLoadingViewDelegate Methods

- (void)loadingView:(BFRemoteLoadViewController *)controller didCompleteWithData:(NSData *)data
- (void)loadingView:(BFLoadingViewController *)controller didCompleteWithData:(NSData *)data
{
NSString *remoteNameOfBrief = [[controller locationOfRequest] lastPathComponent];
BriefRef *ref = [[BFDataManager sharedBFDataManager] addBriefAtPath:remoteNameOfBrief usingData:data fromURL:[controller locationOfRequest]];
Expand All @@ -90,17 +90,17 @@ - (void)loadingView:(BFRemoteLoadViewController *)controller didCompleteWithData
[self performSelector:@selector(dismissLoadingViewAnimation:) withObject:[controller view] afterDelay:1.0f];
}

- (void)loadingView:(BFRemoteLoadViewController *)controller didNotCompleteWithError:(NSError *)error
- (void)loadingView:(BFLoadingViewController *)controller didNotCompleteWithError:(NSError *)error
{
[self dismissLoadingViewAnimation:[controller view]];
}

- (void)loadingView:(BFRemoteLoadViewController *)controller shouldDismissView:(BOOL)animate
- (void)loadingView:(BFLoadingViewController *)controller shouldDismissView:(BOOL)animate
{
[self dismissLoadingViewAnimation:[controller view]];
}

- (void)loadingView:(BFRemoteLoadViewController *)controller didCancelConnection:(NSString *)url
- (void)loadingView:(BFLoadingViewController *)controller didCancelConnection:(NSString *)url
{
[self dismissLoadingViewAnimation:[controller view]];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// BFRemoteLoadViewController.h
// BFLoadingViewController.h
// Briefs
//
// Created by Rob Rhyne on 4/5/10.
Expand All @@ -8,16 +8,16 @@

#import "BFProgressBar.h"

@protocol BFRemoteLoadViewDelegate;
@protocol BFLoadingViewDelegate;

@interface BFRemoteLoadViewController : UIViewController
@interface BFLoadingViewController : UIViewController
{
// Outlets
IBOutlet BFProgressBar *progress;
IBOutlet UILabel *statusLabel;
IBOutlet UIButton *dismissButton;

id<BFRemoteLoadViewDelegate> delegate;
id<BFLoadingViewDelegate> delegate;
NSString *workingStatus;

// Internals
Expand All @@ -40,11 +40,11 @@
@end


@protocol BFRemoteLoadViewDelegate
@protocol BFLoadingViewDelegate

- (void)loadingView:(BFRemoteLoadViewController *)controller didCompleteWithData:(NSData *)data;
- (void)loadingView:(BFRemoteLoadViewController *)controller didNotCompleteWithError:(NSError *)error;
- (void)loadingView:(BFRemoteLoadViewController *)controller didCancelConnection:(NSString *)url;
- (void)loadingView:(BFRemoteLoadViewController *)controller shouldDismissView:(BOOL)animate;
- (void)loadingView:(BFLoadingViewController *)controller didCompleteWithData:(NSData *)data;
- (void)loadingView:(BFLoadingViewController *)controller didNotCompleteWithError:(NSError *)error;
- (void)loadingView:(BFLoadingViewController *)controller didCancelConnection:(NSString *)url;
- (void)loadingView:(BFLoadingViewController *)controller shouldDismissView:(BOOL)animate;

@end
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//
// BFRemoteLoadViewController.m
// BFLoadingViewController.m
// Briefs
//
// Created by Rob Rhyne on 4/5/10.
// Copyright Digital Arch Design, 2009-2010. See LICENSE file for details.
//

#import "BFRemoteLoadViewController.h"
#import "BFLoadingViewController.h"


@implementation BFRemoteLoadViewController
@implementation BFLoadingViewController
@synthesize delegate, locationOfRequest, data;

///////////////////////////////////////////////////////////////////////////////
Expand Down
26 changes: 12 additions & 14 deletions Classes/BFRemoteLoadViewController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="1"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand All @@ -36,7 +35,7 @@
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
</object>
<object class="IBUIView" id="191373211">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand Down Expand Up @@ -108,7 +107,6 @@
</object>
</object>
<string key="NSFrameSize">{320, 342}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MSAwAA</bytes>
Expand Down Expand Up @@ -209,7 +207,7 @@
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>BFRemoteLoadViewController</string>
<string>BFLoadingViewController</string>
<string>UIResponder</string>
<string>{{1109, 756}, {320, 342}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
Expand Down Expand Up @@ -241,15 +239,7 @@
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">BFProgressBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/BFProgressBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">BFRemoteLoadViewController</string>
<string key="className">BFLoadingViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">dismissView</string>
Expand All @@ -272,9 +262,17 @@
<string>UILabel</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">BFProgressBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/BFRemoteLoadViewController.h</string>
<string key="minorKey">Classes/BFProgressBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
Expand Down

0 comments on commit e8f8177

Please sign in to comment.