Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RagingGoat

macrumors 6502
Original poster
Jun 21, 2010
307
15
I am having various issues with the iPad version of my app. On iPad it uses a split view. The biggest problem is that it isn't running consistently. Sometimes when I run it, it works for the most part. Other times it does not. Sometimes it has a problem showing the master view when in portrait mode and crashes. Other times it will crash when selecting a row from the master view. Another problem is that when everything seems to be working at least half way correctly, I have to rotate the device in order for the master view to actually show its table view. I'm thinking all of my issues have something to do with how I've implemented it into my iPhone app to make it a universal app. I did all of the same stuff in a standalone iPad app to try it out and it works fine.

Here is a link to my project because there is far too much code to post here.

https://docs.google.com/file/d/0B-vCzSnQb_YzeHRrck1JLWNUMG8/edit?usp=sharing

There are other issues but these are the biggest ones.


Also, here are screenshots of when it crashes.

Any help is greatly appreciated.
 

Attachments

  • error1.png
    error1.png
    755 KB · Views: 130
  • error2.png
    error2.png
    742.4 KB · Views: 86

truehybridx

macrumors member
Dec 6, 2010
86
0
Your best bet is probably to read through this tutorial here and make sure you understand it completely.

Without seeing any code i can only guess its something to do with how you are handling passing items from the Master to the Detail views.

You can also post your question on there since its a tutorial site and more people are likely to chime in

--
Having looked at code, it looks like it would take hours to go through and figure out whats going on.

When you first added iPad support, at which point after did the app stop working right?
What was the last thing you changed between working and not working?
 
Last edited:

RagingGoat

macrumors 6502
Original poster
Jun 21, 2010
307
15
When you first added iPad support, at which point after did the app stop working right?
What was the last thing you changed between working and not working?

It worked fine as a standalone iPad app. I took the code from that project and implemented it into my iPhone app to make a universal app. After some tweaking, such as differentiating between iPhone and iPad, it worked for the most part. The last thing I changed was with the navigation bar on the webviewcontroller I'm pushing as a detail view. It didn't work like I wanted so I changed it back and these issues kept happening.

----------

I'm thinking it has something to do with it being a universal app and how I'm implementing the split view for iPad because, like I said before, this same code works just fine as just an iPad app in a separate project. Here is where I'm doing that in didFinishLaunchingWithOptions.

Code:
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
    {
        self.viewController = [[KFBViewController alloc] initWithNibName:@"KFBViewController" bundle:nil];
        self.window.rootViewController = self.tabBarController;
    }
    else
    {  
        masterViewController.detailViewController = detailViewController;
        
        self.splitViewController = [[UISplitViewController alloc] init];
        self.splitViewController.delegate = detailViewController;
        self.splitViewController.viewControllers = @[masterNavigationController, detailNavigationController];
        self.window.rootViewController = self.splitViewController;
    }
 

RagingGoat

macrumors 6502
Original poster
Jun 21, 2010
307
15
Another quick update on the situation. I started a new project and used the Master-Detail template to create a new universal app. I used the exact same code I am having issues with and it works fine.
 

RagingGoat

macrumors 6502
Original poster
Jun 21, 2010
307
15
I know I'm posting a lot of updates. I still can't figure out why it won't work in my existing project. The project in this link was also created with the Master-Detail template and uses the exact same code that is in the project I'm trying to get working. I added some of the iPhone code in this one to make sure there were no conflicts with that.

https://docs.google.com/file/d/0B-vCzSnQb_YzZ1p5cHA5LVhIeXM/edit?usp=sharing
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.