public override void ViewDidLoad() { base.ViewDidLoad(); // Create a new table view controller tableViewController = new ACTableViewController(UITableViewStyle.Grouped, View.Frame); View.AddSubview(tableViewController.TableView); tableViewController.cellSelectionStyle = UITableViewCellSelectionStyle.None; // Wireup data request event tableViewController.dataSource.RequestData += (dataSource) => { // Add simple items var components = dataSource.AddSection("Action Components"); components.AddItem("Action Alerts", "For iOS and Android", true); components.AddItem("Action Table", "For iOS and Android", true); components.AddItem("Action Toast", "For iOS", true); components.AddItem("Action Tray", "For iOS and Android", true); components.AddItem("Action View", "For iOS and Android", true); components.AddItem("Action Download Manager", "For iOS and Android", true); components.AddItem("Action Nav Bar", "For iOS and Android", true); // Add accessories var accessories = dataSource.AddSection("Accessories"); accessories.AddItem("Switch", false).AddAccessorySwitch(false, (on) => { // Display switch state ACToast.ShowText($"Switch State: {on}"); }); accessories.AddItem("Stepper {0}", false).AddAccessoryStepper(1, 10, 1, 1, (value) => { // Display step value ACToast.ShowText($"Stepper Value: {value}"); }); accessories.AddItem("Slider {0:0}", false).AddAccessorySlider(1, 100, 50, (value) => { // Display slider value ACToast.ShowText($"Slider Value: {value}"); }); accessories.AddItem("Button", false).AddAccessoryButton(UIButtonType.RoundedRect, 100, "OK", () => { // Display results ACToast.ShowText("Button Pressed"); }); accessories.AddItem("Text", false).AddAccessoryTextField(250, "<enter text>", "", (text) => { // Display value ACToast.ShowText($"Text Value: {text}"); }); }; // Wireup item selection tableViewController.ItemsSelected += (item) => { // Display selected item ACToast.ShowText($"Item Selected {item.text}"); }; // Ask table to load data tableViewController.LoadData(); }
partial void ShowCenter(Foundation.NSObject sender) { ACToast.ShowText("Message at Center.", ACToastGravity.Center); }
partial void ShowBottom(Foundation.NSObject sender) { ACToast.ShowText("Message at Bottom.", ACToastGravity.Bottom); }
partial void ShowTop(Foundation.NSObject sender) { ACToast.ShowText("Message at Top.", ACToastGravity.Top); }