I associated the button with the following method:
- (IBAction)searchButton
{
NSString *searchText = _searchField.text;
NSLog(@"lol");
[_search testSearch:searchText];
}
The last line calls the testSearch method in an object named search, defined as follows:
@property (strong, nonatomic) Search *search;
Inside a search, testSearch is defined as follows:
-(void)testSearch:(NSString *)testString
{
NSLog(@"HELLO");
}
My end result when I click search is only "lol" (every time I click the button). It does NOT print "HELLO" as testSearch should do. I have included testSearch in Search.h, so it should be available ... why is this method not being called?
source
share