-
Notifications
You must be signed in to change notification settings - Fork 2
/
Lavel1DialogViewController.cs
62 lines (50 loc) · 1.67 KB
/
Lavel1DialogViewController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using System;
using System.Linq;
using Com.Muegel.MonoTouch;
using MonoTouch.UIKit;
using MonoTouch.Dialog;
using SplitViewAndMTDialog1;
using MonoTouch.Foundation;
using System.Collections.Generic;
namespace SplitViewAndMTDialog1
{
public class Level1DialogViewController : DialogViewController
{
// EVENTS I FIRE ///////////////////////////////////////////////
// PUBLIC INNER TYPES //////////////////////////////////////////
public class Level1Element : StyledStringElement
{
public Level1Element(DialogViewController parent_dvc, string caption) :
base(caption)
{
Accessory = UITableViewCellAccessory.DisclosureIndicator;
this.Tapped += delegate {
var dlv2 = new Level2DialogViewController();
parent_dvc.NavigationController.PushViewController(dlv2, true);
;
};
}
}
// PRIVATE INNER TYPES /////////////////////////////////////////
// PUBLIC FIELDS, PROPERTIES, AND CONSTANTS ////////////////////
// PRIVATE FIELDS, PROPERTIES, AND CONSTANTS ///////////////////
// CONSTRUCTORS ////////////////////////////////////////////////
public Level1DialogViewController() : base(UITableViewStyle.Plain, null, false)
{
// This fixes the issue I was having with extra animation in detail pane
// when click back ("Lebel 1") button
Autorotate = true;
Root = new RootElement("Level 1")
{
new Section()
{
new Level1Element(this, "1"),
new Level1Element(this, "2"),
}
};
}
// PUBLIC METHODS //////////////////////////////////////////////
// EVENTS I HANDLE /////////////////////////////////////////////
// PRIVATE METHODS /////////////////////////////////////////////
}
}