Skip to content

Commit

Permalink
Compress new assets and add TextExpander. Fixes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
soffes committed Jul 28, 2012
1 parent da4e63b commit 41d62b7
Show file tree
Hide file tree
Showing 20 changed files with 80 additions and 3 deletions.
12 changes: 10 additions & 2 deletions Cheddar for iOS.xcodeproj/project.pbxproj
Expand Up @@ -167,6 +167,8 @@
B2AD02EE15C475B100D9B909 /* nav-button-mini@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2AD02EA15C475B100D9B909 /* nav-button-mini@2x.png */; };
B2AD02F015C47BF000D9B909 /* nav-background-mini.png in Resources */ = {isa = PBXBuildFile; fileRef = B2AD02EF15C47BF000D9B909 /* nav-background-mini.png */; };
B2AD02F215C47E4300D9B909 /* nav-background-mini@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2AD02F115C47E4300D9B909 /* nav-background-mini@2x.png */; };
B2AD02F415C482B200D9B909 /* TextExpander.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2AD02F315C482B200D9B909 /* TextExpander.framework */; };
B2AD031915C4896E00D9B909 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2AD031815C4896E00D9B909 /* AudioToolbox.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -436,13 +438,16 @@
B2AD02EA15C475B100D9B909 /* nav-button-mini@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "nav-button-mini@2x.png"; sourceTree = "<group>"; };
B2AD02EF15C47BF000D9B909 /* nav-background-mini.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "nav-background-mini.png"; sourceTree = "<group>"; };
B2AD02F115C47E4300D9B909 /* nav-background-mini@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "nav-background-mini@2x.png"; sourceTree = "<group>"; };
B2AD02F315C482B200D9B909 /* TextExpander.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = TextExpander.framework; sourceTree = "<group>"; };
B2AD031815C4896E00D9B909 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
B23FA752151FE0710069A0D1 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B2AD031915C4896E00D9B909 /* AudioToolbox.framework in Frameworks */,
B28FD2D115BF739300365CD6 /* libicucore.dylib in Frameworks */,
B208C1F715BF64630080705D /* MobileCoreServices.framework in Frameworks */,
B28FD2C815BF732F00365CD6 /* libsqlite3.dylib in Frameworks */,
Expand All @@ -461,6 +466,7 @@
B208C1FB15BF64630080705D /* UIKit.framework in Frameworks */,
B208C1EB15BF64630080705D /* libSSToolkit.a in Frameworks */,
B208C10115BF63E20080705D /* Crashlytics.framework in Frameworks */,
B2AD02F415C482B200D9B909 /* TextExpander.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -609,6 +615,7 @@
B208BECA15BF63E00080705D /* SSToolkit */,
B208BF7915BF63E00080705D /* TTTAttributedLabel */,
B208BE4315BF63E00080705D /* Crashlytics.framework */,
B2AD02F315C482B200D9B909 /* TextExpander.framework */,
);
path = Vendor;
sourceTree = "<group>";
Expand Down Expand Up @@ -673,6 +680,7 @@
B208C1FC15BF64690080705D /* Frameworks */ = {
isa = PBXGroup;
children = (
B2AD031815C4896E00D9B909 /* AudioToolbox.framework */,
B28FD2D015BF739300365CD6 /* libicucore.dylib */,
B28FD2C715BF732F00365CD6 /* libsqlite3.dylib */,
B28FD2C515BF732800365CD6 /* StoreKit.framework */,
Expand Down Expand Up @@ -1282,14 +1290,14 @@
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Vendor\"",
"\"$(SRCROOT)/Vendor/SSToolkit/Tests\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Other Sources/Cheddar-Prefix.pch";
HEADER_SEARCH_PATHS = (
"\"$(SRCROOT)/Vendor/SSToolkit\"",
"\"$(SRCROOT)/Vendor/Bully\"",
"\"$(SRCROOT)/Vendor/CheddarKit\"/**",
"\"$(SRCROOT)/Vendor/TextExpander.framework/Versions/A/Headers\"",
);
INFOPLIST_FILE = "Resources/Cheddar-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
Expand All @@ -1316,14 +1324,14 @@
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Vendor\"",
"\"$(SRCROOT)/Vendor/SSToolkit/Tests\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Other Sources/Cheddar-Prefix.pch";
HEADER_SEARCH_PATHS = (
"\"$(SRCROOT)/Vendor/SSToolkit\"",
"\"$(SRCROOT)/Vendor/Bully\"",
"\"$(SRCROOT)/Vendor/CheddarKit\"/**",
"\"$(SRCROOT)/Vendor/TextExpander.framework/Versions/A/Headers\"",
);
INFOPLIST_FILE = "Resources/Cheddar-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
Expand Down
17 changes: 17 additions & 0 deletions Classes/CDIAddTaskView.m
Expand Up @@ -12,8 +12,10 @@
#import "UIColor+CheddariOSAdditions.h"
#import "UIFont+CheddariOSAdditions.h"
#import "UIButton+CheddariOSAdditions.h"
#import "SMTEDelegateController.h"

@interface CDIAddTaskView () <UITextFieldDelegate>
@property (nonatomic, strong) SMTEDelegateController *textExpander;
- (void)_closeTag;
@end

Expand All @@ -23,6 +25,7 @@ @implementation CDIAddTaskView {
CDITagView *_tagView;
}

@synthesize textExpander = _textExpander;
@synthesize delegate = _delegate;
@synthesize textField = _textField;
@synthesize shadowView = _shadowView;
Expand Down Expand Up @@ -55,6 +58,13 @@ + (CGFloat)margin {
}


#pragma mark - NSObject

- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self.textExpander];
}


#pragma mark - UIView

- (id)initWithFrame:(CGRect)frame {
Expand Down Expand Up @@ -117,6 +127,13 @@ - (id)initWithFrame:(CGRect)frame {
nil];
_shadowView.alpha = 0.0f;
[self addSubview:_shadowView];

if ([SMTEDelegateController isTextExpanderTouchInstalled]) {
self.textExpander = [[SMTEDelegateController alloc] init];
self.textExpander.nextDelegate = self;
_textField.delegate = self.textExpander;
[[NSNotificationCenter defaultCenter] addObserver:self.textExpander selector:@selector(willEnterForeground) name:UIApplicationWillEnterForegroundNotification object:nil];
}
}
return self;
}
Expand Down
28 changes: 27 additions & 1 deletion Classes/CDIListsViewController.m
Expand Up @@ -16,6 +16,7 @@
#import "CDIUpgradeViewController.h"
#import "CDINoListsView.h"
#import "CDIAddListTableViewCell.h"
#import "SMTEDelegateController.h"
#import <SSToolkit/UIScrollView+SSToolkitAdditions.h>

#ifdef CHEDDAR_USE_PASSWORD_FLOW
Expand All @@ -25,6 +26,7 @@
#endif

@interface CDIListsViewController ()
@property (nonatomic, strong) SMTEDelegateController *textExpander;
- (void)_listUpdated:(NSNotification *)notification;
- (void)_currentUserDidChange:(NSNotification *)notification;
- (void)_createList:(id)sender;
Expand All @@ -40,6 +42,18 @@ @implementation CDIListsViewController {
}


@synthesize textExpander = _textExpander;


#pragma mark - NSObject

- (void)dealloc {
if (self.textExpander) {
[[NSNotificationCenter defaultCenter] removeObserver:self.textExpander];
}
}


#pragma mark - UIViewController

- (void)viewDidLoad {
Expand All @@ -60,6 +74,12 @@ - (void)viewDidLoad {

_checkForOneList = YES;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_currentUserDidChange:) name:kCDKCurrentUserChangedNotificationName object:nil];

if ([SMTEDelegateController isTextExpanderTouchInstalled]) {
self.textExpander = [[SMTEDelegateController alloc] init];
self.textExpander.nextDelegate = self;
[[NSNotificationCenter defaultCenter] addObserver:self.textExpander selector:@selector(willEnterForeground) name:UIApplicationWillEnterForegroundNotification object:nil];
}
}


Expand Down Expand Up @@ -348,7 +368,13 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
CDIAddListTableViewCell *cell = (CDIAddListTableViewCell *)[tableView dequeueReusableCellWithIdentifier:addCellIdentifier];
if (!cell) {
cell = [[CDIAddListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:addCellIdentifier];
cell.textField.delegate = self;

if (self.textExpander) {
cell.textField.delegate = self.textExpander;
} else {
cell.textField.delegate = self;
}

[cell.closeButton addTarget:self action:@selector(_cancelAddingList:) forControlEvents:UIControlEventTouchUpInside];
}
[cell.textField becomeFirstResponder];
Expand Down
Binary file modified Resources/Images/nav-back-mini-highlighted.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Resources/Images/nav-back-mini-highlighted@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Resources/Images/nav-back-mini.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Resources/Images/nav-back-mini@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Resources/Images/nav-background-mini.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Resources/Images/nav-background-mini@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Resources/Images/nav-button-mini-highlighted.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Resources/Images/nav-button-mini-highlighted@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Resources/Images/nav-button-mini.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Resources/Images/nav-button-mini@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Vendor/TextExpander.framework/Headers
1 change: 1 addition & 0 deletions Vendor/TextExpander.framework/Resources
1 change: 1 addition & 0 deletions Vendor/TextExpander.framework/TextExpander
@@ -0,0 +1,22 @@
//
// SMTEDelegateController.h
// teiphone
//
// Created by Greg Scown on 8/24/09.
// Copyright 2009-2010 SmileOnMyMac. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SMTEDelegateController : NSObject <UITextViewDelegate, UITextFieldDelegate, UIScrollViewDelegate, UIWebViewDelegate, UISearchBarDelegate> {
}
@property (nonatomic, assign) id nextDelegate;
@property (nonatomic, assign) BOOL provideUndoSupport; // Default: YES

+ (BOOL)isTextExpanderTouchInstalled;
+ (BOOL)snippetsAreShared;
+ (void)setExpansionEnabled:(BOOL)expansionEnabled;
- (void)resetKeyLog;
- (void)willEnterForeground;

@end
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions Vendor/TextExpander.framework/Versions/Current

0 comments on commit 41d62b7

Please sign in to comment.