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?
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?
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).
Location: dortmund / germany / europe / earth / milky way
Posts: 29
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
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!
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.
... 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.