View Single Post
Nethfel

 
Member Since: Feb 25, 2009
Posts: 2,084
Nethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of light
Mac Specs: 2012 Non-retina MBP, 2.6GHz i7, 8GB RAM, Antiglare Screen

Nethfel is offline
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:

[self startWebViewLoad];

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.

My Macs: 2012 Non-Retina 15" MBP; Mac mini G4, 1.25 GHz, 512m ram (server); Late 2011 11" MBA, 1.8GHz i7, 4Gig Ram, 256Gig SSD, HD3000; Powerbook 12" G4 1.33GHz running Debian as a server; Apple TV (1080p version)
QUOTE Thanks