本文整理汇总了C#中UIStoryboardSegue.IntendedDestinationViewController方法的典型用法代码示例。如果您正苦于以下问题:C# UIStoryboardSegue.IntendedDestinationViewController方法的具体用法?C# UIStoryboardSegue.IntendedDestinationViewController怎么用?C# UIStoryboardSegue.IntendedDestinationViewController使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIStoryboardSegue
的用法示例。
在下文中一共展示了UIStoryboardSegue.IntendedDestinationViewController方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrepareForSegue
// Provide the zone to `AddRoomViewController`.
public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
{
base.PrepareForSegue (segue, sender);
if (segue.Identifier == AddRoomsSegue) {
var addViewController = (AddRoomViewController)segue.IntendedDestinationViewController ();
addViewController.HomeZone = HomeZone;
}
}
示例2: PrepareForSegue
public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
{
base.PrepareForSegue (segue, sender);
if (segue.Identifier == SelectCharacteristicSegue) {
var destinationVC = segue.IntendedDestinationViewController () as CharacteristicSelectionViewController;
if (destinationVC != null) {
destinationVC.EventTrigger = EventTrigger;
destinationVC.TriggerCreator = CharacteristicTriggerCreator;
}
}
}
示例3: PrepareForSegue
public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
{
if (segue.Identifier == ShowServicesSegue) {
var senderCell = (UITableViewCell)sender;
var servicesVC = (ServicesViewController)segue.IntendedDestinationViewController ();
var cellIndex = TableView.IndexPathForCell (senderCell).Row;
servicesVC.AllowsAllWrites = true;
servicesVC.OnlyShowsControlServices = true;
servicesVC.Accessory = accessories [cellIndex];
servicesVC.CellDelegate = TriggerCreator;
}
}
示例4: PrepareForSegue
public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
{
base.PrepareForSegue (segue, sender);
if (segue.Identifier == ShowServiceSegue) {
var indexPath = TableView.IndexPathForCell ((UITableViewCell)sender);
if (indexPath != null) {
var characteristicsViewController = (CharacteristicsViewController)segue.IntendedDestinationViewController ();
var selectedService = tableViewDataSource.ServiceForIndexPath (indexPath);
if (selectedService != null)
characteristicsViewController.Service = selectedService;
characteristicsViewController.CellDelegate = cellController;
}
}
}
示例5: PrepareForSegue
public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
{
base.PrepareForSegue (segue, sender);
var vc = segue.IntendedDestinationViewController ();
var timeVC = vc as TimeConditionViewController;
if (timeVC != null) {
timeVC.TriggerCreator = EventTriggerCreator;
return;
}
var characteristicEventVC = vc as CharacteristicSelectionViewController;
if (characteristicEventVC != null) {
characteristicEventVC.TriggerCreator = (EventTriggerCreator)TriggerCreator;
return;
}
}
示例6: PrepareForSegue
public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
{
base.PrepareForSegue (segue, sender);
if (segue.Identifier == showServiceSegue) {
var servicesViewController = (ServicesViewController)segue.IntendedDestinationViewController ();
servicesViewController.OnlyShowsControlServices = true;
servicesViewController.CellDelegate = ActionSetCreator;
var index = TableView.IndexPathForCell ((UITableViewCell)sender).Row;
servicesViewController.Accessory = displayedAccessories [index];
}
}
示例7: PrepareForSegue
public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
{
base.PrepareForSegue (segue, sender);
if (segue.Identifier == AddServicesSegue) {
var addServicesVC = (AddServicesViewController)segue.IntendedDestinationViewController ();
addServicesVC.ServiceGroup = ServiceGroup;
}
}
示例8: PrepareForSegue
public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
{
base.PrepareForSegue (segue, sender);
if (segue.Identifier == selectLocationSegue) {
var destinationVC = segue.IntendedDestinationViewController () as MapViewController;
if (destinationVC == null)
return;
// Give the map the previous target region (if exists).
destinationVC.TargetRegion = LocationTriggerCreator.TargetRegion;
destinationVC.Delegate = LocationTriggerCreator;
}
}
示例9: PrepareForSegue
// Sets the accessory and home of the modifyAccessoryViewController that will be presented.
public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
{
base.PrepareForSegue (segue, sender);
var indexPath = TableView.IndexPathForCell ((UITableViewCell)sender);
if (segue.Identifier == ModifyAccessorySegue) {
var modifyViewController = (ModifyAccessoryViewController)segue.IntendedDestinationViewController ();
modifyViewController.Accessory = Room.Accessories [indexPath.Row];
}
}
示例10: PrepareForSegue
// Determines the destination of the segue and passes the correct
// HomeKit object onto the next view controller.
public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
{
var cell = sender as UITableViewCell;
if (cell == null)
return;
var indexPath = TableView.IndexPathForCell (cell);
if (indexPath == null)
return;
var destination = segue.IntendedDestinationViewController ();
var row = indexPath.Row;
switch (segue.Identifier) {
case ShowRoomSegue:
var roomVC = (RoomViewController)destination;
roomVC.Room = ObjectCollection.Rooms [row];
break;
case ShowZoneSegue:
var zoneViewController = (ZoneViewController)destination;
zoneViewController.HomeZone = ObjectCollection.Zones [row];
break;
case ShowActionSetSegue:
var actionSetVC = (ActionSetViewController)destination;
actionSetVC.ActionSet = ObjectCollection.ActionSets [row];
break;
case ShowServiceGroupSegue:
var serviceGroupVC = (ServiceGroupViewController)destination;
serviceGroupVC.ServiceGroup = ObjectCollection.ServiceGroups [row];
break;
case ShowAccessorySegue:
var detailVC = (ServicesViewController)destination;
// The services view controller is generic, we need to provide
// `showsFavorites` to display the stars next to characteristics.
detailVC.Accessory = ObjectCollection.Accessories [row];
detailVC.ShowsFavorites = true;
detailVC.CellDelegate = new AccessoryUpdateController ();
break;
case ModifyAccessorySegue:
var addAccessoryVC = (ModifyAccessoryViewController)destination;
addAccessoryVC.Accessory = ObjectCollection.Accessories [row];
break;
case ShowTimerTriggerSegue:
var triggerVC = (TimerTriggerViewController)destination;
triggerVC.Trigger = ObjectCollection.Triggers [row];
break;
case ShowLocationTriggerSegue:
var locationTriggerVC = (LocationTriggerViewController)destination;
locationTriggerVC.Trigger = ObjectCollection.Triggers [row];
break;
case ShowCharacteristicTriggerSegue:
var characteristicTriggerVC = (CharacteristicTriggerViewController)destination;
characteristicTriggerVC.Trigger = ObjectCollection.Triggers [row];
break;
default:
throw new InvalidOperationException (string.Format ("Received unknown segue identifier: {0}", segue.Identifier));
}
}
示例11: PrepareForSegue
// Passes the `CharacteristicsViewController` the service from the cell and configures the view controller.
public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)
{
base.PrepareForSegue (segue, sender);
if (segue.Identifier != ShowServiceSegue)
return;
var indexPath = TableView.IndexPathForCell ((UITableViewCell)sender);
if (indexPath == null)
return;
var selectedService = displayedServices [indexPath.Row];
var characteristicsViewController = (CharacteristicsViewController)segue.IntendedDestinationViewController ();
characteristicsViewController.ShowsFavorites = ShowsFavorites;
characteristicsViewController.AllowsAllWrites = AllowsAllWrites;
characteristicsViewController.Service = selectedService;
characteristicsViewController.CellDelegate = CellDelegate;
}