Skip to content

Instantly share code, notes, and snippets.

@Adam0101
Created May 19, 2011 16:29
Show Gist options
  • Save Adam0101/981177 to your computer and use it in GitHub Desktop.
Save Adam0101/981177 to your computer and use it in GitHub Desktop.
simpleTwitterViewController.m
#import "SimpleTwitterSearchViewController.h"
#import "SearchTwitter.h"
@implementation SimpleTwitterSearchViewController
- (void)dealloc
{
[searchTheTweets release];
[super dealloc];
}
- (SearchTwitter *)searchTheTweets {
if(!searchTheTweets) {
searchTheTweets = [[SearchTwitter alloc] init];
}
return searchTheTweets;
}
- (void)didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark -
#pragma mark Button action
- (void)goSearch {
//go grab the data from searchTwitter class
[[self searchTheTweets] grabData:[searchTerm text]];
SearchResults *viewController = [[SearchResults alloc] initWithNibName:@"SearchResults" bundle:[NSBundle mainBundle]];
//viewController.delegate = self;
[viewController setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[self presentModalViewController:viewController animated:YES];
//[self.navigationController pushViewController:viewController animated:YES];
[viewController release];
viewController = nil;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment