[MonoTouch] how can i add an action when dv disappears?
Karl Heinz Brehme Arredondo
karl at e-magesolutions.com
Wed Oct 19 11:34:32 EDT 2011
Is a good idea (or not) to use that to make a loop (if possible) to populate
dynamically rows from a table/query? Or in this case is better to make
normal dynamic load of a UITableView?
Karl
From: Jeff Stedfast <jeff at xamarin.com>
Date: Wed, 19 Oct 2011 11:06:11 -0400
To: <info at ploetzeneder-it.com>
Cc: "monotouch at lists.ximian.com" <monotouch at lists.ximian.com>
Subject: Re: [MonoTouch] how can i add an action when dv disappears?
Hi Andreas,
You can subclass DialogViewController like this:
public class LoginViewController : DialogViewController
{
public LoginViewController () : base (null)
{
Root = new RootElement ("Settings") {
new Section () {
new BooleanElement ("Airplane Mode", false),
new RootElement ("Notifications", 0, 0) {
new Section (null, "Turn off Notifications to
disable Sounds\n" +
"Alerts and Home Screen Badges for
the\napplications below.") {
new BooleanElement ("Notifications", false)
}
}
}
} ;
}
public override void ViewDidDisappear (bool animated)
{
base.ViewDidDisappear (animated);
// Here is where you can add your custom code for when the
DialogViewController disappears
}
}
Hope that helps,
Jeff
2011/10/19 Andreas Ploetzeneder <info at ploetzeneder-it.com>
>
> i could subclass this,... how can i do it,..can somebody help me....
> i would like to have the data of root also in the subclass....directly,...
> so mylogincontroller:dialogviewcontroller{
> }
>
> 2011/10/19 Andreas Ploetzeneder <info at ploetzeneder-it.com>
>>
>> public class LoginView
>>
>> {
>>
>> public DialogViewController dv;
>>
>> public LoginView ()
>>
>> {
>>
>> var root = CreateRoot ();
>>
>> dv = new DialogViewController (root, true);
>>
>> }
>>
>> RootElement CreateRoot ()
>>
>> { return new RootElement ("Settings") {
>>
>> new Section (){
>>
>> new BooleanElement ("Airplane Mode", false),
>>
>> new RootElement ("Notifications", 0, 0) {
>>
>> new Section (null, "Turn off Notifications to disable Sounds\n" +
>>
>> "Alerts and Home Screen Badges for the\napplications below."){
>>
>> new BooleanElement ("Notifications", false)
>>
>> }
>>
>> }}} ;
>>
>> }
>
>
> --
>
>
>
>
>
> Mit freundlichem Gruß,
>
> Andreas Plötzeneder
> CEO
> ihr ploetzeneder it-solutions Team
> Mobile Development Desktopanwendungen Webanwendungen
> Tel: +43 720 30 30 24 10
> Fax: +43 720 30 30 24 20
> Email: info at ploetzeneder-it.com
> web: http://www.ploetzeneder-it.com
>
> Der Inhalt dieser E-Mail samt aller Anhänge ist vertraulich und
> ausschließlich für den Adressaten bestimmt. Wenn Sie nicht der vorgesehene
> Adressat dieser E-Mail oder dessen Vertreter sind, so löschen sie diese bitte
> und informieren Sie den Absender. Jede Form der Verbreitung oder
> Veröffentlichung der E-Mail, sei es in ihrer Gesamtheit oder in Teilen, die
> nicht ihrem Zweck dient, ist unzulässig. Das Internet kann die Unversehrtheit
> dieser Mitteilung nicht garantieren. ploetzeneder it-solutions übernimmt daher
> keine Haftung, falls die E-Mail geändert wurde.
>
>
>
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
MonoTouch at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111019/1eebbd73/attachment.html
More information about the MonoTouch
mailing list