Flipkart Search

Search This Blog

Thursday, August 6, 2009

Add SearchBar As UITableView's Header

Write This Code In Your viewDidLoad Method To Add a Search Bar As Your TableView's Header

UISearchBar *temp = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, 320, 45)];
temp.barStyle=UIBarStyleBlackTranslucent;
temp.showsCancelButton=NO;
temp.autocorrectionType=UITextAutocorrectionTypeNo;
temp.autocapitalizationType=UITextAutocapitalizationTypeNone;
temp.delegate=self;
YourTable.tableHeaderView=temp;
[temp release];

Clang GUI

use Clang GUI Front-End to Check Your Errors in Your Objective-c Code

Use the tool at this site:
http://www.karppinen.fi/analysistool/

This is Very Useful To Find Errors..just Ignore The m Prefix Warning..

How To Use Like Statement In Objective-c

To Use Like Statement In Objective-c

First Take A Temporary String like this

NSString *temp = [NSString stringWithFormat:@"%%%@%%", yourString];

now here is an example on how to use this

NSMutableString *query = [[NSMutableString alloc] initWithFormat:@"select flashCardId,flashCardText from Table where flashcardtext like '%@' and categoryId=%d",temp,categoryid];