Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tools & Utilities

Reply
 
LinkBack Thread Tools Display Modes
Old 10-09-2010, 07:19 AM   #1 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 1
drmortyd is on a distinguished road
Default Searching content of different tableview

I'm new to iPhone programming. I'm trying to make an app that has a search bar when it starts and displays a few categories below it. I don't want to search the categories (all of the example code about table view searching shows how to search the contents of the current tableview). Is there a way to make the search work with a different tableview, for example, the contents of one of the categories shown below the searbar? I really appreciate your help!
drmortyd is offline   Reply With Quote
Old 10-09-2010, 07:47 PM   #2 (permalink)
Fly-by-night Innovator
 
Join Date: Jun 2010
Posts: 364
musicwind95 is on a distinguished road
Default

The search bar will access any data that you give it. Ideally, you'd want to the search bar to be working with the data from the same class. Therefore, to have it search the contents of another table view, you'd want that data readily accessible.

Here's a site that gives a tutorial on how to implement a search bar:
Dimensions: iPhone Development: Adding Search Bar in Table View

Instead of having dataSource be a local variable, you would instead set dataSource to be the data from another view:
self.dataSource = someView.otherData;
Or, you can make a copy of that data, and reference the local copy.

Hope that helps!
__________________
If I have helped you, please consider donating. I use PayPal. It would mean a lot to me!


For more iOS Development, check out my blog—Cups of Cocoa. All visitors welcome, but especially beginners!

Hope I have helped!

Please check out IceFall, a new action game available in the App Store!
musicwind95 is offline   Reply With Quote
Reply

Bookmarks

Tags
search, tableview, uisearchbar

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 373
7 members and 366 guests
husthlj, illogical, LegionMD, LunarMoon, mer10, Murphy, padsoftware
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,677
Threads: 94,127
Posts: 402,916
Top Poster: BrianSlick (7,990)
Welcome to our newest member, husthlj
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:11 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0