Permalink
Browse files

Rename HSSidebarView to HSImageSidebarView.

  • Loading branch information...
1 parent 115d995 commit 12bcbbef892035177cb1ec85c7d28e9bd66f5882 @bjhomer committed Dec 17, 2010
@@ -7,14 +7,14 @@
//
#import <UIKit/UIKit.h>
-@class HSSidebarView;
+@class HSImageSidebarView;
@interface DeleteImagePopoverController : UIViewController {
}
@property (assign) NSUInteger attachedIndex;
-@property (retain) HSSidebarView *sidebar;
+@property (retain) HSImageSidebarView *sidebar;
@property (assign) UIPopoverController *popoverController;
- (IBAction)delete:(id)sender;
@@ -7,7 +7,7 @@
//
#import "DeleteImagePopoverController.h"
-#import "HSSidebarView.h"
+#import "HSImageSidebarView.h"
@implementation DeleteImagePopoverController
@synthesize sidebar;
@@ -1,22 +1,22 @@
//
-// HSSidebarView.h
+// HSImageSidebarView.h
// Sidebar
//
// Created by BJ Homer on 11/16/10.
// Copyright 2010 BJ Homer. All rights reserved.
//
#import <UIKit/UIKit.h>
-#import "HSSidebarViewDelegate.h"
+#import "HSImageSidebarViewDelegate.h"
-@interface HSSidebarView : UIView {
+@interface HSImageSidebarView : UIView {
}
@property (readonly) NSUInteger imageCount;
@property (readonly) NSIndexSet *visibleIndices;
-@property (assign) id<HSSidebarViewDelegate> delegate;
+@property (assign) id<HSImageSidebarViewDelegate> delegate;
@property (assign) CGFloat rowHeight;
@property (assign) NSInteger selectedIndex;
@@ -1,16 +1,16 @@
//
-// HSSidebarView.m
+// HSImageSidebarView.m
// Sidebar
//
// Created by BJ Homer on 11/16/10.
// Copyright 2010 BJ Homer. All rights reserved.
//
-#import "HSSidebarView.h"
+#import "HSImageSidebarView.h"
#import <QuartzCore/QuartzCore.h>
-@interface HSSidebarView ()
+@interface HSImageSidebarView ()
@property (retain) UIScrollView *scrollView;
@property (retain) CAGradientLayer *selectionGradient;
@@ -41,7 +41,7 @@ - (CGPoint)imageViewCenterInScrollViewForIndex:(NSUInteger)anIndex;
@end
-@implementation HSSidebarView
+@implementation HSImageSidebarView
@synthesize scrollView=_scrollView;
@synthesize imageViews;
@@ -0,0 +1,27 @@
+//
+// HSImageSidebarViewDelegate.h
+// Sidebar
+//
+// Created by BJ Homer on 11/16/10.
+// Copyright 2010 BJ Homer. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+@class HSImageSidebarView;
+
+@protocol HSImageSidebarViewDelegate <NSObject>
+
+#pragma mark -
+#pragma mark Delegate methods
+@optional
+- (void)sidebar:(HSImageSidebarView *)sidebar didTapImageAtIndex:(NSUInteger)anIndex;
+- (void)sidebar:(HSImageSidebarView *)sidebar didMoveImageAtIndex:(NSUInteger)oldIndex toIndex:(NSUInteger)newIndex;
+- (void)sidebar:(HSImageSidebarView *)sidebar didRemoveImageAtIndex:(NSUInteger)anIndex;
+
+#pragma mark -
+#pragma mark Data source methods
+@required
+- (NSUInteger)countOfImagesInSidebar:(HSImageSidebarView *)sidebar;
+- (UIImage *)sidebar:(HSImageSidebarView *)sidebar imageForIndex:(NSUInteger)anIndex;
+
+@end
@@ -1,27 +0,0 @@
-//
-// HSSidebarViewDelegate.h
-// Sidebar
-//
-// Created by BJ Homer on 11/16/10.
-// Copyright 2010 BJ Homer. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-@class HSSidebarView;
-
-@protocol HSSidebarViewDelegate <NSObject>
-
-#pragma mark -
-#pragma mark Delegate methods
-@optional
-- (void)sidebar:(HSSidebarView *)sidebar didTapImageAtIndex:(NSUInteger)anIndex;
-- (void)sidebar:(HSSidebarView *)sidebar didMoveImageAtIndex:(NSUInteger)oldIndex toIndex:(NSUInteger)newIndex;
-- (void)sidebar:(HSSidebarView *)sidebar didRemoveImageAtIndex:(NSUInteger)anIndex;
-
-#pragma mark -
-#pragma mark Data source methods
-@required
-- (NSUInteger)countOfImagesInSidebar:(HSSidebarView *)sidebar;
-- (UIImage *)sidebar:(HSSidebarView *)sidebar imageForIndex:(NSUInteger)anIndex;
-
-@end
@@ -7,16 +7,16 @@
//
#import <UIKit/UIKit.h>
-#import "HSSidebarView.h"
+#import "HSImageSidebarView.h"
@interface SidebarViewController : UIViewController
-<HSSidebarViewDelegate, UIPopoverControllerDelegate>
+<HSImageSidebarViewDelegate, UIPopoverControllerDelegate>
{
- HSSidebarView *_sidebar;
+ HSImageSidebarView *_sidebar;
NSMutableArray *colors;
}
-@property (nonatomic, retain) IBOutlet HSSidebarView *sidebar;
+@property (nonatomic, retain) IBOutlet HSImageSidebarView *sidebar;
- (IBAction)insertRow:(id)sender;
- (IBAction)deleteSelection:(id)sender;
@@ -98,11 +98,11 @@ - (IBAction)deleteSelection:(id)sender {
}
--(NSUInteger)countOfImagesInSidebar:(HSSidebarView *)sidebar {
+-(NSUInteger)countOfImagesInSidebar:(HSImageSidebarView *)sidebar {
return [colors count];
}
--(UIImage *)sidebar:(HSSidebarView *)sidebar imageForIndex:(NSUInteger)anIndex {
+-(UIImage *)sidebar:(HSImageSidebarView *)sidebar imageForIndex:(NSUInteger)anIndex {
int color = [[colors objectAtIndex:anIndex] intValue];
switch (color % 3) {
case 0:
@@ -117,7 +117,7 @@ -(UIImage *)sidebar:(HSSidebarView *)sidebar imageForIndex:(NSUInteger)anIndex {
}
}
--(void)sidebar:(HSSidebarView *)sidebar didTapImageAtIndex:(NSUInteger)anIndex {
+-(void)sidebar:(HSImageSidebarView *)sidebar didTapImageAtIndex:(NSUInteger)anIndex {
NSLog(@"Touched image at index: %u", anIndex);
if (sidebar.selectedIndex == anIndex) {
DeleteImagePopoverController *content = [[DeleteImagePopoverController alloc] initWithNibName:@"DeleteImagePopoverController" bundle:nil];
@@ -136,7 +136,7 @@ -(void)sidebar:(HSSidebarView *)sidebar didTapImageAtIndex:(NSUInteger)anIndex {
}
}
-- (void)sidebar:(HSSidebarView *)sidebar didMoveImageAtIndex:(NSUInteger)oldIndex toIndex:(NSUInteger)newIndex {
+- (void)sidebar:(HSImageSidebarView *)sidebar didMoveImageAtIndex:(NSUInteger)oldIndex toIndex:(NSUInteger)newIndex {
NSLog(@"Image at index %d moved to index %d", oldIndex, newIndex);
NSNumber *color = [[colors objectAtIndex:oldIndex] retain];
@@ -145,7 +145,7 @@ - (void)sidebar:(HSSidebarView *)sidebar didMoveImageAtIndex:(NSUInteger)oldInde
[color release];
}
-- (void)sidebar:(HSSidebarView *)sidebar didRemoveImageAtIndex:(NSUInteger)anIndex {
+- (void)sidebar:(HSImageSidebarView *)sidebar didRemoveImageAtIndex:(NSUInteger)anIndex {
NSLog(@"Image at index %d removed", anIndex);
[colors removeObjectAtIndex:anIndex];
}
@@ -27,7 +27,7 @@
B7B80535129393C400EBE69D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B7B80534129393C400EBE69D /* InfoPlist.strings */; };
B7B80537129393C400EBE69D /* SidebarTests.h in Resources */ = {isa = PBXBuildFile; fileRef = B7B80536129393C400EBE69D /* SidebarTests.h */; };
B7B80539129393C400EBE69D /* SidebarTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B7B80538129393C400EBE69D /* SidebarTests.m */; };
- B7B80549129395F800EBE69D /* HSSidebarView.m in Sources */ = {isa = PBXBuildFile; fileRef = B7B80548129395F800EBE69D /* HSSidebarView.m */; };
+ B7B80549129395F800EBE69D /* HSImageSidebarView.m in Sources */ = {isa = PBXBuildFile; fileRef = B7B80548129395F800EBE69D /* HSImageSidebarView.m */; };
B7D4B0B31294F30E00BC0A01 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7D4B0B21294F30E00BC0A01 /* QuartzCore.framework */; };
/* End PBXBuildFile section */
@@ -58,9 +58,9 @@
B7B80534129393C400EBE69D /* InfoPlist.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = InfoPlist.strings; path = en.lproj/SidebarTests/InfoPlist.strings; sourceTree = "<group>"; };
B7B80536129393C400EBE69D /* SidebarTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SidebarTests.h; sourceTree = "<group>"; };
B7B80538129393C400EBE69D /* SidebarTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SidebarTests.m; sourceTree = "<group>"; };
- B7B80547129395F800EBE69D /* HSSidebarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSSidebarView.h; sourceTree = "<group>"; };
- B7B80548129395F800EBE69D /* HSSidebarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSSidebarView.m; sourceTree = "<group>"; };
- B7B8054A12939ADD00EBE69D /* HSSidebarViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSSidebarViewDelegate.h; sourceTree = "<group>"; };
+ B7B80547129395F800EBE69D /* HSImageSidebarView.h */ = {isa = PBXFileReference; fileEncoding = 4; path = HSImageSidebarView.h; sourceTree = "<group>"; };
+ B7B80548129395F800EBE69D /* HSImageSidebarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSImageSidebarView.m; sourceTree = "<group>"; };
+ B7B8054A12939ADD00EBE69D /* HSImageSidebarViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; path = HSImageSidebarViewDelegate.h; sourceTree = "<group>"; };
B7D4B0B21294F30E00BC0A01 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
@@ -174,9 +174,9 @@
B7B80546129394EA00EBE69D /* HSSidebarView */ = {
isa = PBXGroup;
children = (
- B7B80547129395F800EBE69D /* HSSidebarView.h */,
- B7B80548129395F800EBE69D /* HSSidebarView.m */,
- B7B8054A12939ADD00EBE69D /* HSSidebarViewDelegate.h */,
+ B7B80547129395F800EBE69D /* HSImageSidebarView.h */,
+ B7B80548129395F800EBE69D /* HSImageSidebarView.m */,
+ B7B8054A12939ADD00EBE69D /* HSImageSidebarViewDelegate.h */,
);
name = HSSidebarView;
sourceTree = "<group>";
@@ -295,7 +295,7 @@
B7B8051B129393C400EBE69D /* Sidebar-main.m in Sources */,
B7B8051E129393C400EBE69D /* SidebarAppDelegate.m in Sources */,
B7B80524129393C400EBE69D /* SidebarViewController.m in Sources */,
- B7B80549129395F800EBE69D /* HSSidebarView.m in Sources */,
+ B7B80549129395F800EBE69D /* HSImageSidebarView.m in Sources */,
B77397AE12A4E85C00CE0A4C /* DeleteImagePopoverController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -199,7 +199,7 @@
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="2.IBEditorWindowLastContentRect">{{513, 0}, {783, 856}}</string>
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="4.CustomClassName">HSSidebarView</string>
+ <string key="4.CustomClassName">HSImageSidebarView</string>
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
@@ -212,11 +212,11 @@
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
- <string key="className">HSSidebarView</string>
+ <string key="className">HSImageSidebarView</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./classes-xjh84/HSSidebarView.h</string>
+ <string key="minorKey">./classes-xjh84/HSImageSidebarView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
@@ -228,7 +228,7 @@
</dictionary>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">sidebar</string>
- <string key="NS.object.0">HSSidebarView</string>
+ <string key="NS.object.0">HSImageSidebarView</string>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>

0 comments on commit 12bcbbe

Please sign in to comment.