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
#pragma mark - SearchBar delegate methods | |
- (void) doSearch:(NSString *)searchText { | |
[self.filteredEntries removeAllObjects]; | |
if ( [searchText length] == 0 ) { | |
[self.filteredEntries addObjectsFromArray:self.entries]; | |
} else { | |
for (NSDictionary *entry in self.entries) { | |
NSString *name = (NSString *)[entry objectForKey:@"fullName"]; |
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
/** | |
* Do an HTTP POST request and return the results | |
* | |
* @param NSString * url the URL | |
* @param NSString * post the POST data | |
* | |
* @return NSDictionary * a dictionary containing the response, error, and data | |
*/ | |
+ (NSDictionary *)httpPostRequestWithUrl:(NSString *)url post:(NSString *)post | |
{ |
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
#pragma mark - Text Editing functions | |
- (BOOL)textFieldShouldReturn:(UITextField *)textField | |
{ | |
[textField resignFirstResponder]; | |
return YES; | |
} | |
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
// Create a tabbar controller and an array to contain the view controllers | |
UITabBarController *tabBarController = [[UITabBarController alloc] init]; | |
tabBarController.delegate = self; | |
NSMutableArray *localViewControllersArray = [[NSMutableArray alloc] init]; | |
// Setup first view and nav controllers | |
UIViewController *vc1 = [[UIViewController alloc] init]; | |
UINavigationController *nc1 = [[UINavigationController alloc] initWithRootViewController:vc1]; | |
[localViewControllersArray addObject:nc1]; |
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
Verifying I am +lborsato on my passcard. https://onename.com/lborsato |