I've worked through the multi view example on website but I am having
difficulty with this 

I probably misunderstand visibility and scope but can anyone tell me if I am
missing a simple step 

 

Right - you create the view controllers you want to push - in the example
they have a simple label and (as it says) do not need outlets 

But suppose you want to access the controls on that 'pushed' view from
outside 

Viz 

this.btnHelloWorld.TouchUpInside += (sender, e) => {

        //---- instantiate a new hello world screen, if it's null

        // (it may not be null if they've navigated backwards

        if(this.helloWorldScreen == null)

        { this.helloWorldScreen = new HelloWorldScreen(); }

        //---- push our hello world screen onto the navigation

        //controller and pass a true so it navigates

        this.NavigationController.PushViewController(this.helloWorldScreen,
true);

    };

 

Suppose I have a webview on that helloworldScreen and I want to set its url
before pusshign the screen as above I would do something like 

NSUrl us= new NSUrl("someurl");

NSUrlRequest uReq= new NSUrlRequest(ur);

Mywebview.LoadRequest(uReq);

 

However if I open teh xib for the helloworldscreen in xcode - put a webvie
won ht escreen and cntrl drag click to create an outlet called Mywebview it
is not visible in the Didload method of the mainscreen 

 

Is there a way of making controls visible in the calling class?

TIA

John Murray 

 

 

_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to