Rows in master view dont respond to clicks..

Discussion in 'iOS Programming' started by akaash1087, Aug 14, 2012.

  1. akaash1087 macrumors newbie

    Jul 7, 2010
    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. dejo Moderator


    Staff Member

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

    Jul 7, 2010
    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 they did earlier..
  4. akaash1087 thread starter macrumors newbie

    Jul 7, 2010
    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. Duncan C macrumors 6502a

    Duncan C

    Jan 21, 2008
    Northern Virginia
    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. akaash1087 thread starter macrumors newbie

    Jul 7, 2010
    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