This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| + (CGPoint)getMostLeftTransparentPixelOfImage:(UIImage*)image | |
| { | |
| int xx = 0; | |
| int yy = 0; | |
| int count = image.size.width * image.size.height; | |
| // First get the image into your data buffer | |
| CGImageRef imageRef = [image CGImage]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //We need some properties | |
| @property (nonatomic,strong) NSMutableArray *dataSource; | |
| @property (nonatomic, strong) UITextField *currentTextField; | |
| @property (nonatomic) CGRect originalTableFrame; | |
| @property (nonatomic) NSIndexPath *indexForCurrentTextField; | |
| @property (nonatomic) NSTimeInterval keyboardAnimationDuration; | |
| //Don't forget to be delegate of UITextFieldDelegate | |
| //Then... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // NSMutableArray+Stack.m | |
| // shell poc | |
| // | |
| // Created by Jose Luis Campaña on 9/18/12. | |
| // Copyright (c) 2012 Jose Luis Campaña. All rights reserved. | |
| // | |
| #import "NSMutableArray+Stack.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // NSMutableArray+Stack.h | |
| // shell poc | |
| // | |
| // Created by Jose Luis Campaña on 9/18/12. | |
| // Copyright (c) 2012 Jose Luis Campaña. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @property (strong, nonatomic) IBOutlet UITextField *pin1_1; | |
| @property (strong, nonatomic) IBOutlet UITextField *pin1_2; | |
| @property (strong, nonatomic) IBOutlet UITextField *pin1_3; | |
| @property (strong, nonatomic) IBOutlet UITextField *pin1_4; | |
| @property (nonatomic, strong) NSString *pinText; | |
| - (void)viewDidLoad | |
| { | |
| (...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "NSMutableArray+Stack.h" | |
| #define SHOW_ANIMATION_DURATON 0.5f | |
| @property (nonatomic, strong) NSMutableArray *viewStack; | |
| -(void)pushView:(UIView *)view | |
| { | |
| UIView *anterior = [self.viewStack peek]; | |
| [self.viewStack push:view]; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| + (UIImage *)convertImageToGrayScale:(UIImage *)img | |
| { | |
| // Create image rectangle with current image width/height | |
| CGRect imageRect = CGRectMake(0, 0, img.size.width, img.size.height); | |
| // Grayscale color space | |
| CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray(); | |
| // Create bitmap content with current image size and grayscale colorspace | |
| CGContextRef context = CGBitmapContextCreate(nil, img.size.width, img.size.height, 8, 0, colorSpace, kCGImageAlphaNone); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string | |
| { | |
| NSString *newSearch = [textField.text stringByReplacingCharactersInRange:range withString:string]; | |
| NSLog(@"%@",newSearch); | |
| if ([newSearch length] >= MIN_NUMBER_OF_CHARACTERS_TO_LAUCH_SEARCH) | |
| { | |
| //Hacer búsqueda con newSearch | |
| } | |