universal app and ipad appearance problem

Discussion in 'iOS Programming' started by chhoda, Dec 29, 2011.

  1. chhoda, Dec 29, 2011
    Last edited: Dec 29, 2011

    chhoda macrumors 6502

    Joined:
    Oct 25, 2008
    #1
    hi all,

    I have a iphone app which is table view and a detail view, i converted it to a universal app and my ipad main xib looks like below

    UIApplication
    UIResponder
    MyAppDelegate
    UIWindow
    UISplitViewController
    --UINavigationController
    ----UINavigationBar
    ----MyTableViewController
    ------UINavigationItem

    --UINavigationController
    ----UINavigationBar
    ----MyDetailViewController
    ------UINavigationItem

    But unfortunately when i run in ipad 4.2 i only see MyDetailViewController. where is list in left side ? my logs indicate that the tableview delegates are called properly

    regards
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    Is your UISplitViewController properly set up? just a random guess.. since you're saying that you see your detailController.
     
  3. chhoda thread starter macrumors 6502

    Joined:
    Oct 25, 2008
    #3
    Thanks for the reply.

    i don't know what does it mean by UISplitViewController properly set up
    but when i open the splitviewcontroller i see 2 windows, left one pointing to MyTableViewController.nib and right one to detailViewController.nib.

    when i go to UISplitViewController properties, the orientation is by default landscape. when i change it to portrait, it shows me only detailViewController why so ? i also tried in runtime rotating the ipad screen, i did not she both the view controllers !
     
  4. forum user macrumors regular

    Joined:
    Aug 28, 2008
    #4
    in portrait mode that is the normal behavior

    - Olaf
     
  5. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #5
    Like Olaf said.. This is standard UISplitViewController behaviour.
    When you have a splitview, you should add a standard Popover from the upper left corner, or use a library to have a splitviewcontroller like Apple Mail.
     
  6. chhoda thread starter macrumors 6502

    Joined:
    Oct 25, 2008
    #6
    Thanks,

    i figured out that by creating a splitview based app from wizard and studying that. Now that I am able to show splitviewcontroller properly, not what i am stuck with is, in portrait, when i click the bar button, i get a crash, i am sure there is some property in ib set to tell the bar button to show popover with tableview, but am unable to figure out ! does seem to be a written code

    can you gentlemen point me in the right direction ?

    regards
     
  7. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #7
    If you actually showed us your code, it'd help a great deal.
     
  8. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #8
    You could point us in the right direction by providing a lot more details about this problem than a far-too-vague "i get a crash".
     
  9. chhoda thread starter macrumors 6502

    Joined:
    Oct 25, 2008
    #9
    Thanks a lot,

    I understand, but it is pretty simple, and i donno what's wrong !
    I am just trying to be safe not divulge name, identity etc by posting any code.

    Let me explain what do I want.

    If I do a splitview application from wizard, it generates a functional code for us. I followed that application and am able to show 2 view controllers in landscape mode , first and second, that part is perfect.

    Now when i go to portrait mode, i see the item list bar button on the top, but when i click i get a crash and no log messages !

    My question is, where is that code written {probably a call to showViewInPopOver() or something like that !}
    or is it hooked up somewhere in IB ! which part of the wizard generated code does that ? I have searched many times, but could not find any ibaction or selector regarding the bar button !

    thanks in advance
     
  10. chhoda thread starter macrumors 6502

    Joined:
    Oct 25, 2008
    #10
    i could fix it, the cause was somewhere else where i was not retaining a memory i should have !
     

Share This Page