App not working on iPad simulator, but fine on iPhone

Discussion in 'iOS Programming' started by fireshot91, Aug 22, 2011.

  1. fireshot91 macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #1
    So, this app I'm working on consists of a main-screen with a tableview

    Now, everything works fine on an iPhone simulator, but on the iPad simulator, the last couple of rows (and the right side of the screen), doesn't respond to touch. Sort of like an iPhone-sized screen is the only thing that can touch it, and it's from the top left corner to about the middle of the screen.

    If I turn the app to landscape, the responsive-part of the screen is again from the top left corner (portrait-wise) to the middle, so only the right half of the screen is responsive. Sort of like there's an iPhone-sized touch-input area in the same spot, no matter the orientation.


    Any ideas? I think I explained it correctly..

    Also, the orientation command returns YES, so it is able to go landscape.
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Have you, perhaps, created your UIWindow in code and made it iPhone sized?
     
  3. fireshot91 thread starter macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #3
    No, I don't think so.

    Sorry, I'm kind of new to iPhone development, and as far as I can tell, there's no size specified for anything.
     
  4. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #4
    So you have an IPHONE app, but you want it UNIVERSAL for IPHONE too?
    Kinda messed there, not 100% sure what your exact goal is, so can determine the error.
    You have a seperate XIB for the iPad or?
     
  5. fireshot91 thread starter macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #5


    No, I have just a default iPad application, the whole screen fills up on the iPad,but the only interactive portion the iPhone-superimposed-onto-an-iPad area.


    Like:

    [---------------------------]
    |______* ------------------|
    |______* -----------------|
    | _____ * -----------------|
    |---------------------------|
    |---------------------------|
    |---------------------------|
    |---------------------------|
    |---------------------------|
    [---------------------------]


    Where the only interactive part is defined by the * and the ___.

    The whole application looks fine, but I can't click on anything outside that area.


    God that was difficult to edit..
     
  6. fireshot91 thread starter macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #6
    I found a tutorial that does the same thing.

    If you run it in iPad simulator, the last two options aren't able to be selected.
     

    Attached Files:

  7. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #7
    Not gonna download your code atm, i'm on my Gaming pc. But wanted to check what happened.
    Like the "image" (lol) you provided, it looks like the interactive design is only from iPhone measures. So something went wrong with your MainWindow (is my first guess).
    so we really will need to see some code (or project files) to try to get to a solution.

    Gz, Noxx
     
  8. fireshot91 thread starter macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #8
    Well, my project is based off of that, I used that to get started.

    So any help would be great :D. It's a very simple build, like two or three classes. Not big in the slightest.
     
  9. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #9
    Take some screenshots of the First screen/Main Window (sizes) and etc.
    And then pop back :)
    Let's see if can figure it out.
     
  10. fireshot91 thread starter macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
  11. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #11
    You're showing the size of the Tableview (which is apparently not full screen on the iPad).
    More in the lines of your MainWindow.xib and your window size etc..
     
  12. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #12
    This is basically what I was getting at with my first reply: the UIWindow is probably stuck at iPhone size which does not seem to limit views drawing to the full iPad screen but does limit events to that size. I seem to remember that was what I found when I tried to transition an all-code (no xib files) iPhone app to the iPad
     
  13. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #13
    Yeah, I know that you were referring to that my kind sir.
    But since he didn't really know what to answer. Apparently your question got forgotten.
    I hope we at least come to a solution, because it's allways nice to have these things in our hand for "debugging" :p
     
  14. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #14
    A simple thing to do would be to NSLog the frame and bounds of the UIWindow at runtime...
     
  15. fireshot91 thread starter macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #15
    Sorry, here. Hopefully this helps a little more.


    As you can see, the tableview displays fully on the iPad. Except the last few options aren't...clickable.


    EDIT: Now I see it. The dimensions are 320x480 (iPhone sized). How can I edit them to make them bigger? They're greyed out
     

    Attached Files:

  16. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #16
    That's because you have an iPhone MainWindow, not an iPad ;)
    When you go to the Target, and you go to Summary, what does it say, is it iPhone/iPad/Universal?
    And which XIB does it use to Startup? It says it clearly in a box.
     
  17. fireshot91 thread starter macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
  18. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #18
    Didn't you say you had an IPAD app, it says clearly, Universal.
    So did you show us the Mainwindow.xib (with the iphone sizes).
    Is there a Mainwindow-ipad.xib ? (normally setting it to Universal, it creates this)
     
  19. fireshot91 thread starter macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #19
    Yes, but it has the same dimensions. (320x480).
     
  20. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #20
    Well, there is your problem..
    Don't know on top of my hat, how to set the dimensions, I know they are locked. Because when I create a universal, it rebuilds it. What you could do, is make a clean XIB, recreate the MainWindow (for iPad).
    ANd set your app to load the newly made xib for your iPad.
     
  21. fireshot91 thread starter macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #21
    Okay, I'll try that.

    Probably would run into issues..but I'll try it nonetheless.
     
  22. fireshot91 thread starter macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #22
    So, I created the new window, and everything.

    But, I can't seem to connect anything (When you right click on the object in IB).


    I attached the two pictures.

    The old one is the connected, new one is the non-connected.

    When I drag/drop the circle to the Navigation Controller, it attaches only as delegate (Instead of navigationController), and that when I fire up the simulator only loads the RootView Controller.
     

    Attached Files:

  23. fireshot91 thread starter macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #23
    Nvm, I got it.

    Thank you guys for your help. Much appreciated. I've been trying to figure this out for all of today and yesterday, and finally got it.
     

Share This Page