- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
[searchBarClient resignFirstResponder];
if (!isSearching)
{
CGFloat offcet=scrollView.contentOffset.y;
if(offcet == 1)
{
[tblVwClientList setContentOffset:CGPointMake(0, 44) animated:YES];
}
else if (scrollView.contentOffset.y >= (scrollView.contentSize.height - scrollView.frame.size.height))
{
//else if (scrollView.contentOffset.y + scrollView.frame.size.height >= scrollView.contentSize.height - 70)
{
if ([ApplicationData sharedInstance].isLodding)
{
[self callWebServiceGetClientPageWise];
}
else
{
// NSLog(@"page called");
// [self callWebServicePageWise];
//pageNumber=pageNumber+1;
}
}
// [searchBarClient resignFirstResponder];
}
}
- (void)searchLocalArrayList
{
NSString *searchString = searchBar.text;
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"self.clientName contains[cd] %@",searchString];
NSMutableArray *arrType;
arrType = [[NSMutableArray alloc] initWithArray:yourMaiinArray];
[arrType filterUsingPredicate:predicate];
searchResultArray = arrType;
}
{
[searchBarClient resignFirstResponder];
if (!isSearching)
{
CGFloat offcet=scrollView.contentOffset.y;
if(offcet == 1)
{
[tblVwClientList setContentOffset:CGPointMake(0, 44) animated:YES];
}
else if (scrollView.contentOffset.y >= (scrollView.contentSize.height - scrollView.frame.size.height))
{
//else if (scrollView.contentOffset.y + scrollView.frame.size.height >= scrollView.contentSize.height - 70)
{
if ([ApplicationData sharedInstance].isLodding)
{
[self callWebServiceGetClientPageWise];
}
else
{
// NSLog(@"page called");
// [self callWebServicePageWise];
//pageNumber=pageNumber+1;
}
}
// [searchBarClient resignFirstResponder];
}
}
- (void)searchLocalArrayList
{
NSString *searchString = searchBar.text;
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"self.clientName contains[cd] %@",searchString];
NSMutableArray *arrType;
arrType = [[NSMutableArray alloc] initWithArray:yourMaiinArray];
[arrType filterUsingPredicate:predicate];
searchResultArray = arrType;
}