Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding TKAlertViewController to the mix. Using tintColor for progress…

… indicators. Fixing iPad demo issues.
  • Loading branch information...
commit 0e1cc80276298b24175488d2a17228692819a301 1 parent 624a249
@devinross authored
Showing with 384 additions and 191 deletions.
  1. +2 −5 demo/Classes/AlertsViewController.m
  2. +3 −1 demo/Classes/AppDelegate.h
  3. +6 −2 demo/Classes/AppDelegate.m
  4. +3 −1 demo/Classes/ButtonViewController.m
  5. +1 −1  demo/Classes/CoverflowViewController.m
  6. +0 −1  demo/Classes/DetailViewController.h
  7. +13 −37 demo/Classes/DetailViewController.m
  8. +1 −2  demo/Classes/{HUDViewController.h → IndicatorsViewController.h}
  9. +34 −52 demo/Classes/{HUDViewController.m → IndicatorsViewController.m}
  10. +1 −6 demo/Classes/NetworkRequestProgressViewController.m
  11. +3 −2 demo/Classes/RootViewController.m
  12. +6 −14 demo/Classes/SlideToUnlockViewController.m
  13. +9 −9 demo/Demo.xcodeproj/project.pbxproj
  14. +8 −0 src/TapkuLibrary.xcodeproj/project.pbxproj
  15. +57 −0 src/TapkuLibrary/TKAlertViewController.h
  16. +206 −0 src/TapkuLibrary/TKAlertViewController.m
  17. +2 −9 src/TapkuLibrary/TKProgressAlertView.h
  18. +9 −36 src/TapkuLibrary/TKProgressAlertView.m
  19. +4 −2 src/TapkuLibrary/TKProgressBarView.m
  20. +3 −2 src/TapkuLibrary/TKProgressCircleView.m
  21. +1 −1  src/TapkuLibrary/TKRetroButton.h
  22. +5 −6 src/TapkuLibrary/TKRetroButton.m
  23. +7 −2 src/TapkuLibrary/TKTextFieldCell.m
View
7 demo/Classes/AlertsViewController.m
@@ -49,11 +49,8 @@ - (void) loadView{
self.view.backgroundColor = [UIColor whiteColor];
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Tap Me" style:UIBarButtonItemStyleBordered target:self action:@selector(beer)];
- if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
- self.navigationItem.rightBarButtonItem = item;
- }else{
- self.toolbarItems = @[item];
- }
+ self.navigationItem.rightBarButtonItem = item;
+
self.tapMeItem = item;
View
4 demo/Classes/AppDelegate.h
@@ -37,7 +37,9 @@
@class RootViewController;
#pragma mark - AppDelegate
-@interface AppDelegate : TKAppDelegate
+@interface AppDelegate : TKAppDelegate
+
++ (AppDelegate*) instance;
@property (nonatomic,strong) RootViewController *root;
@property (nonatomic,strong) UINavigationController *navigationController;
View
8 demo/Classes/AppDelegate.m
@@ -54,10 +54,12 @@ - (void) application:(UIApplication *)application commonInitializationLaunching:
self.detail = [[DetailViewController alloc] init];
self.splitViewController.delegate = self.detail;
self.root.detailViewController = self.detail;
+
+ UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:self.detail];
- self.splitViewController.viewControllers = @[self.navigationController,self.detail];
+ self.splitViewController.viewControllers = @[self.navigationController,nav];
self.window.rootViewController = self.splitViewController;
}else{
self.window.rootViewController = self.navigationController;
@@ -74,6 +76,8 @@ - (void) applicationDidStartup:(UIApplication *)application{
}
-
++ (AppDelegate*) instance{
+ return (AppDelegate*)[[UIApplication sharedApplication] delegate];
+}
@end
View
4 demo/Classes/ButtonViewController.m
@@ -40,6 +40,7 @@ - (void) loadView{
CGFloat w = CGRectGetWidth(self.view.frame);
self.glowButton = [TKGlowButton buttonWithFrame:CGRectMake(50, 100, w - 100, 40)];
+ self.glowButton.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self.glowButton setTitle:@"Glow" forState:UIControlStateNormal];
[self.glowButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[self.glowButton setBackgroundColor:[UIColor colorWithWhite:0 alpha:0.05] forState:UIControlStateNormal];
@@ -47,8 +48,9 @@ - (void) loadView{
[self.view addSubview:self.glowButton];
self.retroButton = [TKRetroButton buttonWithFrame:CGRectMake(50, 200, w - 100, 40)];
+ self.retroButton.autoresizingMask = UIViewAutoresizingFlexibleWidth;
self.retroButton.borderWidth = 2;
- [self.retroButton setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
+ [self.retroButton setTitleColor:self.view.tintColor forState:UIControlStateNormal];
[self.retroButton setTitle:@"Retro" forState:UIControlStateNormal];
[self.view addSubview:self.retroButton];
View
2  demo/Classes/CoverflowViewController.m
@@ -87,7 +87,7 @@ - (void) loadView{
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Tap Me" style:UIBarButtonItemStyleBordered target:self action:@selector(info)];
- self.toolbarItems = @[item];
+ self.navigationItem.rightBarButtonItem = item;
View
1  demo/Classes/DetailViewController.h
@@ -35,7 +35,6 @@
@interface DetailViewController : UIViewController <UISplitViewControllerDelegate>
-@property (nonatomic,strong) UIToolbar *toolbar;
@property (nonatomic,strong) UIViewController *mainController;
@property (nonatomic,strong) UIPopoverController *currentPopoverController;
View
50 demo/Classes/DetailViewController.m
@@ -30,69 +30,45 @@
*/
#import "DetailViewController.h"
+#import "AppDelegate.h"
#pragma mark - DetailViewController
@implementation DetailViewController
- (void) viewDidLoad {
[super viewDidLoad];
-
self.view.backgroundColor = [UIColor whiteColor];
-
- self.toolbar = [[UIToolbar alloc] initWithFrame:CGRectMakeWithPoint(CGPointZero, self.view.bounds.size.width, 44)];
- self.toolbar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
- self.toolbar.items = @[];
- [self.view addSubview:self.toolbar];
}
- (void) setupWithMainController:(UIViewController*)controller{
- [self.mainController.view removeFromSuperview];
- self.mainController = controller;
- CGFloat h = self.toolbar.frame.size.height;
+ UINavigationController *nav = [AppDelegate instance].splitViewController.viewControllers.lastObject;
+
+ nav.viewControllers = @[controller];
+
+ self.mainController = controller;
- CGRect r = CGRectMake(0, h, self.view.frame.size.width, self.view.frame.size.height-h);
- self.mainController.view.frame = r;
- [self.mainController viewWillAppear:NO];
- [self.view addSubview:self.mainController.view];
- [self.mainController viewDidAppear:NO];
- if(self.currentPopoverController!=nil){
-
- UIBarButtonItem *item = [self.toolbar items][0];
-
-
- NSMutableArray *items = [NSMutableArray array];
- [items addObject:item];
+
+ nav.navigationItem.leftBarButtonItem = self.navigationItem.leftBarButtonItem;
- if(self.mainController.toolbarItems!=nil){
- [items addObjectsFromArray:self.mainController.toolbarItems];
- }
- [self.toolbar setItems:items animated:YES];
-
- }else{
- [self.toolbar setItems:self.mainController.toolbarItems];
- }
}
- (void) splitViewController: (UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController: (UIPopoverController*)pc {
+ self.navigationItem.leftBarButtonItem = barButtonItem;
- barButtonItem.title = @"Demos";
- NSMutableArray *items = [[self.toolbar items] mutableCopy];
- [items insertObject:barButtonItem atIndex:0];
- [self.toolbar setItems:items animated:YES];
self.currentPopoverController = pc;
}
- (void) splitViewController: (UISplitViewController*)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {
- NSMutableArray *items = [[self.toolbar items] mutableCopy];
- [items removeObjectAtIndex:0];
- [self.toolbar setItems:items animated:YES];
- self.currentPopoverController = nil;
+
+ self.navigationItem.leftBarButtonItem = nil;
+
+
}
View
3  demo/Classes/HUDViewController.h → demo/Classes/IndicatorsViewController.h
@@ -32,11 +32,10 @@
#import <TapkuLibrary/TapkuLibrary.h>
-@interface HUDViewController : UIViewController
+@interface IndicatorsViewController : UIViewController
@property (nonatomic,strong) TKProgressBarView *progressBar;
@property (nonatomic,strong) TKProgressBarView *progressBarAlternative;
-@property (nonatomic,strong) TKProgressAlertView *alertView;
@property (nonatomic,strong) TKProgressCircleView *progressCircle;
@end
View
86 demo/Classes/HUDViewController.m → demo/Classes/IndicatorsViewController.m
@@ -29,10 +29,9 @@
*/
-#import "HUDViewController.h"
+#import "IndicatorsViewController.h"
-
-@implementation HUDViewController
+@implementation IndicatorsViewController
- (id) init{
if(!(self=[super init])) return nil;
@@ -40,71 +39,61 @@ - (id) init{
return self;
}
+#pragma mark View Lifecycle
+- (void) loadView{
+ [super loadView];
+ self.view.backgroundColor = [UIColor colorWithWhite:0.7 alpha:1];
+
+ [self.view addSubview:self.progressBar];
+ [self.view addSubview:self.progressCircle];
+ [self.view addSubview:self.progressBarAlternative];
+
+ UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Tap Me" style:UIBarButtonItemStyleBordered target:self action:@selector(tapme)];
+ self.navigationItem.rightBarButtonItem = item;
+
+}
+- (void) viewDidAppear:(BOOL)animated{
+ [super viewDidAppear:animated];
+ [self stepTwo:nil];
+}
+#pragma mark Actions
- (void) tapme{
-
+
[self.progressCircle setTwirlMode:!self.progressCircle.isTwirling];
if(!self.progressCircle.isTwirling){
[self.progressCircle setProgress:0 animated:NO];
[self.progressBar setProgress:0];
[self.progressBarAlternative setProgress:0 animated:NO];
-
- [self performSelector:@selector(stepTwo) withObject:nil afterDelay:2];
- [self performSelector:@selector(stepThree) withObject:nil afterDelay:4];
+ TKProgressAlertView *alert = [[TKProgressAlertView alloc] initWithProgressTitle:@"Loading important stuff!"];
+ alert.progressBar.progress = 0;
+ [alert show];
+
+ [self performSelector:@selector(stepTwo:) withObject:alert afterDelay:2];
+ [self performSelector:@selector(stepThree:) withObject:alert afterDelay:4];
- self.alertView.progressBar.progress = 0;
- [self.alertView show];
}
-
-
+
+
}
-- (void) stepTwo{
+- (void) stepTwo:(TKProgressAlertView*)alert{
[self.progressCircle setProgress:1 animated:YES];
[self.progressBar setProgress:1 animated:YES];
[self.progressBarAlternative setProgress:1 animated:YES];
-
- [self.alertView.progressBar setProgress:1 animated:YES];
-
-}
-- (void) stepThree{
- [self.alertView hide];
+ [alert.progressBar setProgress:1 animated:YES];
}
-
-
-#pragma mark View Lifecycle
-- (void) loadView{
- [super loadView];
- self.view.backgroundColor = [UIColor colorWithWhite:0.7 alpha:1];
+- (void) stepThree:(TKProgressAlertView*)alert{
- [self.view addSubview:self.progressBar];
- [self.view addSubview:self.progressCircle];
- [self.view addSubview:self.progressBarAlternative];
+ [alert hide];
-
-
- UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Tap Me" style:UIBarButtonItemStyleBordered target:self action:@selector(tapme)];
-
-
- if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
- self.navigationItem.rightBarButtonItem = item;
- }else{
- self.toolbarItems = @[item];
- }
-
-}
-- (void) viewDidAppear:(BOOL)animated{
- [super viewDidAppear:animated];
- [self stepTwo];
}
-
-
#pragma mark Properties
- (TKProgressBarView *) progressBar{
if(_progressBar) return _progressBar;
@@ -120,12 +109,6 @@ - (TKProgressBarView *) progressBarAlternative{
_progressBarAlternative.center = CGPointMake(self.view.bounds.size.width/2, 320);
return _progressBarAlternative;
}
-- (TKProgressAlertView *) alertView{
- if(_alertView) return _alertView;
-
- _alertView = [[TKProgressAlertView alloc] initWithProgressTitle:@"Loading important stuff!"];
- return _alertView;
-}
- (TKProgressCircleView *) progressCircle{
if(_progressCircle) return _progressCircle;
@@ -134,5 +117,4 @@ - (TKProgressCircleView *) progressCircle{
return _progressCircle;
}
-
-@end
+@end
View
7 demo/Classes/NetworkRequestProgressViewController.m
@@ -55,13 +55,8 @@ - (void) loadView{
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Start" style:UIBarButtonItemStyleBordered target:self action:@selector(start)];
+ self.navigationItem.rightBarButtonItem = item;
-
- if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
- self.navigationItem.rightBarButtonItem = item;
- }else{
- self.toolbarItems = @[item];
- }
}
View
5 demo/Classes/RootViewController.m
@@ -34,7 +34,7 @@
#import "DetailViewController.h"
#import "LabelViewController.h"
-#import "HUDViewController.h"
+#import "IndicatorsViewController.h"
#import "EmptyViewController.h"
#import "CalendarMonthViewController.h"
#import "CoverflowViewController.h"
@@ -68,6 +68,7 @@ @implementation RootViewController
- (id) initWithStyle:(UITableViewStyle)s{
if(!(self = [super initWithStyle:s])) return nil;
self.title = @"Tapku Library";
+ self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
return self;
}
- (NSUInteger) supportedInterfaceOrientations{
@@ -136,7 +137,7 @@ - (void) tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)inde
else if(s==1 && r==0)
vc = [[EmptyViewController alloc] init];
else if(s==1 && r==1)
- vc = [[HUDViewController alloc] init];
+ vc = [[IndicatorsViewController alloc] init];
else if(s==1 && r==2)
vc = [[AlertsViewController alloc] init];
else if(s==1 && r==3)
View
20 demo/Classes/SlideToUnlockViewController.m
@@ -44,30 +44,22 @@ - (void) loadView{
self.view.backgroundColor = [UIColor whiteColor];
UIImageView *image = [UIImageView imageViewWithImageNamed:@"wallpaper"];
+ image.frame = self.view.bounds;
+ image.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:image];
if([self respondsToSelector:@selector(edgesForExtendedLayout)])
self.edgesForExtendedLayout = UIRectEdgeNone;
+
+ CGFloat w = CGRectGetWidth(self.view.frame), width = 300;
-
-
-
- self.unlockView = [[TKSlideToUnlockView alloc] init];
+ self.unlockView = [[TKSlideToUnlockView alloc] initWithFrame:CGRectMake((w-width)/2.0f, 330, width, 40)];
+ self.unlockView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
[self.view addSubview:self.unlockView];
-
[self.unlockView addTarget:self action:@selector(didUnlockView:) forControlEvents:UIControlEventValueChanged];
-
- CGRect unlock = self.unlockView.frame;
-
- unlock.origin.y = 330;
-
- self.unlockView.frame = unlock;
-
- self.unlockView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin;
-
}
- (void) viewDidLoad{
[super viewDidLoad];
View
18 demo/Demo.xcodeproj/project.pbxproj
@@ -17,7 +17,7 @@
2052AF8B168B83E900A49526 /* CalendarMonthViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2052AF75168B83E900A49526 /* CalendarMonthViewController.m */; };
2052AF8C168B83E900A49526 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2052AF77168B83E900A49526 /* DetailViewController.m */; };
2052AF8D168B83E900A49526 /* EmptyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2052AF79168B83E900A49526 /* EmptyViewController.m */; };
- 2052AF8E168B83E900A49526 /* HUDViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2052AF7B168B83E900A49526 /* HUDViewController.m */; };
+ 2052AF8E168B83E900A49526 /* IndicatorsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2052AF7B168B83E900A49526 /* IndicatorsViewController.m */; };
2052AF8F168B83E900A49526 /* ImageCenterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2052AF7D168B83E900A49526 /* ImageCenterViewController.m */; };
2052AF90168B83E900A49526 /* LabelViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2052AF7F168B83E900A49526 /* LabelViewController.m */; };
2052AF92168B83E900A49526 /* MoreCellsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2052AF83168B83E900A49526 /* MoreCellsViewController.m */; };
@@ -103,8 +103,8 @@
2052AF77168B83E900A49526 /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = "<group>"; };
2052AF78168B83E900A49526 /* EmptyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmptyViewController.h; sourceTree = "<group>"; };
2052AF79168B83E900A49526 /* EmptyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EmptyViewController.m; sourceTree = "<group>"; };
- 2052AF7A168B83E900A49526 /* HUDViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HUDViewController.h; sourceTree = "<group>"; };
- 2052AF7B168B83E900A49526 /* HUDViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HUDViewController.m; sourceTree = "<group>"; };
+ 2052AF7A168B83E900A49526 /* IndicatorsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndicatorsViewController.h; sourceTree = "<group>"; };
+ 2052AF7B168B83E900A49526 /* IndicatorsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IndicatorsViewController.m; sourceTree = "<group>"; };
2052AF7C168B83E900A49526 /* ImageCenterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageCenterViewController.h; sourceTree = "<group>"; };
2052AF7D168B83E900A49526 /* ImageCenterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageCenterViewController.m; sourceTree = "<group>"; };
2052AF7E168B83E900A49526 /* LabelViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelViewController.h; sourceTree = "<group>"; };
@@ -288,8 +288,8 @@
children = (
2052AF78168B83E900A49526 /* EmptyViewController.h */,
2052AF79168B83E900A49526 /* EmptyViewController.m */,
- 2052AF7A168B83E900A49526 /* HUDViewController.h */,
- 2052AF7B168B83E900A49526 /* HUDViewController.m */,
+ 2052AF7A168B83E900A49526 /* IndicatorsViewController.h */,
+ 2052AF7B168B83E900A49526 /* IndicatorsViewController.m */,
2052AF6E168B83E900A49526 /* AlertsViewController.h */,
2052AF6F168B83E900A49526 /* AlertsViewController.m */,
20A2A522174C37CF0058571F /* SlideToUnlockViewController.h */,
@@ -351,7 +351,7 @@
isa = PBXGroup;
children = (
3B111E4F14593F8800C72A38 /* libTapkuLibrary.a */,
- 3B111E5114593F8800C72A38 /* LogicTests.octest */,
+ 3B111E5114593F8800C72A38 /* LogicTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -418,10 +418,10 @@
remoteRef = 3B111E4E14593F8800C72A38 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- 3B111E5114593F8800C72A38 /* LogicTests.octest */ = {
+ 3B111E5114593F8800C72A38 /* LogicTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
- path = LogicTests.octest;
+ path = LogicTests.xctest;
remoteRef = 3B111E5014593F8800C72A38 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
@@ -480,7 +480,7 @@
2052AF8B168B83E900A49526 /* CalendarMonthViewController.m in Sources */,
2052AF8C168B83E900A49526 /* DetailViewController.m in Sources */,
2052AF8D168B83E900A49526 /* EmptyViewController.m in Sources */,
- 2052AF8E168B83E900A49526 /* HUDViewController.m in Sources */,
+ 2052AF8E168B83E900A49526 /* IndicatorsViewController.m in Sources */,
2052AF8F168B83E900A49526 /* ImageCenterViewController.m in Sources */,
2052AF90168B83E900A49526 /* LabelViewController.m in Sources */,
2052AF92168B83E900A49526 /* MoreCellsViewController.m in Sources */,
View
8 src/TapkuLibrary.xcodeproj/project.pbxproj
@@ -23,6 +23,8 @@
2026B55C1748257B00447F22 /* TKTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2026B55A1748257B00447F22 /* TKTextView.m */; };
2027C60E17FB692700A5E148 /* TKKeyboardTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2027C60C17FB692700A5E148 /* TKKeyboardTableViewController.h */; };
2027C60F17FB692700A5E148 /* TKKeyboardTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2027C60D17FB692700A5E148 /* TKKeyboardTableViewController.m */; };
+ 202DD0CB188EF01200D5541E /* TKAlertViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 202DD0C9188EF01200D5541E /* TKAlertViewController.h */; };
+ 202DD0CC188EF01200D5541E /* TKAlertViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 202DD0CA188EF01200D5541E /* TKAlertViewController.m */; };
2047DAFC17C6692200C62E32 /* UIDevice+TKCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 2047DAFA17C6692200C62E32 /* UIDevice+TKCategory.h */; };
2047DAFD17C6692200C62E32 /* UIDevice+TKCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 2047DAFB17C6692200C62E32 /* UIDevice+TKCategory.m */; };
20529A3617FF465800FFF627 /* UIAlertView+TKCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 20529A3417FF465800FFF627 /* UIAlertView+TKCategory.h */; };
@@ -172,6 +174,8 @@
2026B55A1748257B00447F22 /* TKTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TKTextView.m; sourceTree = "<group>"; };
2027C60C17FB692700A5E148 /* TKKeyboardTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TKKeyboardTableViewController.h; sourceTree = "<group>"; };
2027C60D17FB692700A5E148 /* TKKeyboardTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TKKeyboardTableViewController.m; sourceTree = "<group>"; };
+ 202DD0C9188EF01200D5541E /* TKAlertViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TKAlertViewController.h; sourceTree = "<group>"; };
+ 202DD0CA188EF01200D5541E /* TKAlertViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TKAlertViewController.m; sourceTree = "<group>"; };
2047DAFA17C6692200C62E32 /* UIDevice+TKCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIDevice+TKCategory.h"; sourceTree = "<group>"; };
2047DAFB17C6692200C62E32 /* UIDevice+TKCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIDevice+TKCategory.m"; sourceTree = "<group>"; };
20529A3417FF465800FFF627 /* UIAlertView+TKCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIAlertView+TKCategory.h"; sourceTree = "<group>"; };
@@ -554,6 +558,8 @@
3BBF874A1296E976008AB2B1 /* TKTableViewController.m */,
2027C60C17FB692700A5E148 /* TKKeyboardTableViewController.h */,
2027C60D17FB692700A5E148 /* TKKeyboardTableViewController.m */,
+ 202DD0C9188EF01200D5541E /* TKAlertViewController.h */,
+ 202DD0CA188EF01200D5541E /* TKAlertViewController.m */,
2052E87D174F532500F06B66 /* TKWebViewController.h */,
2052E87E174F532500F06B66 /* TKWebViewController.m */,
3B8F0DF4142AE52B00E3AADE /* TKGradientView.h */,
@@ -635,6 +641,7 @@
20732DC01800AA880011D714 /* UIFont+TKCategory.h in Headers */,
3B6EDDFD11547C3800E454DA /* TKEmptyView.h in Headers */,
3B6EDE0C11547C4700E454DA /* TKTextViewCell.h in Headers */,
+ 202DD0CB188EF01200D5541E /* TKAlertViewController.h in Headers */,
2014592817A1077D00629488 /* TKReorderTableView.h in Headers */,
3B6EDE0E11547C4800E454DA /* TKSwitchCell.h in Headers */,
3B6EDE1011547C4900E454DA /* TKLabelTextViewCell.h in Headers */,
@@ -803,6 +810,7 @@
3B6EDDE111547C1700E454DA /* NSString+TKCategory.m in Sources */,
3B6EDDE411547C1D00E454DA /* NSDate+TKCategory.m in Sources */,
3B6EDDEA11547C2700E454DA /* TKCalendarMonthViewController.m in Sources */,
+ 202DD0CC188EF01200D5541E /* TKAlertViewController.m in Sources */,
3B6EDDEE11547C2900E454DA /* TKCalendarMonthTableViewController.m in Sources */,
3B6EDDF211547C2C00E454DA /* TKCalendarDayViewController.m in Sources */,
3B6EDDF411547C2D00E454DA /* TKCalendarDayView.m in Sources */,
View
57 src/TapkuLibrary/TKAlertViewController.h
@@ -0,0 +1,57 @@
+//
+// TKAlertViewController.h
+// Created by Devin Ross on 10/21/13.
+//
+/*
+
+ tapku || http://github.com/devinross/tapkulibrary
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+ */
+
+@import UIKit;
+
+/**
+ This class is a cool little alert view like view controller to subclass.
+ You can add you message to the alertView and you call the show and hide methods just like `UIAlertView`.
+ */
+@interface TKAlertViewController : UIViewController <UIViewControllerTransitioningDelegate,UIViewControllerAnimatedTransitioning>
+
+
+///----------------------------
+/// @name Properties
+///----------------------------
+/** The main view to display content on. */
+@property (nonatomic,strong) UIView *alertView;
+
+///----------------------------
+/// @name Displaying and hiding alert
+///----------------------------
+
+/** Show the alert */
+- (void) show;
+
+/** Hide the alert */
+- (void) hide;
+
+@end
View
206 src/TapkuLibrary/TKAlertViewController.m
@@ -0,0 +1,206 @@
+//
+// TKAlertViewController.m
+// Created by Devin Ross on 10/21/13.
+//
+/*
+
+ tapku || http://github.com/devinross/tapkulibrary
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+ */
+
+#import "TKAlertViewController.h"
+#import "TKGlobal.h"
+#import "UIDevice+TKCategory.h"
+
+@interface TKAlertViewController ()
+@property (nonatomic,strong) UIDynamicAnimator *animator;
+@end
+
+@implementation TKAlertViewController
+
+- (id) init{
+ if(!(self=[super init])) return nil;
+ self.modalPresentationStyle = UIModalPresentationCustom;
+ self.transitioningDelegate = self;
+ return self;
+}
+
+- (NSUInteger) supportedInterfaceOrientations{
+ if([UIDevice padIdiom])
+ return UIInterfaceOrientationMaskAll;
+ return UIInterfaceOrientationMaskPortrait;
+}
+
+
+#pragma mark View Lifecycle
+- (void) loadView{
+ [super loadView];
+
+ CGSize s = CGSizeMake(280, 300);
+ CGRect alertRect = CGRectMakeWithSize( (CGRectGetWidth(self.view.frame)- s.width)/2.0f, (CGRectGetHeight(self.view.frame)- s.height)/2.0f, s);
+
+ self.alertView = [[UIView alloc] initWithFrame:alertRect];
+ self.alertView.backgroundColor = [UIColor whiteColor];
+ self.alertView.layer.shadowOffset = CGSizeMake(0, 1);
+ self.alertView.layer.shadowColor = [UIColor blackColor].CGColor;
+ self.alertView.layer.shadowRadius = 3;
+ self.alertView.layer.shadowOpacity = 0.1;
+ self.alertView.layer.cornerRadius = 8;
+ [self.view addSubview:self.alertView];
+
+ self.alertView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
+
+}
+- (void) viewDidAppear:(BOOL)animated{
+ [super viewDidAppear:animated];
+
+ if (NSStringFromClass([UIInterpolatingMotionEffect class])) {
+ UIInterpolatingMotionEffect *mx;
+
+ mx = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis];
+ mx.maximumRelativeValue = @(15);
+ mx.minimumRelativeValue = @(-15);
+ [self.alertView addMotionEffect:mx];
+
+ mx = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis];
+ mx.maximumRelativeValue = @(15);
+ mx.minimumRelativeValue = @(-15);
+ [self.alertView addMotionEffect:mx];
+ }
+}
+
+
+- (void) show{
+ id <UIApplicationDelegate> delegate = [[UIApplication sharedApplication] delegate];
+ [[delegate window].rootViewController presentViewController:self animated:YES completion:nil];
+}
+- (void) hide{
+ [self dismissViewControllerAnimated:YES completion:nil];
+}
+
+#pragma mark UIViewControllerTransitioningDelegate
+- (NSTimeInterval) transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext{
+
+ UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
+
+ if([toVC isKindOfClass:[TKAlertViewController class]])
+ return 0.5f;
+ return 0.4f + 0.5f;
+}
+
+- (void) showAlertView:(id<UIViewControllerContextTransitioning>)transitionContext{
+
+ NSInteger x = (CGRectGetWidth(self.alertView.superview.bounds) - CGRectGetWidth(self.alertView.frame)) / 2.0f;
+ NSInteger y = (CGRectGetHeight(self.alertView.superview.bounds) - CGRectGetHeight(self.alertView.frame)) / 2.0f;
+ self.alertView.frame = CGRectMakeWithSize(x, y, self.alertView.frame.size);
+
+
+ UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
+ UIView *containerView = [transitionContext containerView];
+ [containerView addSubview:toVC.view];
+
+
+
+ toVC.view.frame = CGRectMake(0, 0, CGRectGetWidth(containerView.frame), CGRectGetHeight(containerView.frame));
+ toVC.view.alpha = 0;
+
+
+ self.alertView.transform = CGScale(0.8, 0.8);
+
+ [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{
+ toVC.view.alpha = 1;
+ }];
+
+
+ [UIView animateKeyframesWithDuration:[self transitionDuration:transitionContext] delay:0 options:UIViewKeyframeAnimationOptionBeginFromCurrentState | UIViewKeyframeAnimationOptionCalculationModeLinear animations:^{
+
+ CGFloat whole = 1.0f;
+
+ [UIView addKeyframeWithRelativeStartTime:0.0 relativeDuration:0.3 animations:^{
+ self.alertView.transform = CGScale(1.08, 1.08);
+ }];
+
+ whole -= 0.3;
+
+ [UIView addKeyframeWithRelativeStartTime:1.0f - whole relativeDuration:whole/2 animations:^{
+ self.alertView.transform = CGScale(0.98, 0.98);
+ }];
+
+ whole /= 2;
+
+ [UIView addKeyframeWithRelativeStartTime:1.0f - whole relativeDuration:whole animations:^{
+ self.alertView.transform = CGAffineTransformIdentity;
+ }];
+
+ }completion:^(BOOL finished){
+ [transitionContext completeTransition:YES];
+ }];
+
+
+}
+- (void) hideAlertView:(id<UIViewControllerContextTransitioning>)transitionContext{
+
+ self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view];
+
+ UIGravityBehavior *gravity = [[UIGravityBehavior alloc] initWithItems:@[self.alertView]];
+ gravity.magnitude = 3;
+ [self.animator addBehavior:gravity];
+
+ UIDynamicItemBehavior *behav = [[UIDynamicItemBehavior alloc] initWithItems:@[self.alertView]];
+ behav.allowsRotation = YES;
+ behav.friction = 0.5;
+
+ CGFloat velocity = (arc4random() % 20) - 10.0f;
+ velocity /= 100.0f;
+ [behav addAngularVelocity:velocity forItem:self.alertView];
+
+ [self.animator addBehavior:behav];
+
+
+ [UIView animateWithDuration:0.4 delay:0.5f options:0 animations:^{
+ self.view.alpha = 0;
+ }completion:^(BOOL finished){
+ [transitionContext completeTransition:YES];
+ }];
+
+}
+- (void) animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext{
+
+ UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
+
+ if([toVC isKindOfClass:[TKAlertViewController class]])
+ [self showAlertView:transitionContext];
+ else
+ [self hideAlertView:transitionContext];
+
+}
+- (id <UIViewControllerAnimatedTransitioning>) animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source{
+ return self;
+}
+- (id <UIViewControllerAnimatedTransitioning>) animationControllerForDismissedController:(UIViewController *)dismissed{
+ return self;
+}
+
+
+@end
View
11 src/TapkuLibrary/TKProgressAlertView.h
@@ -32,9 +32,10 @@
@import UIKit;
#import "TKProgressBarView.h"
+#import "TKAlertViewController.h"
/** A simple alert view with a progress view. */
-@interface TKProgressAlertView : UIAlertView
+@interface TKProgressAlertView : TKAlertViewController
/** Initializes a progress alert view with a title.
@param title The title of the progress alert.
@@ -52,14 +53,6 @@
/** The title label for the alert. */
@property (nonatomic,strong) UILabel *label;
-///----------------------------
-/// @name Displaying and hiding alert
-///----------------------------
-
-/** Show the alert */
-- (void) show;
-/** Hide the alert */
-- (void) hide;
@end
View
45 src/TapkuLibrary/TKProgressAlertView.m
@@ -37,48 +37,21 @@ @implementation TKProgressAlertView
- (id) initWithProgressTitle:(NSString*)txt{
- if(!(self=[super initWithFrame:CGRectZero])) return nil;
+ if(!(self=[super init])) return nil;
self.label.text = txt;
return self;
}
-- (void) _drawRoundRectangleInRect:(CGRect)rect withRadius:(CGFloat)radius{
- CGContextRef context = UIGraphicsGetCurrentContext();
-
- CGRect rrect = CGRectMake(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height );
- CGFloat minx = CGRectGetMinX(rrect), midx = CGRectGetMidX(rrect), maxx = CGRectGetMaxX(rrect);
- CGFloat miny = CGRectGetMinY(rrect), midy = CGRectGetMidY(rrect), maxy = CGRectGetMaxY(rrect);
- CGContextMoveToPoint(context, minx, midy);
- CGContextAddArcToPoint(context, minx, miny, midx, miny, radius);
- CGContextAddArcToPoint(context, maxx, miny, maxx, midy, radius);
- CGContextAddArcToPoint(context, maxx, maxy, midx, maxy, radius);
- CGContextAddArcToPoint(context, minx, maxy, minx, midy, radius);
- CGContextClosePath(context);
- CGContextDrawPath(context, kCGPathFill);
-}
-- (void) drawRect:(CGRect)rect{
- CGRect r = CGRectInset(rect, 6, 0);
- [[UIColor colorWithRed:0 green:0 blue:0 alpha:0.8] set];
- [self _drawRoundRectangleInRect:r withRadius:10];
+- (void) loadView{
+ [super loadView];
+ [self.alertView addSubview:self.progressBar];
+ [self.alertView addSubview:self.label];
+ self.alertView.frame = CGRectMake(0, 0, CGRectGetWidth(self.alertView.frame), CGRectGetMaxY(self.progressBar.frame) + 14);
}
-- (void) show{
- [super show];
-
- for (UIView *subview in [self subviews]) {
- if ([subview isKindOfClass:[UIImageView class]]) subview.hidden = YES;
- }
-
- self.backgroundColor = [UIColor clearColor];
- [self addSubview:self.progressBar];
- [self addSubview:self.label];
-}
-- (void) hide{
- [self dismissWithClickedButtonIndex:0 animated:NO];
-}
-
+#pragma mark Properties
- (TKProgressBarView *) progressBar{
if(_progressBar) return _progressBar;
@@ -92,8 +65,8 @@ - (UILabel*) label{
_label = [[UILabel alloc] initWithFrame:CGRectMake(20, 10, 245, 25)];
_label.textAlignment = NSTextAlignmentCenter;
_label.backgroundColor = [UIColor clearColor];
- _label.textColor = [UIColor whiteColor];
- _label.font = [UIFont boldSystemFontOfSize:16];
+ _label.textColor = [UIColor blackColor];
+ _label.font = [UIFont boldSystemFontOfSize:16];
return _label;
}
View
6 src/TapkuLibrary/TKProgressBarView.m
@@ -119,7 +119,9 @@ - (void) drawRect:(CGRect)rect borderRadius:(CGFloat)rad borderWidth:(CGFloat)th
CGContextAddArcToPoint(context, maxx, maxy, midx, maxy, radius);
CGContextAddArcToPoint(context, minx, maxy, minx, midy, radius);
CGContextClosePath(context);
- CGContextSetRGBStrokeColor(context, 1, 1, 1, 1);
+ CGContextSetStrokeColorWithColor(context, self.tintColor.CGColor);
+
+
CGContextSetLineWidth(context, thickness);
CGContextDrawPath(context, kCGPathStroke);
@@ -137,7 +139,7 @@ - (void) drawRect:(CGRect)rect borderRadius:(CGFloat)rad borderWidth:(CGFloat)th
CGContextAddArcToPoint(context, maxx, maxy, midx, maxy, radius);
CGContextAddArcToPoint(context, minx, maxy, minx, midy, radius);
CGContextClosePath(context);
- CGContextSetRGBFillColor(context,1, 1, 1, 1);
+ CGContextSetFillColorWithColor(context, self.tintColor.CGColor);
CGContextDrawPath(context, kCGPathFill);
View
5 src/TapkuLibrary/TKProgressCircleView.m
@@ -58,11 +58,12 @@ - (void) drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGRect r = CGRectInset(rect, 4, 4);
- CGContextSetRGBStrokeColor(context, 1.0, 1.0, 1.0, 1.0);
+ CGContextSetFillColorWithColor(context, self.tintColor.CGColor);
+ CGContextSetStrokeColorWithColor(context, self.tintColor.CGColor);
+
CGContextSetLineWidth(context, 3.0);
CGContextAddEllipseInRect(context, r);
CGContextStrokePath(context);
- CGContextSetRGBFillColor(context,1,1,1,1);
if(!_twirlMode){
CGContextAddArc(context, rect.size.width/2, rect.size.height/2, (rect.size.width/2)-7, M_PI/-2.0, ((M_PI*2.0) *_displayProgress) - M_PI/2.0 , false);
View
2  src/TapkuLibrary/TKRetroButton.h
@@ -33,7 +33,7 @@
@interface TKRetroButton : UIButton
-
@property (nonatomic,assign) CGFloat borderWidth;
+@property (nonatomic,assign) CGFloat insetWidth;
@end
View
11 src/TapkuLibrary/TKRetroButton.m
@@ -39,6 +39,8 @@ - (id) initWithFrame:(CGRect)frame{
[self setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
self.titleEdgeInsets = UIEdgeInsetsMake(0, 8, 0, 8);
self.borderWidth = 2;
+ self.insetWidth = self.borderWidth * 2.5;
+ self.layer.contentsScale = [UIScreen mainScreen].scale;
return self;
}
@@ -69,23 +71,20 @@ - (void) drawRect:(CGRect)rect {
CGContextSetFillColorWithColor(ctx, fillColor);
CGContextSetStrokeColorWithColor(ctx, strokeColor);
-
CGContextSaveGState(ctx);
- //CGFloat lineWidth = 2;//self.bold ? kFlatPillButtonBoldLineWidth : kFlatPillButtonNormalLineWidth;
-
CGContextSetLineWidth(ctx, self.borderWidth);
- UIBezierPath *outlinePath = [UIBezierPath bezierPathWithRoundedRect:CGRectInset(self.bounds, self.borderWidth, self.borderWidth) cornerRadius:self.bounds.size.height/2];
+ UIBezierPath *outlinePath = [UIBezierPath bezierPathWithRoundedRect:CGRectInset(self.bounds, self.borderWidth, self.borderWidth) cornerRadius:(self.bounds.size.height-2)/2];
CGContextAddPath(ctx, outlinePath.CGPath);
CGContextStrokePath(ctx);
CGContextRestoreGState(ctx);
- if (self.highlighted) {
+ if (self.highlighted || self.selected) {
CGContextSaveGState(ctx);
- UIBezierPath *fillPath = [UIBezierPath bezierPathWithRoundedRect:CGRectInset(self.bounds, self.borderWidth * 2.5, self.borderWidth * 2.5) cornerRadius:self.bounds.size.height/2];
+ UIBezierPath *fillPath = [UIBezierPath bezierPathWithRoundedRect:CGRectInset(self.bounds, self.insetWidth, self.insetWidth) cornerRadius:self.bounds.size.height/2];
CGContextAddPath(ctx, fillPath.CGPath);
CGContextFillPath(ctx);
View
9 src/TapkuLibrary/TKTextFieldCell.m
@@ -49,10 +49,15 @@ - (id) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
- (void) layoutSubviews {
[super layoutSubviews];
- _textField.frame = CGRectInset(self.contentView.bounds, 14, 4);
+
+ CGRect frame = CGRectInset(self.contentView.bounds, 14, 4);
+ if(self.indentationLevel != 0 && self.indentationWidth != 0){
+ frame.origin.x = self.indentationLevel * self.indentationWidth;
+ frame.size.width = CGRectGetWidth(self.contentView.frame) - CGRectGetMinX(frame) - 14;
+ }
+ _textField.frame = frame;
}
-
- (void) _colorText:(BOOL)active{
_textField.textColor = active ? [UIColor whiteColor] : [UIColor blackColor];
}
Please sign in to comment.
Something went wrong with that request. Please try again.