ModalView and segmentedButton?

Discussion in 'iOS Programming' started by MACloop, Feb 18, 2010.

  1. MACloop macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #1
    Hi,
    is it possible to control a modalview with a segmentedButton? My problem is that I think modalViews are great but the customer wants "no matter what" a segmented button to switch between 2 views. Is it possible to combine those two? Or should I use a subview and switch between this view and the parentView? I have had some problems with subviews before and would like to avoid that this time... Any ideas how to make a good an stabile solution on this?

    MACLoop
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Not really. Modal views take over the screen and so you wouldn't have access to your segmented control any more.

    This sounds like a weird approach as well. Here's what I would do (having done something like this in my app, [app]a.k.a.[/app]):

    Have a parent view that contains the segmented control, and then have two subviews that contain the content for each choice of the segment. Remember that subviews can be smaller than the screen size and can be hidden and/or moved off-screen.
     

Share This Page