Rows in master view dont respond to clicks..

Discussion in 'iPhone/iPad Programming' started by akaash1087, Aug 14, 2012.

  1. macrumors newbie

    Joined:
    Jul 7, 2010
    #1
    I am working on a splitview based app.In one of my detail VCs I am presenting a VC modally.My master VC consists of several rows.On each row click a different view appears in the detail view.When I present a VC modally
    from within one of my DetailViewcontrollers ,the rows in my master view dont respond to clicks.
    Is there any reason behind it..

    I have tried to use loadView method but it rotates the screen.How do I prevent that from happening??.
    Any help would be highly appreciated..
     
  2. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    What is your understanding of what modal views are and how they work?
     
  3. thread starter macrumors newbie

    Joined:
    Jul 7, 2010
    #3
    Modall VCs are used to present a Vc from within another VC..

    Modal views are basically used when you want to present a VC's content from within another VC.It could be needed when you want to present a screen on a btn click,in that case you would write the action for that btn,within which you use PresentModalViewController() method.
    This is what I am doing..
    In my splitview app there are master panes and detailVCs,with different Views coming up on different row clicks.In one of the views I present a VC modally on a btn click,it gets presented ..but after that when I click on different rows of
    my master view ,different Views dont appear..as they did earlier..
     
  4. thread starter macrumors newbie

    Joined:
    Jul 7, 2010
    #4
    loadView rotates the screen??..

    I also called loadView method on splitviewcontroller.I called it in the didSelectRowAtIndexPath: method of the source file which corresponds to the master view(consisting of a number of rows) where I am checking which row the user has clicked and then doing the appropriate thing.In that I call loadView method on the splitviewcontroller .The screen corresponding to that row comes up (it was not coming up earlier) but it is rotated.I dont know what causes the screen to rotate.
    What can I do to prevent the screen to rotate?
     
  5. macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #5
    A modal VC locks the screen so you can't do anything else until you finish with it. It puts the device into a "mode". That's the way it is supposed to work. If you don't want that to happen, add a subview to your VC rather than presenting a modal VC

    ----------


    If you read the docs on loadView:


    When you ignore warnings like that, the results are undefined.
     
  6. thread starter macrumors newbie

    Joined:
    Jul 7, 2010
    #6
    Got it..I had read that..but I ignored it..because I was not getting any output..
    I will take care in future..

    Thanks a lot..
     

Share This Page