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 02-14-2009, 03:43 AM   #1 (permalink)
New Member
 
Join Date: Feb 2009
Location: Bangkok
Posts: 145
DGYWFT is on a distinguished road
Default Show/Hide Search Bar

I am trying to find the best way to toggle something between shown and hidden. Say like in the Ipod player if you touch down on the bottom, the player bar comes up, but if you touch back out its gone. All of it done with a nice fade in fade out.

Is there anything built into the SDK for doing this?
DGYWFT is offline   Reply With Quote
Old 02-14-2009, 04:11 AM   #2 (permalink)
Registered Member
 
Join Date: Nov 2008
Location: dortmund / germany / europe / earth / milky way
Posts: 29
rene_h is on a distinguished road
Send a message via Skype™ to rene_h
Default

what about bringSubviewToFront and sendSubview to back, or vice versa :-)

Rene
rene_h is offline   Reply With Quote
Old 02-14-2009, 10:16 AM   #3 (permalink)
New Member
 
Join Date: Feb 2009
Location: Bangkok
Posts: 145
DGYWFT is on a distinguished road
Default

Sorry, but I am totally new to all this. I was trying Hidden / Not Hidden. But I couldn't not figure out the way to make it hide on tap out. What exactly is bringSubviewToFront, super new to all this so am looking at the docs but not sure what a subview is?
DGYWFT is offline   Reply With Quote
Old 02-14-2009, 10:36 AM   #4 (permalink)
Don
Registered Member
 
Join Date: Jan 2009
Posts: 68
Don is on a distinguished road
Default

Take a look at the "HeadsUpUI" sample app... it does exactly what you're describing (well, with a custom view instead of the search bar, but the technique will be the same).

- Don
Don is offline   Reply With Quote
Old 02-14-2009, 10:38 AM   #5 (permalink)
Registered Member
 
Join Date: Nov 2008
Location: dortmund / germany / europe / earth / milky way
Posts: 29
rene_h is on a distinguished road
Send a message via Skype™ to rene_h
Default

At first there ist the possibility with searchbar.hidden=TRUE and FALSE. Then the option with bringSubview to Front // Back.

an example:
you have a table-view with a search-bar. then you want to open a detail-view for a chosen result --> hide searchbar
then you can realize to hide the searchbar in the function didselectRowAtIndex
But this is only one of a lot of possibilities


Rene
rene_h is offline   Reply With Quote
Old 02-14-2009, 10:51 AM   #6 (permalink)
New Member
 
Join Date: Feb 2009
Location: Bangkok
Posts: 145
DGYWFT is on a distinguished road
Default

Don
Found the HeadsUpUI and yes, this is exactly what I want to do, fade in fade out. Thanks, will hack at this for awhile to get my setup going right!

When I was trying just hidden/not hidden wasn't so smooth and I couldn't not figure out how to hide it when clicking elsewhere. Just came on, but never went away, not sure of the tap style to hide it. I also don't know anything about 'subviews' and all that, will research this idea more for future projects.

Coming from an PHP background, only a week or so in all this application coding, but its very interesting!
DGYWFT is offline   Reply With Quote
Old 02-14-2009, 10:14 PM   #7 (permalink)
New Member
 
Join Date: Feb 2009
Location: Bangkok
Posts: 145
DGYWFT is on a distinguished road
Default

As I'm still a noob, maybe someone can help point me in the right direction with some of the logic in all this. I am looking at the HeadsUpUI file, and this is exactly what I want to do, a custom view as well. I am seeing they have made a view for the information that comes up.

In my project, I used the Window Based application template. This creates the extra ViewController files, in here I created my look and interface. In this file, I want this other view to show up. So do I need to create a view, inside this ViewController file, or do I need to create entire new xib files and class files to work with the item I want to show/ hide?

Hopefully this makes sense, I'm just a little confused on how to interact between various screens, items in the sdk right now.
DGYWFT is offline   Reply With Quote
Old 02-15-2009, 11:18 AM   #8 (permalink)
Don
Registered Member
 
Join Date: Jan 2009
Posts: 68
Don is on a distinguished road
Default

Quote:
Originally Posted by DGYWFT View Post

... In my project, I used the Window Based application template. This creates the extra ViewController files, in here I created my look and interface. In this file, I want this other view to show up. So do I need to create a view, inside this ViewController file, or do I need to create entire new xib files and class files to work with the item I want to show/ hide? ...
There's really no way to answer that question. You don't *need* to create xib files at all - everything can be done through code. You *can* create your "fade-in/out" view in the same xib, and control it from the same controller code. You *can* put it in a new xib, and give it a new controller.

It depends on many different factors --- how complex the fade-in/out view is, what it will do, how it needs to interact with the underlying view, how dynamic / static it is, etc, etc, etc.

Spend some more time with the sample app. Learn what it's doing. Start modifying it along the lines of what you ultimately want yours to be. At that point, you will be able to answer that question.

- Don
Don is offline   Reply With Quote
Reply

Bookmarks

Tags
fade, hide, interaction, ipod, show

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: 326
5 members and 321 guests
Anwerbl, guusleijsten, HowEver, LEARN2MAKE, mottdog
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,879
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

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