Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

UISearchBar programmatically??

sportsfan27sportsfan27 Posts: 45
edited November 2009 in iOS SDK Development
Hello,
I have a UITableView I created without a nib file, and I want to add a UISearchBar to it. Unfortunately, I don't know how to add the UISearchBar itself without using a nib file. Anyone know what to do? Thanks
Post edited by sportsfan27 on

Replies

  • shanshan Posts: 96
    edited November 2009
    This what you are looking for?
    	UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 41.0)];
    	[self.view addSubview:searchBar];
    	[searchBar release];
    
    
  • sportsfan27sportsfan27 Posts: 45
    edited November 2009
    YES!!!! Thank you very much!!!
Sign In or Register to comment.