09-13-2011, 03:58 PM
I see a couple of things.
First note - you're using sizing that is wrong.
CGRect frame= [[UIScreen mainScreen] applicationFrame];
UIWebView *webview1 = [[UIWebView alloc] initWithFrame:frame];
You shouldn't be requesting the frame of the UIScreen for setting the webview frame, you should be requesting the bounds of the view that you're adding the webview into (the detail controllers view). The frame of the screen is going to be the full size of the screen that the application window resides in rather then the size of the detail view which will be different depending on landscape or portrait orientation.
And why are you doing this:
[self performSelector:@selector(startWebViewLoad) withObject:nil afterDelay:0]; ?
you should just do:
All you're doing is adding in additional method calls that aren't necessary in this case.
You're also using the activity indicator in a funky way - it should be spinning during the time of load, which you should activate through the UIWebViewDelegate methods which you haven't implemented (but need to).
Your code is odd though. You're creating a detailViewController in the subtable class, but no where do I see where you're setting the detail view controller of the splitviewcontroller to be that controller you allocated. Just because it may have the same name and be of the same class of another instance doesn't mean you have access to instance A through instance B of a given class.
It looks to me like you don't quite understand how to communicate between the master and the detail view of the split view controller, and in that you are never really telling the ACTUAL detail view controller to load and display the content. So my guess based upon the code you have posted is because you aren't actually communicating with the actual instance of the detail view that is really on the screen but rather the one you alloc'd in the subtable.m file which is different from the one that is in the split view detail panel.