├── Example ├── Example │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── TSViewController.h │ ├── TSAppDelegate.h │ ├── Example-Prefix.pch │ ├── main.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Example-Info.plist │ ├── TSViewController.m │ ├── TSAppDelegate.m │ └── Base.lproj │ │ └── Main.storyboard └── Example.xcodeproj │ ├── project.xcworkspace │ └── contents.xcworkspacedata │ └── project.pbxproj ├── ExampleImages └── image1.png ├── CHANGELOG.md ├── .gitignore ├── TSCurrencyTextField ├── TSCurrencyTextField.h └── TSCurrencyTextField.m ├── TSCurrencyTextField.podspec ├── LICENSE └── README.md /Example/Example/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ExampleImages/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomSwift/TSCurrencyTextField/HEAD/ExampleImages/image1.png -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ##TSCurrencyTextField Changelog 2 | 3 | ##0.1.0 (Thursday, October 31, 2013) 4 | * Initial Library Release -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | -------------------------------------------------------------------------------- /Example/Example/TSViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TSViewController.h 3 | // Example 4 | // 5 | // Created by Nicholas Hodapp on 10/30/13. 6 | // Copyright (c) 2013 CoDeveloper, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TSViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Example/TSAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TSAppDelegate.h 3 | // Example 4 | // 5 | // Created by Nicholas Hodapp on 10/30/13. 6 | // Copyright (c) 2013 CoDeveloper, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TSAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/Example/Example-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/Example/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Example 4 | // 5 | // Created by Nicholas Hodapp on 10/30/13. 6 | // Copyright (c) 2013 CoDeveloper, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "TSAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([TSAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TSCurrencyTextField/TSCurrencyTextField.h: -------------------------------------------------------------------------------- 1 | // 2 | // TSCurrencyTextField.h 3 | // 4 | // Created by Nicholas Hodapp on 10/30/13. 5 | // Copyright (c) 2013 Nicholas Hodapp. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface TSCurrencyTextField : UITextField 11 | 12 | @property (nonatomic) NSCharacterSet* invalidInputCharacterSet; 13 | @property (nonatomic) NSNumberFormatter* currencyNumberFormatter; 14 | 15 | @property (nonatomic) NSNumber* amount; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Example/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TSCurrencyTextField.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "TSCurrencyTextField" 3 | s.version = "0.1.0" 4 | s.summary = "A UITextField subclass for inputing currency amounts." 5 | s.homepage = "https://github.com/TomSwift/TSCurrencyTextField" 6 | s.license = { :type => 'MIT', :file => 'LICENSE' } 7 | s.author = { "Nick Hodapp" => "nicholashodapp@gmail.com" } 8 | s.source = { :git => "https://github.com/TomSwift/TSCurrencyTextField.git", :tag => "0.1.0" } 9 | s.platform = :ios, '6.1' 10 | s.requires_arc = true 11 | s.screenshots = [ "https://raw.github.com/TomSwift/TSCurrencyTextField/master/ExampleImages/image1.png" ] 12 | s.subspec 'Core' do |ss| 13 | ss.source_files = 'TSCurrencyTextField/TSCurrencyTextField*' 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 CoDeveloper LLC 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ##TSCurrencyTextField 2 | 3 | TSCurrencyTextField is a UITextField subclass that behaves like an ATM currency-amount entry field: the user can enter decimal digits only and the field formats that input into a currency amount, complete with currency symbol ($), decimal point (.), and group separators (,). 4 | 5 |

6 | 7 |

8 | 9 | ##Installing TSCurrencyTextField 10 |
11 | You can install TSCurrencyTextField in your project by using [CocoaPods](https://github.com/cocoapods/cocoapods): 12 | 13 | ```Ruby 14 | pod 'TSCurrencyTextField', '~> 0.1.0' 15 | ``` 16 | 17 | ##Usage 18 | 19 | An example project is included in the Example directory. This should give you an idea how to use the class. 20 | 21 | ##Donate 22 | 23 | Please consider a small donation if you use TSCurrencyTextField in your projects. It'll make me feel good. 24 | 25 | Donate with WePay 26 | 27 | ##License 28 | `TSCurrencyTextField` is available under the MIT license. See the LICENSE file for more info. 29 | -------------------------------------------------------------------------------- /Example/Example/Example-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | codeveloper.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Example/Example/TSViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TSViewController.m 3 | // Example 4 | // 5 | // Created by Nicholas Hodapp on 10/30/13. 6 | // Copyright (c) 2013 CoDeveloper, LLC. All rights reserved. 7 | // 8 | 9 | #import "TSViewController.h" 10 | #import "TSCurrencyTextField.h" 11 | 12 | @interface TSViewController () 13 | @end 14 | 15 | @implementation TSViewController 16 | { 17 | IBOutlet TSCurrencyTextField* _currencyTextField; 18 | 19 | IBOutlet UIButton* _doneButton; 20 | 21 | IBOutlet UILabel* _amountLabel; 22 | } 23 | 24 | - (void)viewDidLoad 25 | { 26 | [super viewDidLoad]; 27 | 28 | _currencyTextField.amount = @9.99; 29 | _currencyTextField.keyboardType = UIKeyboardTypeNumberPad; 30 | 31 | _doneButton.hidden = YES; 32 | _amountLabel.text = _currencyTextField.text; 33 | } 34 | 35 | - (IBAction) done: (id) sender 36 | { 37 | [self.view endEditing: YES]; 38 | } 39 | 40 | - (IBAction) amountChanged: (TSCurrencyTextField*) sender 41 | { 42 | // This could just as easily be _amountLabel.text = sender.text. 43 | // But we want to demonstrate the amount property here. 44 | 45 | _amountLabel.text = [sender.currencyNumberFormatter stringFromNumber: sender.amount]; 46 | } 47 | 48 | - (BOOL) textField: (UITextField *) textField shouldChangeCharactersInRange: (NSRange)range replacementString: (NSString *) string 49 | { 50 | NSAssert( FALSE, @"This should never be called. TSCurrencyTextField doesn't pass this one on!"); 51 | 52 | return YES; 53 | } 54 | 55 | - (void) textFieldDidBeginEditing: (UITextField *) textField 56 | { 57 | NSLog( @"%@", NSStringFromSelector( _cmd ) ); 58 | 59 | _doneButton.hidden = NO; 60 | } 61 | 62 | - (void) textFieldDidEndEditing: (UITextField *) textField 63 | { 64 | NSLog( @"%@", NSStringFromSelector( _cmd ) ); 65 | 66 | _doneButton.hidden = YES; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Example/Example/TSAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TSAppDelegate.m 3 | // Example 4 | // 5 | // Created by Nicholas Hodapp on 10/30/13. 6 | // Copyright (c) 2013 CoDeveloper, LLC. All rights reserved. 7 | // 8 | 9 | #import "TSAppDelegate.h" 10 | 11 | @implementation TSAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /TSCurrencyTextField/TSCurrencyTextField.m: -------------------------------------------------------------------------------- 1 | // 2 | // TSCurrencyTextField.m 3 | // 4 | // Created by Nicholas Hodapp on 10/30/13. 5 | // Copyright (c) 2013 Nicholas Hodapp. All rights reserved. 6 | // 7 | 8 | #import "TSCurrencyTextField.h" 9 | #import 10 | 11 | @interface TSCurrencyTextFieldDelegate : NSObject 12 | @property (weak, nonatomic) id delegate; 13 | @end 14 | 15 | @implementation TSCurrencyTextField 16 | { 17 | TSCurrencyTextFieldDelegate* _currencyTextFieldDelegate; 18 | 19 | NSNumberFormatter* _currencyNumberFormatter; 20 | 21 | NSCharacterSet* _invalidInputCharacterSet; 22 | } 23 | 24 | - (id) initWithCoder: (NSCoder *) aDecoder 25 | { 26 | self = [super initWithCoder: aDecoder]; 27 | if ( self ) 28 | { 29 | [self TSCurrencyTextField_commonInit]; 30 | } 31 | return self; 32 | } 33 | 34 | - (id) initWithFrame: (CGRect) frame 35 | { 36 | self = [super initWithFrame: frame]; 37 | if ( self ) 38 | { 39 | [self TSCurrencyTextField_commonInit]; 40 | } 41 | return self; 42 | } 43 | 44 | - (void) TSCurrencyTextField_commonInit 45 | { 46 | _invalidInputCharacterSet = [[NSCharacterSet decimalDigitCharacterSet] invertedSet]; 47 | 48 | _currencyNumberFormatter = [[NSNumberFormatter alloc] init]; 49 | _currencyNumberFormatter.locale = [NSLocale currentLocale]; 50 | _currencyNumberFormatter.numberStyle = kCFNumberFormatterCurrencyStyle; 51 | _currencyNumberFormatter.usesGroupingSeparator = YES; 52 | 53 | _currencyTextFieldDelegate = [TSCurrencyTextFieldDelegate new]; 54 | [super setDelegate: _currencyTextFieldDelegate]; 55 | 56 | [self setText: @"0"]; 57 | } 58 | 59 | - (void) setCaratPosition: (NSInteger) pos 60 | { 61 | [self setSelectionRange: NSMakeRange( pos, 0) ]; 62 | } 63 | 64 | - (void) setSelectionRange: (NSRange) range 65 | { 66 | UITextPosition *start = [self positionFromPosition: [self beginningOfDocument] 67 | offset: range.location]; 68 | 69 | UITextPosition *end = [self positionFromPosition: start 70 | offset: range.length]; 71 | 72 | [self setSelectedTextRange: [self textRangeFromPosition:start toPosition:end]]; 73 | } 74 | 75 | - (void) setAmount: (NSNumber *) amount 76 | { 77 | NSString* amountString = [NSString stringWithFormat: @"%.*lf", _currencyNumberFormatter.maximumFractionDigits, amount.doubleValue]; 78 | [self setText: amountString]; 79 | } 80 | 81 | - (NSNumber*) amountFromString: (NSString*) string 82 | { 83 | NSString* digitString = [[string componentsSeparatedByCharactersInSet: _invalidInputCharacterSet] componentsJoinedByString: @""]; 84 | 85 | NSParameterAssert( _currencyNumberFormatter.maximumFractionDigits == _currencyNumberFormatter.minimumFractionDigits ); 86 | NSInteger fd = _currencyNumberFormatter.minimumFractionDigits; 87 | NSNumber* n = [NSNumber numberWithDouble: [digitString doubleValue] / pow(10.0, fd) ]; 88 | 89 | return n; 90 | } 91 | 92 | - (NSNumber*) amount 93 | { 94 | return [self amountFromString: self.text]; 95 | } 96 | 97 | - (void) setDelegate:(id)delegate 98 | { 99 | _currencyTextFieldDelegate.delegate = delegate; 100 | } 101 | 102 | - (id) delegate 103 | { 104 | return _currencyTextFieldDelegate.delegate; 105 | } 106 | 107 | - (void) setText: (NSString *) text 108 | { 109 | NSString* formatted = [_currencyNumberFormatter stringFromNumber: [self amountFromString: text]]; 110 | 111 | [super setText: formatted]; 112 | } 113 | 114 | @end 115 | 116 | @implementation TSCurrencyTextFieldDelegate 117 | 118 | - (BOOL) respondsToSelector: (SEL) aSelector 119 | { 120 | // we'll forward any implemented UITextFieldDelegate method, other than the one we implement ourself. 121 | 122 | BOOL selfResponds = [super respondsToSelector: aSelector]; 123 | if ( selfResponds ) 124 | return YES; 125 | 126 | struct objc_method_description md = protocol_getMethodDescription( @protocol(UITextFieldDelegate), aSelector, NO, YES); 127 | 128 | if ( md.name != NULL && md.types != NULL ) 129 | return [self.delegate respondsToSelector: aSelector]; 130 | 131 | return selfResponds; 132 | } 133 | 134 | - (id) forwardingTargetForSelector: (SEL) aSelector 135 | { 136 | // we'll forward any implemented UITextFieldDelegate method, other than the one we implement ourself. 137 | 138 | struct objc_method_description md = protocol_getMethodDescription( @protocol(UITextFieldDelegate), aSelector, NO, YES); 139 | 140 | if ( md.name != NULL && md.types != NULL && [self.delegate respondsToSelector: aSelector] ) 141 | return self.delegate; 142 | 143 | return nil; 144 | } 145 | 146 | - (BOOL) textField: (TSCurrencyTextField *) textField shouldChangeCharactersInRange: (NSRange) range replacementString: (NSString *) string 147 | { 148 | // "deleting" a formatting character just back-spaces over that character: 149 | if ( string.length == 0 && range.length == 1 && [[textField invalidInputCharacterSet] characterIsMember: [textField.text characterAtIndex: range.location]] ) 150 | { 151 | [textField setCaratPosition: range.location]; 152 | return NO; 153 | } 154 | 155 | int distanceFromEnd = textField.text.length - (range.location + range.length); 156 | 157 | NSString* changed = [textField.text stringByReplacingCharactersInRange: range withString: string]; 158 | [textField setText: changed]; 159 | 160 | int pos = textField.text.length - distanceFromEnd; 161 | if ( pos >= 0 && pos <= textField.text.length ) 162 | { 163 | [textField setCaratPosition: pos]; 164 | } 165 | 166 | [textField sendActionsForControlEvents: UIControlEventEditingChanged]; 167 | 168 | return NO; 169 | } 170 | 171 | @end -------------------------------------------------------------------------------- /Example/Example/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 59 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C504527D1821BC0A00A47CED /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C504527C1821BC0A00A47CED /* Foundation.framework */; }; 11 | C504527F1821BC0A00A47CED /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C504527E1821BC0A00A47CED /* CoreGraphics.framework */; }; 12 | C50452811821BC0A00A47CED /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C50452801821BC0A00A47CED /* UIKit.framework */; }; 13 | C50452871821BC0A00A47CED /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C50452851821BC0A00A47CED /* InfoPlist.strings */; }; 14 | C50452891821BC0A00A47CED /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C50452881821BC0A00A47CED /* main.m */; }; 15 | C504528D1821BC0A00A47CED /* TSAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C504528C1821BC0A00A47CED /* TSAppDelegate.m */; }; 16 | C50452901821BC0A00A47CED /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C504528E1821BC0A00A47CED /* Main.storyboard */; }; 17 | C50452931821BC0A00A47CED /* TSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C50452921821BC0A00A47CED /* TSViewController.m */; }; 18 | C50452951821BC0A00A47CED /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C50452941821BC0A00A47CED /* Images.xcassets */; }; 19 | C50452B41821BC4400A47CED /* TSCurrencyTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = C50452B31821BC4400A47CED /* TSCurrencyTextField.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | C50452791821BC0A00A47CED /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | C504527C1821BC0A00A47CED /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 25 | C504527E1821BC0A00A47CED /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 26 | C50452801821BC0A00A47CED /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 27 | C50452841821BC0A00A47CED /* Example-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Example-Info.plist"; sourceTree = ""; }; 28 | C50452861821BC0A00A47CED /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 29 | C50452881821BC0A00A47CED /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 30 | C504528A1821BC0A00A47CED /* Example-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Example-Prefix.pch"; sourceTree = ""; }; 31 | C504528B1821BC0A00A47CED /* TSAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TSAppDelegate.h; sourceTree = ""; }; 32 | C504528C1821BC0A00A47CED /* TSAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TSAppDelegate.m; sourceTree = ""; }; 33 | C504528F1821BC0A00A47CED /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 34 | C50452911821BC0A00A47CED /* TSViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TSViewController.h; sourceTree = ""; }; 35 | C50452921821BC0A00A47CED /* TSViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TSViewController.m; sourceTree = ""; }; 36 | C50452941821BC0A00A47CED /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 37 | C504529B1821BC0A00A47CED /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 38 | C50452B21821BC4400A47CED /* TSCurrencyTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSCurrencyTextField.h; sourceTree = ""; }; 39 | C50452B31821BC4400A47CED /* TSCurrencyTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSCurrencyTextField.m; sourceTree = ""; }; 40 | /* End PBXFileReference section */ 41 | 42 | /* Begin PBXFrameworksBuildPhase section */ 43 | C50452761821BC0A00A47CED /* Frameworks */ = { 44 | isa = PBXFrameworksBuildPhase; 45 | buildActionMask = 2147483647; 46 | files = ( 47 | C504527F1821BC0A00A47CED /* CoreGraphics.framework in Frameworks */, 48 | C50452811821BC0A00A47CED /* UIKit.framework in Frameworks */, 49 | C504527D1821BC0A00A47CED /* Foundation.framework in Frameworks */, 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXFrameworksBuildPhase section */ 54 | 55 | /* Begin PBXGroup section */ 56 | C50452701821BC0A00A47CED = { 57 | isa = PBXGroup; 58 | children = ( 59 | C50452821821BC0A00A47CED /* Example */, 60 | C50452B11821BC4400A47CED /* TSCurrencyTextField */, 61 | C504527B1821BC0A00A47CED /* Frameworks */, 62 | C504527A1821BC0A00A47CED /* Products */, 63 | ); 64 | sourceTree = ""; 65 | }; 66 | C504527A1821BC0A00A47CED /* Products */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | C50452791821BC0A00A47CED /* Example.app */, 70 | ); 71 | name = Products; 72 | sourceTree = ""; 73 | }; 74 | C504527B1821BC0A00A47CED /* Frameworks */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | C504527C1821BC0A00A47CED /* Foundation.framework */, 78 | C504527E1821BC0A00A47CED /* CoreGraphics.framework */, 79 | C50452801821BC0A00A47CED /* UIKit.framework */, 80 | C504529B1821BC0A00A47CED /* XCTest.framework */, 81 | ); 82 | name = Frameworks; 83 | sourceTree = ""; 84 | }; 85 | C50452821821BC0A00A47CED /* Example */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | C504528E1821BC0A00A47CED /* Main.storyboard */, 89 | C50452941821BC0A00A47CED /* Images.xcassets */, 90 | C504528B1821BC0A00A47CED /* TSAppDelegate.h */, 91 | C504528C1821BC0A00A47CED /* TSAppDelegate.m */, 92 | C50452911821BC0A00A47CED /* TSViewController.h */, 93 | C50452921821BC0A00A47CED /* TSViewController.m */, 94 | C50452831821BC0A00A47CED /* Supporting Files */, 95 | ); 96 | path = Example; 97 | sourceTree = ""; 98 | }; 99 | C50452831821BC0A00A47CED /* Supporting Files */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | C50452841821BC0A00A47CED /* Example-Info.plist */, 103 | C50452851821BC0A00A47CED /* InfoPlist.strings */, 104 | C50452881821BC0A00A47CED /* main.m */, 105 | C504528A1821BC0A00A47CED /* Example-Prefix.pch */, 106 | ); 107 | name = "Supporting Files"; 108 | sourceTree = ""; 109 | }; 110 | C50452B11821BC4400A47CED /* TSCurrencyTextField */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | C50452B21821BC4400A47CED /* TSCurrencyTextField.h */, 114 | C50452B31821BC4400A47CED /* TSCurrencyTextField.m */, 115 | ); 116 | name = TSCurrencyTextField; 117 | path = ../TSCurrencyTextField; 118 | sourceTree = ""; 119 | }; 120 | /* End PBXGroup section */ 121 | 122 | /* Begin PBXNativeTarget section */ 123 | C50452781821BC0A00A47CED /* Example */ = { 124 | isa = PBXNativeTarget; 125 | buildConfigurationList = C50452AB1821BC0B00A47CED /* Build configuration list for PBXNativeTarget "Example" */; 126 | buildPhases = ( 127 | C50452751821BC0A00A47CED /* Sources */, 128 | C50452761821BC0A00A47CED /* Frameworks */, 129 | C50452771821BC0A00A47CED /* Resources */, 130 | ); 131 | buildRules = ( 132 | ); 133 | dependencies = ( 134 | ); 135 | name = Example; 136 | productName = Example; 137 | productReference = C50452791821BC0A00A47CED /* Example.app */; 138 | productType = "com.apple.product-type.application"; 139 | }; 140 | /* End PBXNativeTarget section */ 141 | 142 | /* Begin PBXProject section */ 143 | C50452711821BC0A00A47CED /* Project object */ = { 144 | isa = PBXProject; 145 | attributes = { 146 | CLASSPREFIX = TS; 147 | LastUpgradeCheck = 0500; 148 | ORGANIZATIONNAME = "CoDeveloper, LLC"; 149 | }; 150 | buildConfigurationList = C50452741821BC0A00A47CED /* Build configuration list for PBXProject "Example" */; 151 | compatibilityVersion = "Xcode 3.2"; 152 | developmentRegion = English; 153 | hasScannedForEncodings = 0; 154 | knownRegions = ( 155 | en, 156 | Base, 157 | ); 158 | mainGroup = C50452701821BC0A00A47CED; 159 | productRefGroup = C504527A1821BC0A00A47CED /* Products */; 160 | projectDirPath = ""; 161 | projectRoot = ""; 162 | targets = ( 163 | C50452781821BC0A00A47CED /* Example */, 164 | ); 165 | }; 166 | /* End PBXProject section */ 167 | 168 | /* Begin PBXResourcesBuildPhase section */ 169 | C50452771821BC0A00A47CED /* Resources */ = { 170 | isa = PBXResourcesBuildPhase; 171 | buildActionMask = 2147483647; 172 | files = ( 173 | C50452951821BC0A00A47CED /* Images.xcassets in Resources */, 174 | C50452871821BC0A00A47CED /* InfoPlist.strings in Resources */, 175 | C50452901821BC0A00A47CED /* Main.storyboard in Resources */, 176 | ); 177 | runOnlyForDeploymentPostprocessing = 0; 178 | }; 179 | /* End PBXResourcesBuildPhase section */ 180 | 181 | /* Begin PBXSourcesBuildPhase section */ 182 | C50452751821BC0A00A47CED /* Sources */ = { 183 | isa = PBXSourcesBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | C50452891821BC0A00A47CED /* main.m in Sources */, 187 | C504528D1821BC0A00A47CED /* TSAppDelegate.m in Sources */, 188 | C50452931821BC0A00A47CED /* TSViewController.m in Sources */, 189 | C50452B41821BC4400A47CED /* TSCurrencyTextField.m in Sources */, 190 | ); 191 | runOnlyForDeploymentPostprocessing = 0; 192 | }; 193 | /* End PBXSourcesBuildPhase section */ 194 | 195 | /* Begin PBXVariantGroup section */ 196 | C50452851821BC0A00A47CED /* InfoPlist.strings */ = { 197 | isa = PBXVariantGroup; 198 | children = ( 199 | C50452861821BC0A00A47CED /* en */, 200 | ); 201 | name = InfoPlist.strings; 202 | sourceTree = ""; 203 | }; 204 | C504528E1821BC0A00A47CED /* Main.storyboard */ = { 205 | isa = PBXVariantGroup; 206 | children = ( 207 | C504528F1821BC0A00A47CED /* Base */, 208 | ); 209 | name = Main.storyboard; 210 | sourceTree = ""; 211 | }; 212 | /* End PBXVariantGroup section */ 213 | 214 | /* Begin XCBuildConfiguration section */ 215 | C50452A91821BC0B00A47CED /* Debug */ = { 216 | isa = XCBuildConfiguration; 217 | buildSettings = { 218 | ALWAYS_SEARCH_USER_PATHS = NO; 219 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 220 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 221 | CLANG_CXX_LIBRARY = "libc++"; 222 | CLANG_ENABLE_MODULES = YES; 223 | CLANG_ENABLE_OBJC_ARC = YES; 224 | CLANG_WARN_BOOL_CONVERSION = YES; 225 | CLANG_WARN_CONSTANT_CONVERSION = YES; 226 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 227 | CLANG_WARN_EMPTY_BODY = YES; 228 | CLANG_WARN_ENUM_CONVERSION = YES; 229 | CLANG_WARN_INT_CONVERSION = YES; 230 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 231 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 232 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 233 | COPY_PHASE_STRIP = NO; 234 | GCC_C_LANGUAGE_STANDARD = gnu99; 235 | GCC_DYNAMIC_NO_PIC = NO; 236 | GCC_OPTIMIZATION_LEVEL = 0; 237 | GCC_PREPROCESSOR_DEFINITIONS = ( 238 | "DEBUG=1", 239 | "$(inherited)", 240 | ); 241 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 242 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 243 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 244 | GCC_WARN_UNDECLARED_SELECTOR = YES; 245 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 246 | GCC_WARN_UNUSED_FUNCTION = YES; 247 | GCC_WARN_UNUSED_VARIABLE = YES; 248 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 249 | ONLY_ACTIVE_ARCH = YES; 250 | SDKROOT = iphoneos; 251 | }; 252 | name = Debug; 253 | }; 254 | C50452AA1821BC0B00A47CED /* Release */ = { 255 | isa = XCBuildConfiguration; 256 | buildSettings = { 257 | ALWAYS_SEARCH_USER_PATHS = NO; 258 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 259 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 260 | CLANG_CXX_LIBRARY = "libc++"; 261 | CLANG_ENABLE_MODULES = YES; 262 | CLANG_ENABLE_OBJC_ARC = YES; 263 | CLANG_WARN_BOOL_CONVERSION = YES; 264 | CLANG_WARN_CONSTANT_CONVERSION = YES; 265 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 266 | CLANG_WARN_EMPTY_BODY = YES; 267 | CLANG_WARN_ENUM_CONVERSION = YES; 268 | CLANG_WARN_INT_CONVERSION = YES; 269 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 270 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 271 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 272 | COPY_PHASE_STRIP = YES; 273 | ENABLE_NS_ASSERTIONS = NO; 274 | GCC_C_LANGUAGE_STANDARD = gnu99; 275 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 276 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 277 | GCC_WARN_UNDECLARED_SELECTOR = YES; 278 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 279 | GCC_WARN_UNUSED_FUNCTION = YES; 280 | GCC_WARN_UNUSED_VARIABLE = YES; 281 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 282 | SDKROOT = iphoneos; 283 | VALIDATE_PRODUCT = YES; 284 | }; 285 | name = Release; 286 | }; 287 | C50452AC1821BC0B00A47CED /* Debug */ = { 288 | isa = XCBuildConfiguration; 289 | buildSettings = { 290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 291 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 292 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 293 | GCC_PREFIX_HEADER = "Example/Example-Prefix.pch"; 294 | INFOPLIST_FILE = "Example/Example-Info.plist"; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | WRAPPER_EXTENSION = app; 297 | }; 298 | name = Debug; 299 | }; 300 | C50452AD1821BC0B00A47CED /* Release */ = { 301 | isa = XCBuildConfiguration; 302 | buildSettings = { 303 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 304 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 305 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 306 | GCC_PREFIX_HEADER = "Example/Example-Prefix.pch"; 307 | INFOPLIST_FILE = "Example/Example-Info.plist"; 308 | PRODUCT_NAME = "$(TARGET_NAME)"; 309 | WRAPPER_EXTENSION = app; 310 | }; 311 | name = Release; 312 | }; 313 | /* End XCBuildConfiguration section */ 314 | 315 | /* Begin XCConfigurationList section */ 316 | C50452741821BC0A00A47CED /* Build configuration list for PBXProject "Example" */ = { 317 | isa = XCConfigurationList; 318 | buildConfigurations = ( 319 | C50452A91821BC0B00A47CED /* Debug */, 320 | C50452AA1821BC0B00A47CED /* Release */, 321 | ); 322 | defaultConfigurationIsVisible = 0; 323 | defaultConfigurationName = Release; 324 | }; 325 | C50452AB1821BC0B00A47CED /* Build configuration list for PBXNativeTarget "Example" */ = { 326 | isa = XCConfigurationList; 327 | buildConfigurations = ( 328 | C50452AC1821BC0B00A47CED /* Debug */, 329 | C50452AD1821BC0B00A47CED /* Release */, 330 | ); 331 | defaultConfigurationIsVisible = 0; 332 | }; 333 | /* End XCConfigurationList section */ 334 | }; 335 | rootObject = C50452711821BC0A00A47CED /* Project object */; 336 | } 337 | --------------------------------------------------------------------------------