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 Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-01-2011, 06:27 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 54
Nekbeth is on a distinguished road
Default Best way to search and push detailviews?

Hi, I'm looking for a way to search my detailviews, so when the user starts typing inside the bar, he can then select the row and push it's particular detail view.

how can you achieve this?

Thank you
Nekbeth is offline   Reply With Quote
Old 04-02-2011, 03:11 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

for the search bar, you can follow one of millions tutorial on this topik

Let me google that for you
iPhone Tutorial: Adding a search bar in TableView

Same thing to load a detail view using a uinavigationcontroller

Let me google that for you
http://www.iphonesdkarticles.com/200...tail-view.html
__________________
dany_dev is offline   Reply With Quote
Old 04-02-2011, 08:39 AM   #3 (permalink)
Registered Member
 
Join Date: Apr 2011
Posts: 1
4frenzy is on a distinguished road
Default

i finished my app'interface with nav controller tableview and as a second view i add detail view but i am confused about how should i store my datas i got around 5.000 words and their detail views should i use p.list ? . honestly i dont i have any idea about sqlite to use store datas.. i already learn manage datas with Coredata but and i dont have any idea how sould i save my words and their meanings which will view at detailview ??

where should i start pls give me some tips.
4frenzy is offline   Reply With Quote
Old 04-02-2011, 09:02 AM   #4 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 54
Nekbeth is on a distinguished road
Default

Quote:
Originally Posted by 4frenzy View Post
i finished my app'interface with nav controller tableview and as a second view i add detail view but i am confused about how should i store my datas i got around 5.000 words and their detail views should i use p.list ? . honestly i dont i have any idea about sqlite to use store datas.. i already learn manage datas with Coredata but and i dont have any idea how sould i save my words and their meanings which will view at detailview ??

where should i start pls give me some tips.


Hi Frenzy, I think the answer to both our questions is Core Data, you said that you've already learn to manage data but have no idea to save words. I've read and watch some documentation about Core Data and I'm sure you can do that too. As far I know, you don't need to know sqlite using Core Data and that's because it generate it for you. (it's using SQL to store your data already for you). I'm learning more about it as I type, so I'll keep you posted. Another way I've save words and push them is using plist (the plist is in your resources, therefor saves all your words) by adding a number string (integer) and then using a switch statement to call those rows in the controller. That works fine with me, the only problem is that if you want to insert a Search for those words, you can search the text but you won't be able to push the detail view because it's always row 1.
Nekbeth is offline   Reply With Quote
Old 04-02-2011, 09:27 AM   #5 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 54
Nekbeth is on a distinguished road
Default

Quote:
Originally Posted by dany_dev View Post
for the search bar, you can follow one of millions tutorial on this topik

Let me google that for you
iPhone Tutorial: Adding a search bar in TableView

Same thing to load a detail view using a uinavigationcontroller

Let me google that for you
UITableView ? Loading a detail view

Thanks Dany, I've used Google. I can find millions of tutorials like you said but they all tell you how to search text (which is the only thing a search bar does), but can you provide a link that explains you how to push your detailviews after that search bar text result, which is one row only?
Nekbeth is offline   Reply With Quote
Old 04-02-2011, 10:08 AM   #6 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

Code:
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText

{

...

if(counter == 1){
  //code that push your view.
}

[myTableView reloadData];

}
starting from the code of the tutorial that i posted, you can use this approach, also i'm not so sure is a good idea to auto-push a view when reach 1 result searching.
__________________
dany_dev is offline   Reply With Quote
Old 04-02-2011, 10:45 AM   #7 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 54
Nekbeth is on a distinguished road
Default

Quote:
Originally Posted by dany_dev View Post
Code:
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText

{

...

if(counter == 1){
  //code that push your view.
}

[myTableView reloadData];

}
starting from the code of the tutorial that i posted, you can use this approach, also i'm not so sure is a good idea to auto-push a view when reach 1 result searching.

Thanks for the code, it is very useful. Specially this part of the code:

Code:
 if([searchText isEqualToString:@""]searchText==nil){
I won't need to auto-push a view the result is 1 because this way I'll be looking for it's string name and not the number. Super Cool,

Thanks a lot !!!
Nekbeth is offline   Reply With Quote
Reply

Bookmarks

Tags
detailview, navigation, search bar

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: 377
12 members and 365 guests
condor304, dansparrow, dre, ilmman, LezB44, michelle, Objective Zero, samdanielblr, Sami Gh, shagor012, thephotographer, tinamm64
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,119
Posts: 402,896
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

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