public override void ViewDidLoad() { base.ViewDidLoad(); TemperatureLabel.Text = "Locating..."; _nearableManager.RangedNearable += NearableManagerOnRangedNearable; _nearableManager.RangedNearables += NearableManagerOnRangedNearables; _nearableManager.StartRangingForIdentifier("a764931d560a883f"); _nearableManager.StartRangingForType(NearableType.Car); _nearableManager.StartRangingForType(NearableType.Bed); }
public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); UpdateStats(); nearableManager.StartMonitoringForIdentifier(Nearable.Identifier); nearableManager.StartRangingForIdentifier(Nearable.Identifier); switch (Nearable.Color) { case Color.BlueberryPie: BackgroundView.BackgroundColor = UIColor.Blue; break; case Color.CandyFloss: BackgroundView.BackgroundColor = UIColor.Purple; break; case Color.IcyMarshmallow: BackgroundView.BackgroundColor = UIColor.LightGray; break; case Color.LemonTart: BackgroundView.BackgroundColor = UIColor.Yellow; break; case Color.MintCocktail: BackgroundView.BackgroundColor = UIColor.Green; break; case Color.SweetBeetroot: BackgroundView.BackgroundColor = UIColor.Cyan; break; default: BackgroundView.BackgroundColor = UIColor.Gray; break; } }