This file contains 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
@interface NSObject (MHOverride) | |
/* | |
* Dynamically overrides the specified method on this particular instance. | |
* | |
* The block's parameters and return type must match those of the method you | |
* are overriding. However, the first parameter is always "id _self", which | |
* points to the object itself. | |
* |
This file contains 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
// | |
// ARSearchBar.h | |
// Artsy Folio | |
// | |
// Created by orta therox on 18/04/2012. | |
// Released under The MIT License | |
// http://www.opensource.org/licenses/mit-license.php | |
// | |
// Copyright (c) 2012 http://art.sy. All rights reserved. | |
// |
This file contains 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 *textValue = textField.text; | |
if(textValue.length > 0 && string.length > 0) { | |
NSRange dotRange = [textValue rangeOfString:@"."]; | |
BOOL isDot = [string isEqualToString:@"."]; | |
if(isDot) { | |
return (dotRange.length == 0); |
This file contains 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
@interface someController : UIViewController | |
@property (nonatomic, weak) UITextField *someTextField; | |
-(void)dismissKeyboard; | |
@end |
NewerOlder