Permalink
Browse files

remove code

  • Loading branch information...
Ammon Bartram
Ammon Bartram committed Nov 6, 2011
1 parent 0bef074 commit 5af1d4aee9e0e1d203aabcc3ba0cfef941f3f7d2
@@ -37,7 +37,6 @@
6626A1271465E3470019AA25 /* NSData+JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 6626A1251465E3470019AA25 /* NSData+JSONKit.m */; };
6626A12B1465E46B0019AA25 /* ABMultiValueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6626A12A1465E46B0019AA25 /* ABMultiValueAdditions.m */; };
6626A12E1465E5280019AA25 /* NSStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6626A12D1465E5280019AA25 /* NSStringAdditions.m */; };
- 6626A1311465E8210019AA25 /* SCSearchBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 6626A1301465E8210019AA25 /* SCSearchBar.m */; };
6626A1341465E8CA0019AA25 /* UIScreenAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6626A1331465E8CA0019AA25 /* UIScreenAdditions.m */; };
6626A1371465E9530019AA25 /* SCTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6626A1361465E9530019AA25 /* SCTableViewController.m */; };
6626A13D1465F0860019AA25 /* UITableViewAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6626A13C1465F0860019AA25 /* UITableViewAdditions.m */; };
@@ -150,8 +149,6 @@
6626A12A1465E46B0019AA25 /* ABMultiValueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ABMultiValueAdditions.m; path = AddressBook/ABMultiValueAdditions.m; sourceTree = "<group>"; };
6626A12C1465E5280019AA25 /* NSStringAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSStringAdditions.h; path = AddressBook/NSStringAdditions.h; sourceTree = "<group>"; };
6626A12D1465E5280019AA25 /* NSStringAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSStringAdditions.m; path = AddressBook/NSStringAdditions.m; sourceTree = "<group>"; };
- 6626A12F1465E8210019AA25 /* SCSearchBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCSearchBar.h; sourceTree = "<group>"; };
- 6626A1301465E8210019AA25 /* SCSearchBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCSearchBar.m; sourceTree = "<group>"; };
6626A1321465E8CA0019AA25 /* UIScreenAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScreenAdditions.h; path = AddressBook/UIScreenAdditions.h; sourceTree = "<group>"; };
6626A1331465E8CA0019AA25 /* UIScreenAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIScreenAdditions.m; path = AddressBook/UIScreenAdditions.m; sourceTree = "<group>"; };
6626A1351465E9530019AA25 /* SCTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SCTableViewController.h; path = AddressBook/SCTableViewController.h; sourceTree = "<group>"; };
@@ -623,8 +620,6 @@
children = (
49BC8720146659A700EF87BB /* Profile Screen */,
49BC86FC14660C6800EF87BB /* Settings Screen */,
- 6626A12F1465E8210019AA25 /* SCSearchBar.h */,
- 6626A1301465E8210019AA25 /* SCSearchBar.m */,
66A105951466294800E5FC75 /* Account Manager */,
6668555B1465DCAB0023B5DE /* SCReachability.h */,
6668555C1465DCAB0023B5DE /* SCReachability.m */,
@@ -837,7 +832,6 @@
6626A1271465E3470019AA25 /* NSData+JSONKit.m in Sources */,
6626A12B1465E46B0019AA25 /* ABMultiValueAdditions.m in Sources */,
6626A12E1465E5280019AA25 /* NSStringAdditions.m in Sources */,
- 6626A1311465E8210019AA25 /* SCSearchBar.m in Sources */,
6626A1341465E8CA0019AA25 /* UIScreenAdditions.m in Sources */,
6626A1371465E9530019AA25 /* SCTableViewController.m in Sources */,
6626A13D1465F0860019AA25 /* UITableViewAdditions.m in Sources */,
@@ -4,11 +4,6 @@
- (BOOL) hasCaseInsensitivePrefix:(NSString *) prefix;
- (BOOL) hasCaseInsensitiveSuffix:(NSString *) suffix;
-- (NSString *) stringByRemovingCharactersInSet:(NSCharacterSet *) set;
- (NSString *) stringByCapitalizingString;
-
-- (NSString *) stringByEncodingToPercentEscapeString;
-
-- (NSString *) stringByDecodingFromPercentEscapeString;
@end
@@ -23,33 +23,6 @@ - (BOOL) hasCaseInsensitiveSuffix:(NSString *) suffix {
return [self _hasCaseInsensitiveSearchInString:suffix options:NSBackwardsSearch];
}
-#pragma mark -
-
-- (NSString *) stringByRemovingCharactersInSet:(NSCharacterSet *) set {
- NSMutableString *mutableSelf = [self mutableCopy];
- NSUInteger length = self.length;
-
- for (NSUInteger i = 0; i < length; i++) {
- if ([set characterIsMember:[mutableSelf characterAtIndex:i]]) {
- [mutableSelf deleteCharactersInRange:NSMakeRange(i, 1)];
- length--; i--;
- }
- }
-
- return [mutableSelf autorelease];
-}
-
-- (NSString *) stringByEncodingToPercentEscapeString {
- CFStringRef percentEncodedString = CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)self, NULL, (CFStringRef)@"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8);
- return [(NSString *)percentEncodedString autorelease];
-}
-
-- (NSString *) stringByDecodingFromPercentEscapeString {
- CFStringRef percentDecodedString = CFURLCreateStringByReplacingPercentEscapes(NULL, (CFStringRef)self, (CFStringRef)@"");
- return [(NSString *)percentDecodedString autorelease];
-}
-
-
- (NSString *) stringByCapitalizingString {
if (!self.length)
return @"";
@@ -1,5 +1,3 @@
-@class SCSearchBar;
-
typedef enum {
SCAlternateViewPositionNone,
SCAlternateViewPositionTop,
@@ -21,7 +19,6 @@ typedef enum {
BOOL _showsSearchBar;
BOOL _searchImmediately;
- SCSearchBar *_searchBar;
BOOL _unloaded;
BOOL _hasTabbar;
@@ -34,7 +31,6 @@ typedef enum {
@property (nonatomic, assign) BOOL showsSearchBar;
@property (nonatomic, assign) BOOL searchImmediately;
-@property (nonatomic, readonly) SCSearchBar *searchBar;
@property (nonatomic, assign) BOOL hasTabbar;
- (id) initWithStyle:(UITableViewStyle) style position:(SCAlternateViewPosition) position;
@@ -1,7 +1,5 @@
#import "SCTableViewController.h"
-#import "SCSearchBar.h"
-
#import "UIScreenAdditions.h"
#import "UITableViewAdditions.h"
@@ -13,7 +11,6 @@ @implementation SCTableViewController
@synthesize showsSearchBar = _showsSearchBar;
@synthesize searchImmediately = _searchImmediately;
-@synthesize searchBar = _searchBar;
@synthesize hasTabbar = _hasTabbar;
- (id) initWithStyle:(UITableViewStyle) style position:(SCAlternateViewPosition) position {
if (!(self = [super init]))
@@ -30,7 +27,6 @@ - (void) dealloc {
if ([self isViewLoaded]) {
_tableView.dataSource = nil;
_tableView.delegate = nil;
- _searchBar.delegate = nil;
}
[_tableView release];
@@ -62,8 +58,6 @@ - (void) loadView {
_alternateViewHeight = height;
//_alternateView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleRightMargin);
- NSLog(@"alternateViewYOrigin: %f", alternateViewYOrigin);
- NSLog(@"height: %f", height);
// Autoresizing is great once the initial size is set. but it still has to be set first.
if (!_unloaded) {
CGRect frame = _tableView.frame;
@@ -73,10 +67,6 @@ - (void) loadView {
_tableView.frame = frame;
}
- //if (_alternateViewPosition == SCAlternateViewPositionTop)
- //_tableView.autoresizingMask |= UIViewAutoresizingFlexibleBottomMargin;
- // else if (_alternateViewPosition == SCAlternateViewPositionBottom)
- //_tableView.autoresizingMask |= UIViewAutoresizingFlexibleTopMargin;
[view addSubview:_alternateView];
}
@@ -1,3 +0,0 @@
-@interface SCSearchBar : UISearchBar
-- (void) resignForstResponderKeepCancel;
-@end
@@ -1,29 +0,0 @@
-#import "SCSearchBar.h"
-
-@implementation SCSearchBar
-- (void) layoutSubviews {
- for (UIView *subview in self.subviews) {
- if ([subview isKindOfClass:[UITextField class]]) {
- UITextField *textField = (UITextField *)subview;
-
- textField.keyboardAppearance = UIKeyboardAppearanceAlert;
- }
- }
- [super layoutSubviews];
-}
-
-- (void) resignForstResponderKeepCancel {
- for (UIView *subview in self.subviews) {
- if ([subview isKindOfClass:[UITextField class]]) {
- [subview resignFirstResponder];
- }
- }
-
- for (UIView *subview in self.subviews) {
- if ([subview isKindOfClass:[UIButton class]]) {
- ((UIButton *)subview).enabled = YES;
- }
- }
-}
-
-@end

0 comments on commit 5af1d4a

Please sign in to comment.