"stickying" an offset for scrolling

Discussion in 'iOS Programming' started by darthtroll, Dec 12, 2010.

  1. darthtroll macrumors newbie

    Joined:
    Aug 24, 2010
    #1
    Hi all,

    I'm developing an iPhone application that uses a UITableView. I have two subviews in the header view of that table view. A search bar and an image. I'd like to hide one subview (search bar) and show that image until it is scrolled out of range. I don't know the proper lingo to explain this, but I want the border between those 2 subviews to be "sticky". So basically, if I grab the table view and try and scroll a miniscule bit, the first subview doesn't want to show up until I break enough tension that it finally gives in and shows.

    Does anybody know what this is called and how I might be able to accomplish this? I know this is out there but I don't know what it's called.

    Darthtroll
     
  2. seepel macrumors 6502

    seepel

    Joined:
    Dec 22, 2009
    #2
    I've looked into this a little bit and I'd love to hear a better solution if anyone has one, but I just use the UIScrollViewDelegate functions. Be careful when using scrollViewDidScroll: though. You want to be careful not to do too many calculations there as it will really degrade preformance
     

Share This Page