Update 'CoreLocation' sample (#309)
* added new project * updated UI * added assets * removed old sample * updated ReadMe * removed extra file
|
@ -1,31 +0,0 @@
|
|||
using System;
|
||||
using UIKit;
|
||||
using Foundation;
|
||||
|
||||
namespace Example_CoreLocation
|
||||
{
|
||||
[Register("AppDelegate")]
|
||||
public class AppDelegate : UIApplicationDelegate
|
||||
{
|
||||
#region -= declarations and properties =-
|
||||
|
||||
protected UIWindow window;
|
||||
protected MainViewController mainViewController;
|
||||
|
||||
#endregion
|
||||
|
||||
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
|
||||
{
|
||||
// create our window
|
||||
window = new UIWindow (UIScreen.MainScreen.Bounds);
|
||||
window.MakeKeyAndVisible ();
|
||||
|
||||
// instantiate and load our main screen onto the window
|
||||
mainViewController = new MainViewController ();
|
||||
window.RootViewController = mainViewController;
|
||||
|
||||
//
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
using System;
|
||||
using UIKit;
|
||||
|
||||
namespace Example_CoreLocation
|
||||
{
|
||||
public class Application// : UIApplication
|
||||
{
|
||||
public static void Main (string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
UIApplication.Main (args, null, "AppDelegate");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine (e.ToString ());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,134 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{6EC86F9F-D4AE-4BFA-8936-11B3ECD60B01}</ProjectGuid>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Example_CoreLocation</RootNamespace>
|
||||
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
|
||||
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchDebug>True</MtouchDebug>
|
||||
<MtouchI18n></MtouchI18n>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<AssemblyName>CoreLocation</AssemblyName>
|
||||
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchI18n></MtouchI18n>
|
||||
<AssemblyName>CoreLocation</AssemblyName>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>True</MtouchDebug>
|
||||
<MtouchI18n></MtouchI18n>
|
||||
<IpaPackageName></IpaPackageName>
|
||||
<AssemblyName>Example_CoreLocation</AssemblyName>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<MtouchUseRefCounting>true</MtouchUseRefCounting>
|
||||
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchI18n></MtouchI18n>
|
||||
<AssemblyName>Example_CoreLocation</AssemblyName>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<Compile Include="Application.cs" />
|
||||
<Compile Include="MainScreen\IMainScreen.cs" />
|
||||
<Compile Include="MainScreen\MainViewController.cs" />
|
||||
<Compile Include="MainScreen\MainViewController_iPad.xib.cs">
|
||||
<DependentUpon>MainViewController_iPad.xib</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainScreen\MainViewController_iPad.xib.designer.cs">
|
||||
<DependentUpon>MainViewController_iPad.xib</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainScreen\MainViewController_iPhone.xib.cs">
|
||||
<DependentUpon>MainViewController_iPhone.xib</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainScreen\MainViewController_iPhone.xib.designer.cs">
|
||||
<DependentUpon>MainViewController_iPhone.xib</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="MainScreen\" />
|
||||
<Folder Include="Resources\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InterfaceDefinition Include="MainScreen\MainViewController_iPad.xib" />
|
||||
<InterfaceDefinition Include="MainScreen\MainViewController_iPhone.xib" />
|
||||
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\icon-72.png" />
|
||||
<BundleResource Include="Resources\icon-29.png" />
|
||||
<BundleResource Include="Resources\icon-50.png" />
|
||||
<BundleResource Include="Resources\icon-58.png" />
|
||||
<BundleResource Include="Resources\icon-100.png" />
|
||||
<BundleResource Include="Resources\Default-568h%402x.png" />
|
||||
<BundleResource Include="Resources\Default-Landscape%402x~ipad.png" />
|
||||
<BundleResource Include="Resources\Default-Landscape~ipad.png" />
|
||||
<BundleResource Include="Resources\Default-Portrait%402x~ipad.png" />
|
||||
<BundleResource Include="Resources\Default-Portrait~ipad.png" />
|
||||
<BundleResource Include="Resources\Default.png" />
|
||||
<BundleResource Include="Resources\Default%402x.png" />
|
||||
<BundleResource Include="Resources\icon-57.png" />
|
||||
<BundleResource Include="Resources\icon-114.png" />
|
||||
<BundleResource Include="Resources\icon-144.png" />
|
||||
<BundleResource Include="Resources\Icon-76.png" />
|
||||
<BundleResource Include="Resources\Icon-76%402x.png" />
|
||||
<BundleResource Include="Resources\Icon-Small-40%402x.png" />
|
||||
<BundleResource Include="Resources\Icon-Small-40.png" />
|
||||
<BundleResource Include="Resources\Icon-60%402x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ITunesArtwork Include="Resources\iTunesArtwork.png" />
|
||||
<ITunesArtwork Include="Resources\iTunesArtwork%402x" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoreLocation", "CoreLocation.csproj", "{6EC86F9F-D4AE-4BFA-8936-11B3ECD60B01}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoreLocation", "CoreLocation\CoreLocation.csproj", "{4A678860-F970-4A70-8DD4-857A5A01D254}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -11,14 +11,14 @@ Global
|
|||
Release|iPhone = Release|iPhone
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6EC86F9F-D4AE-4BFA-8936-11B3ECD60B01}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{6EC86F9F-D4AE-4BFA-8936-11B3ECD60B01}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{6EC86F9F-D4AE-4BFA-8936-11B3ECD60B01}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{6EC86F9F-D4AE-4BFA-8936-11B3ECD60B01}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{6EC86F9F-D4AE-4BFA-8936-11B3ECD60B01}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{6EC86F9F-D4AE-4BFA-8936-11B3ECD60B01}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{6EC86F9F-D4AE-4BFA-8936-11B3ECD60B01}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{6EC86F9F-D4AE-4BFA-8936-11B3ECD60B01}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{4A678860-F970-4A70-8DD4-857A5A01D254}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{4A678860-F970-4A70-8DD4-857A5A01D254}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{4A678860-F970-4A70-8DD4-857A5A01D254}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{4A678860-F970-4A70-8DD4-857A5A01D254}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{4A678860-F970-4A70-8DD4-857A5A01D254}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{4A678860-F970-4A70-8DD4-857A5A01D254}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{4A678860-F970-4A70-8DD4-857A5A01D254}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{4A678860-F970-4A70-8DD4-857A5A01D254}.Release|iPhone.Build.0 = Release|iPhone
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
StartupItem = CoreLocation\CoreLocation.csproj
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace CoreLocation
|
||||
{
|
||||
// The UIApplicationDelegate for the application. This class is responsible for launching the
|
||||
// User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
|
||||
[Register("AppDelegate")]
|
||||
public class AppDelegate : UIApplicationDelegate
|
||||
{
|
||||
public override UIWindow Window { get; set; }
|
||||
|
||||
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
|
||||
{
|
||||
// Override point for customization after application launch.
|
||||
// If not required for your application you can safely delete this method
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,244 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"size": "20x20",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"size": "20x20",
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "icon-spotlight-29@2x.png",
|
||||
"size": "29x29",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "icon-spotlight-29@3x.png",
|
||||
"size": "29x29",
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "icon-spotlight-40@2x.png",
|
||||
"size": "40x40",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "icon-spotlight-40@3x.png",
|
||||
"size": "40x40",
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "icon-app-60@2x.png",
|
||||
"size": "60x60",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-app-60@3x.png",
|
||||
"size": "60x60",
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"size": "20x20",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"size": "20x20",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "icon-spotlight-29.png",
|
||||
"size": "29x29",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "icon-spotlight-29@2x.png",
|
||||
"size": "29x29",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"size": "40x40",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "icon-spotlight-40@2x.png",
|
||||
"size": "40x40",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-app-83.5@2x.png",
|
||||
"size": "83.5x83.5",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "icon-app-76.png",
|
||||
"size": "76x76",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "icon-app-76@2x.png",
|
||||
"size": "76x76",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "app-store-logo.png",
|
||||
"size": "1024x1024",
|
||||
"scale": "1x",
|
||||
"idiom": "ios-marketing"
|
||||
},
|
||||
{
|
||||
"size": "60x60",
|
||||
"scale": "2x",
|
||||
"idiom": "car"
|
||||
},
|
||||
{
|
||||
"size": "60x60",
|
||||
"scale": "3x",
|
||||
"idiom": "car"
|
||||
},
|
||||
{
|
||||
"role": "notificationCenter",
|
||||
"size": "24x24",
|
||||
"subtype": "38mm",
|
||||
"scale": "2x",
|
||||
"idiom": "watch"
|
||||
},
|
||||
{
|
||||
"role": "notificationCenter",
|
||||
"size": "27.5x27.5",
|
||||
"subtype": "42mm",
|
||||
"scale": "2x",
|
||||
"idiom": "watch"
|
||||
},
|
||||
{
|
||||
"role": "companionSettings",
|
||||
"size": "29x29",
|
||||
"scale": "2x",
|
||||
"idiom": "watch"
|
||||
},
|
||||
{
|
||||
"role": "companionSettings",
|
||||
"size": "29x29",
|
||||
"scale": "3x",
|
||||
"idiom": "watch"
|
||||
},
|
||||
{
|
||||
"role": "appLauncher",
|
||||
"size": "40x40",
|
||||
"subtype": "38mm",
|
||||
"scale": "2x",
|
||||
"idiom": "watch"
|
||||
},
|
||||
{
|
||||
"role": "appLauncher",
|
||||
"size": "44x44",
|
||||
"subtype": "40mm",
|
||||
"scale": "2x",
|
||||
"idiom": "watch"
|
||||
},
|
||||
{
|
||||
"role": "appLauncher",
|
||||
"size": "50x50",
|
||||
"subtype": "44mm",
|
||||
"scale": "2x",
|
||||
"idiom": "watch"
|
||||
},
|
||||
{
|
||||
"role": "quickLook",
|
||||
"size": "86x86",
|
||||
"subtype": "38mm",
|
||||
"scale": "2x",
|
||||
"idiom": "watch"
|
||||
},
|
||||
{
|
||||
"role": "quickLook",
|
||||
"size": "98x98",
|
||||
"subtype": "42mm",
|
||||
"scale": "2x",
|
||||
"idiom": "watch"
|
||||
},
|
||||
{
|
||||
"role": "quickLook",
|
||||
"size": "108x108",
|
||||
"subtype": "44mm",
|
||||
"scale": "2x",
|
||||
"idiom": "watch"
|
||||
},
|
||||
{
|
||||
"size": "1024x1024",
|
||||
"scale": "1x",
|
||||
"idiom": "watch-marketing"
|
||||
},
|
||||
{
|
||||
"size": "16x16",
|
||||
"scale": "1x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"size": "16x16",
|
||||
"scale": "2x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"size": "32x32",
|
||||
"scale": "1x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"size": "32x32",
|
||||
"scale": "2x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"size": "128x128",
|
||||
"scale": "1x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"size": "128x128",
|
||||
"scale": "2x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"size": "256x256",
|
||||
"scale": "1x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"size": "256x256",
|
||||
"scale": "2x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"size": "512x512",
|
||||
"scale": "1x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"size": "512x512",
|
||||
"scale": "2x",
|
||||
"idiom": "mac"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
Двоичные данные
CoreLocation/CoreLocation/Assets.xcassets/AppIcon.appiconset/Icon-app-60@3x.png
Normal file
После Ширина: | Высота: | Размер: 5.0 KiB |
Двоичные данные
CoreLocation/CoreLocation/Assets.xcassets/AppIcon.appiconset/Icon-app-83.5@2x.png
Normal file
После Ширина: | Высота: | Размер: 8.6 KiB |
Двоичные данные
CoreLocation/CoreLocation/Assets.xcassets/AppIcon.appiconset/app-store-logo.png
Normal file
После Ширина: | Высота: | Размер: 22 KiB |
Двоичные данные
CoreLocation/CoreLocation/Assets.xcassets/AppIcon.appiconset/icon-app-60@2x.png
Normal file
После Ширина: | Высота: | Размер: 3.3 KiB |
Двоичные данные
CoreLocation/CoreLocation/Assets.xcassets/AppIcon.appiconset/icon-app-76.png
Normal file
После Ширина: | Высота: | Размер: 2.0 KiB |
Двоичные данные
CoreLocation/CoreLocation/Assets.xcassets/AppIcon.appiconset/icon-app-76@2x.png
Normal file
После Ширина: | Высота: | Размер: 4.3 KiB |
Двоичные данные
CoreLocation/CoreLocation/Assets.xcassets/AppIcon.appiconset/icon-spotlight-29.png
Normal file
После Ширина: | Высота: | Размер: 900 B |
Двоичные данные
CoreLocation/CoreLocation/Assets.xcassets/AppIcon.appiconset/icon-spotlight-29@2x.png
Normal file
После Ширина: | Высота: | Размер: 1.8 KiB |
Двоичные данные
CoreLocation/CoreLocation/Assets.xcassets/AppIcon.appiconset/icon-spotlight-29@3x.png
Normal file
После Ширина: | Высота: | Размер: 2.5 KiB |
Двоичные данные
CoreLocation/CoreLocation/Assets.xcassets/AppIcon.appiconset/icon-spotlight-40@2x.png
Normal file
После Ширина: | Высота: | Размер: 2.2 KiB |
Двоичные данные
CoreLocation/CoreLocation/Assets.xcassets/AppIcon.appiconset/icon-spotlight-40@3x.png
Normal file
После Ширина: | Высота: | Размер: 3.3 KiB |
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{4A678860-F970-4A70-8DD4-857A5A01D254}</ProjectGuid>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>CoreLocation</RootNamespace>
|
||||
<AssemblyName>CoreLocation</AssemblyName>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;ENABLE_TEST_CLOUD;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
|
||||
<MtouchFastDev>true</MtouchFastDev>
|
||||
<IOSDebuggerPort>58304</IOSDebuggerPort>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
||||
<DeviceSpecificBuild>false</DeviceSpecificBuild>
|
||||
<MtouchVerbosity></MtouchVerbosity>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<DefineConstants></DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchUseLlvm>true</MtouchUseLlvm>
|
||||
<MtouchFloat32>true</MtouchFloat32>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchLink>SdkOnly</MtouchLink>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
||||
<MtouchVerbosity></MtouchVerbosity>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<DefineConstants></DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
||||
<MtouchVerbosity></MtouchVerbosity>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;ENABLE_TEST_CLOUD;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<DeviceSpecificBuild>true</DeviceSpecificBuild>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
|
||||
<MtouchFastDev>true</MtouchFastDev>
|
||||
<MtouchFloat32>true</MtouchFloat32>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<IOSDebuggerPort>39389</IOSDebuggerPort>
|
||||
<MtouchLink>SdkOnly</MtouchLink>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
||||
<MtouchVerbosity></MtouchVerbosity>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\app-store-logo.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-app-83.5%402x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\icon-app-76%402x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\icon-app-76.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\icon-spotlight-29%402x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\icon-spotlight-29.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\icon-spotlight-29%403x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\icon-app-60%402x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-app-60%403x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\icon-spotlight-40%402x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\icon-spotlight-40%403x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InterfaceDefinition Include="LaunchScreen.storyboard" />
|
||||
<InterfaceDefinition Include="Main.storyboard" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
<None Include="Entitlements.plist" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<Compile Include="ViewController.cs" />
|
||||
<Compile Include="ViewController.designer.cs">
|
||||
<DependentUpon>ViewController.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,25 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<key>CFBundleName</key>
|
||||
<string>Core Location</string>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>Resources/icon-57.png</string>
|
||||
<string>Resources/icon-114.png</string>
|
||||
<string>Resources/icon-72.png</string>
|
||||
<string>Resources/icon-144.png</string>
|
||||
<string>Resources/icon-29.png</string>
|
||||
<string>Resources/icon-58.png</string>
|
||||
<string>Resources/icon-50.png</string>
|
||||
<string>Resources/icon-100.png</string>
|
||||
<string>Icon-76</string>
|
||||
<string>Icon-76@2x</string>
|
||||
<string>Icon-Small-40@2x</string>
|
||||
<string>Icon-Small-40</string>
|
||||
<string>Icon-60@2x</string>
|
||||
</array>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.xamarin.core-location</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
|
@ -27,23 +19,23 @@
|
|||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/AppIcon.appiconset</string>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string>Getting location for sample application</string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.xamarin.CoreLocation</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Xamarin" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3GG-Gl-QcE">
|
||||
<rect key="frame" x="117" y="320" width="142" height="48"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="40"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="3GG-Gl-QcE" firstAttribute="centerX" secondItem="e3u-ge-9jA" secondAttribute="centerX" id="9Y6-xC-RfN"/>
|
||||
<constraint firstItem="3GG-Gl-QcE" firstAttribute="centerY" secondItem="e3u-ge-9jA" secondAttribute="centerY" id="Ust-q9-8Ea"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="e3u-ge-9jA"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -0,0 +1,15 @@
|
|||
using UIKit;
|
||||
|
||||
namespace CoreLocation
|
||||
{
|
||||
public class Application
|
||||
{
|
||||
// This is the main entry point of the application.
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// if you want to use a different Application Delegate class from "AppDelegate"
|
||||
// you can specify it here.
|
||||
UIApplication.Main(args, null, "AppDelegate");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,195 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Location:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YNO-A3-Rgj">
|
||||
<rect key="frame" x="16" y="36" width="96" height="29"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="24"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Latitude:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yv9-C7-bHG">
|
||||
<rect key="frame" x="44" y="71" width="68" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="[lat]" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9d9-vZ-OLH">
|
||||
<rect key="frame" x="120" y="71" width="31" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="[alt]" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wdV-NP-Jbf">
|
||||
<rect key="frame" x="120" y="125" width="31" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="[course]" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Iv6-bf-9ej">
|
||||
<rect key="frame" x="120" y="154" width="64.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="[speed]" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U3Q-wJ-2ls">
|
||||
<rect key="frame" x="120" y="182" width="59.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="[mag head]" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="61b-cV-Rf9">
|
||||
<rect key="frame" x="149.5" y="261" width="88.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="[lon]" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TWx-xg-xSt">
|
||||
<rect key="frame" x="120" y="97" width="35.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="[distance]" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ewL-Lz-Cpg">
|
||||
<rect key="frame" x="16" y="391.5" width="77.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Paris (lat 48.857, long 2.351):" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xNc-11-vNQ">
|
||||
<rect key="frame" x="16" y="363" width="222.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Longitude:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DOv-hV-g61">
|
||||
<rect key="frame" x="31" y="97" width="81.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Altitude:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xgx-ZG-be6">
|
||||
<rect key="frame" x="48" y="125" width="64" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Course:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aeU-DY-2Bc">
|
||||
<rect key="frame" x="53" y="154" width="59.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Speed:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ecW-8b-BUK">
|
||||
<rect key="frame" x="58" y="182" width="54" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Heading:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NiX-tM-sHA">
|
||||
<rect key="frame" x="16" y="224" width="94.5" height="29"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="24"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Distance To:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ifK-Bv-w1g">
|
||||
<rect key="frame" x="16" y="326" width="127.5" height="29"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="24"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="[true head]" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Azi-E2-s49">
|
||||
<rect key="frame" x="149.5" y="289.5" width="85.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mag. Heading:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="erx-5b-eJR">
|
||||
<rect key="frame" x="30" y="261" width="111.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="True Heading:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jO2-6B-Doj">
|
||||
<rect key="frame" x="34" y="289.5" width="107.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="DOv-hV-g61" firstAttribute="trailing" secondItem="Yv9-C7-bHG" secondAttribute="trailing" id="23S-rd-An3"/>
|
||||
<constraint firstItem="9d9-vZ-OLH" firstAttribute="leading" secondItem="Yv9-C7-bHG" secondAttribute="trailing" constant="8" symbolic="YES" id="4rS-sF-CMt"/>
|
||||
<constraint firstItem="Iv6-bf-9ej" firstAttribute="centerY" secondItem="aeU-DY-2Bc" secondAttribute="centerY" id="6Ws-Bh-hrn"/>
|
||||
<constraint firstItem="U3Q-wJ-2ls" firstAttribute="leading" secondItem="ecW-8b-BUK" secondAttribute="trailing" constant="8" symbolic="YES" id="BrE-vJ-PLZ"/>
|
||||
<constraint firstItem="61b-cV-Rf9" firstAttribute="centerY" secondItem="erx-5b-eJR" secondAttribute="centerY" id="CYl-8K-RUP"/>
|
||||
<constraint firstItem="jO2-6B-Doj" firstAttribute="top" secondItem="erx-5b-eJR" secondAttribute="bottom" constant="8" id="Dr0-A1-glc"/>
|
||||
<constraint firstItem="aeU-DY-2Bc" firstAttribute="trailing" secondItem="xgx-ZG-be6" secondAttribute="trailing" id="ELP-z8-ahp"/>
|
||||
<constraint firstItem="Yv9-C7-bHG" firstAttribute="trailing" secondItem="YNO-A3-Rgj" secondAttribute="trailing" id="GIc-5q-DUY"/>
|
||||
<constraint firstItem="U3Q-wJ-2ls" firstAttribute="centerY" secondItem="ecW-8b-BUK" secondAttribute="centerY" id="IBV-Ak-BeF"/>
|
||||
<constraint firstItem="aeU-DY-2Bc" firstAttribute="top" secondItem="xgx-ZG-be6" secondAttribute="bottom" constant="8" id="JVd-dY-pE3"/>
|
||||
<constraint firstItem="ecW-8b-BUK" firstAttribute="trailing" secondItem="aeU-DY-2Bc" secondAttribute="trailing" id="JWT-Mc-toC"/>
|
||||
<constraint firstItem="ecW-8b-BUK" firstAttribute="top" secondItem="aeU-DY-2Bc" secondAttribute="bottom" constant="8" id="Luf-s4-gz0"/>
|
||||
<constraint firstItem="jO2-6B-Doj" firstAttribute="trailing" secondItem="erx-5b-eJR" secondAttribute="trailing" id="MCx-0K-y3Q"/>
|
||||
<constraint firstItem="YNO-A3-Rgj" firstAttribute="top" secondItem="N28-SV-lre" secondAttribute="top" constant="16" id="QFZ-Hb-LWs"/>
|
||||
<constraint firstItem="Iv6-bf-9ej" firstAttribute="leading" secondItem="aeU-DY-2Bc" secondAttribute="trailing" constant="8" symbolic="YES" id="TtA-hY-2n7"/>
|
||||
<constraint firstItem="9d9-vZ-OLH" firstAttribute="centerY" secondItem="Yv9-C7-bHG" secondAttribute="centerY" id="V6v-zu-Ng9"/>
|
||||
<constraint firstItem="erx-5b-eJR" firstAttribute="top" secondItem="NiX-tM-sHA" secondAttribute="bottom" constant="8" id="X2G-oo-Ejq"/>
|
||||
<constraint firstItem="wdV-NP-Jbf" firstAttribute="leading" secondItem="xgx-ZG-be6" secondAttribute="trailing" constant="8" symbolic="YES" id="X3S-OL-bds"/>
|
||||
<constraint firstItem="ewL-Lz-Cpg" firstAttribute="leading" secondItem="N28-SV-lre" secondAttribute="leading" constant="16" id="YHe-my-8Kw"/>
|
||||
<constraint firstItem="Azi-E2-s49" firstAttribute="leading" secondItem="jO2-6B-Doj" secondAttribute="trailing" constant="8" symbolic="YES" id="baW-x6-641"/>
|
||||
<constraint firstItem="NiX-tM-sHA" firstAttribute="top" secondItem="ecW-8b-BUK" secondAttribute="bottom" constant="16" id="c68-7w-yjh"/>
|
||||
<constraint firstItem="61b-cV-Rf9" firstAttribute="leading" secondItem="erx-5b-eJR" secondAttribute="trailing" constant="8" symbolic="YES" id="fJH-z2-BfS"/>
|
||||
<constraint firstItem="ifK-Bv-w1g" firstAttribute="top" secondItem="jO2-6B-Doj" secondAttribute="bottom" constant="16" id="fOI-75-qDo"/>
|
||||
<constraint firstItem="erx-5b-eJR" firstAttribute="leading" secondItem="N28-SV-lre" secondAttribute="leading" constant="30" id="h4M-HV-IFi"/>
|
||||
<constraint firstItem="Yv9-C7-bHG" firstAttribute="top" secondItem="YNO-A3-Rgj" secondAttribute="bottom" constant="8" id="hBU-gg-3pI"/>
|
||||
<constraint firstItem="YNO-A3-Rgj" firstAttribute="leading" secondItem="N28-SV-lre" secondAttribute="leading" constant="16" id="hSz-x2-Ou1"/>
|
||||
<constraint firstItem="NiX-tM-sHA" firstAttribute="leading" secondItem="N28-SV-lre" secondAttribute="leading" constant="16" id="i18-Xu-Cyn"/>
|
||||
<constraint firstItem="ifK-Bv-w1g" firstAttribute="leading" secondItem="N28-SV-lre" secondAttribute="leading" constant="16" id="iLK-V6-vPz"/>
|
||||
<constraint firstItem="xgx-ZG-be6" firstAttribute="top" secondItem="DOv-hV-g61" secondAttribute="bottom" constant="8" id="irJ-Z1-VUu"/>
|
||||
<constraint firstItem="xNc-11-vNQ" firstAttribute="leading" secondItem="N28-SV-lre" secondAttribute="leading" constant="16" id="kiw-rm-w3D"/>
|
||||
<constraint firstItem="wdV-NP-Jbf" firstAttribute="centerY" secondItem="xgx-ZG-be6" secondAttribute="centerY" id="omX-Wr-zJv"/>
|
||||
<constraint firstItem="Azi-E2-s49" firstAttribute="centerY" secondItem="jO2-6B-Doj" secondAttribute="centerY" id="p41-yF-ErG"/>
|
||||
<constraint firstItem="DOv-hV-g61" firstAttribute="top" secondItem="Yv9-C7-bHG" secondAttribute="bottom" constant="8" id="qRT-Kl-xMv"/>
|
||||
<constraint firstItem="xgx-ZG-be6" firstAttribute="trailing" secondItem="DOv-hV-g61" secondAttribute="trailing" id="ufz-cS-niX"/>
|
||||
<constraint firstItem="ewL-Lz-Cpg" firstAttribute="top" secondItem="xNc-11-vNQ" secondAttribute="bottom" constant="8" id="v8s-K0-02a"/>
|
||||
<constraint firstItem="xNc-11-vNQ" firstAttribute="top" secondItem="ifK-Bv-w1g" secondAttribute="bottom" constant="8" id="w2I-Ic-sEN"/>
|
||||
<constraint firstItem="TWx-xg-xSt" firstAttribute="centerY" secondItem="DOv-hV-g61" secondAttribute="centerY" id="z7d-7y-Il3"/>
|
||||
<constraint firstItem="TWx-xg-xSt" firstAttribute="leading" secondItem="DOv-hV-g61" secondAttribute="trailing" constant="8" symbolic="YES" id="zZF-cv-LlQ"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="N28-SV-lre"/>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="altitudeLabel" destination="wdV-NP-Jbf" id="name-outlet-wdV-NP-Jbf"/>
|
||||
<outlet property="courseLabel" destination="Iv6-bf-9ej" id="name-outlet-Iv6-bf-9ej"/>
|
||||
<outlet property="distanceLabel" destination="ewL-Lz-Cpg" id="name-outlet-ewL-Lz-Cpg"/>
|
||||
<outlet property="latitudeLabel" destination="9d9-vZ-OLH" id="name-outlet-9d9-vZ-OLH"/>
|
||||
<outlet property="longitudeLabel" destination="TWx-xg-xSt" id="name-outlet-TWx-xg-xSt"/>
|
||||
<outlet property="magneticHeadingLabel" destination="61b-cV-Rf9" id="name-outlet-61b-cV-Rf9"/>
|
||||
<outlet property="speedLabel" destination="U3Q-wJ-2ls" id="name-outlet-U3Q-wJ-2ls"/>
|
||||
<outlet property="trueHeadingLabel" destination="Azi-E2-s49" id="name-outlet-Azi-E2-s49"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="0.0" y="0.0"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -0,0 +1,69 @@
|
|||
using Foundation;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UIKit;
|
||||
|
||||
namespace CoreLocation
|
||||
{
|
||||
public partial class ViewController : UIViewController, ICLLocationManagerDelegate
|
||||
{
|
||||
private readonly CLLocationManager locationManager = new CLLocationManager();
|
||||
|
||||
protected ViewController(IntPtr handle) : base(handle) { }
|
||||
|
||||
public override void ViewDidLoad()
|
||||
{
|
||||
base.ViewDidLoad();
|
||||
|
||||
// you can set the update threshold and accuracy if you want:
|
||||
//locationManager.DistanceFilter = 10d; // move ten meters before updating
|
||||
//locationManager.HeadingFilter = 3d; // move 3 degrees before updating
|
||||
|
||||
// you can also set the desired accuracy:
|
||||
locationManager.DesiredAccuracy = 1000; // 1000 meters/1 kilometer
|
||||
// you can also use presets, which simply evalute to a double value:
|
||||
//locationManager.DesiredAccuracy = CLLocation.AccuracyNearestTenMeters;
|
||||
|
||||
locationManager.Delegate = this;
|
||||
locationManager.RequestWhenInUseAuthorization();
|
||||
|
||||
if (CLLocationManager.LocationServicesEnabled)
|
||||
{
|
||||
locationManager.StartUpdatingLocation();
|
||||
}
|
||||
|
||||
if (CLLocationManager.HeadingAvailable)
|
||||
{
|
||||
locationManager.StartUpdatingHeading();
|
||||
}
|
||||
}
|
||||
|
||||
#region ICLLocationManagerDelegate
|
||||
|
||||
[Export("locationManager:didUpdateHeading:")]
|
||||
public void UpdatedHeading(CLLocationManager manager, CLHeading newHeading)
|
||||
{
|
||||
trueHeadingLabel.Text = $"{newHeading.TrueHeading}º";
|
||||
magneticHeadingLabel.Text = $"{newHeading.MagneticHeading}º";
|
||||
}
|
||||
|
||||
[Export("locationManager:didUpdateLocations:")]
|
||||
public void LocationsUpdated(CLLocationManager manager, CLLocation[] locations)
|
||||
{
|
||||
var location = locations.LastOrDefault();
|
||||
if (location != null)
|
||||
{
|
||||
altitudeLabel.Text = $"{location.Altitude} meters";
|
||||
longitudeLabel.Text = $"{location.Coordinate.Longitude}º";
|
||||
latitudeLabel.Text = $"{location.Coordinate.Latitude}º";
|
||||
courseLabel.Text = $"{location.Course}º";
|
||||
speedLabel.Text = $"{location.Speed} meters/s";
|
||||
|
||||
// get the distance from here to paris
|
||||
distanceLabel.Text = $"{location.DistanceFrom(new CLLocation(48.857, 2.351)) / 1000} km";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
// WARNING
|
||||
//
|
||||
// This file has been generated automatically by Visual Studio from the outlets and
|
||||
// actions declared in your storyboard file.
|
||||
// Manual changes to this file will not be maintained.
|
||||
//
|
||||
using Foundation;
|
||||
using System;
|
||||
using System.CodeDom.Compiler;
|
||||
|
||||
namespace CoreLocation
|
||||
{
|
||||
[Register ("ViewController")]
|
||||
partial class ViewController
|
||||
{
|
||||
[Outlet]
|
||||
[GeneratedCode ("iOS Designer", "1.0")]
|
||||
UIKit.UILabel altitudeLabel { get; set; }
|
||||
|
||||
[Outlet]
|
||||
[GeneratedCode ("iOS Designer", "1.0")]
|
||||
UIKit.UILabel courseLabel { get; set; }
|
||||
|
||||
[Outlet]
|
||||
[GeneratedCode ("iOS Designer", "1.0")]
|
||||
UIKit.UILabel distanceLabel { get; set; }
|
||||
|
||||
[Outlet]
|
||||
[GeneratedCode ("iOS Designer", "1.0")]
|
||||
UIKit.UILabel latitudeLabel { get; set; }
|
||||
|
||||
[Outlet]
|
||||
[GeneratedCode ("iOS Designer", "1.0")]
|
||||
UIKit.UILabel longitudeLabel { get; set; }
|
||||
|
||||
[Outlet]
|
||||
[GeneratedCode ("iOS Designer", "1.0")]
|
||||
UIKit.UILabel magneticHeadingLabel { get; set; }
|
||||
|
||||
[Outlet]
|
||||
[GeneratedCode ("iOS Designer", "1.0")]
|
||||
UIKit.UILabel speedLabel { get; set; }
|
||||
|
||||
[Outlet]
|
||||
[GeneratedCode ("iOS Designer", "1.0")]
|
||||
UIKit.UILabel trueHeadingLabel { get; set; }
|
||||
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
if (altitudeLabel != null) {
|
||||
altitudeLabel.Dispose ();
|
||||
altitudeLabel = null;
|
||||
}
|
||||
|
||||
if (courseLabel != null) {
|
||||
courseLabel.Dispose ();
|
||||
courseLabel = null;
|
||||
}
|
||||
|
||||
if (distanceLabel != null) {
|
||||
distanceLabel.Dispose ();
|
||||
distanceLabel = null;
|
||||
}
|
||||
|
||||
if (latitudeLabel != null) {
|
||||
latitudeLabel.Dispose ();
|
||||
latitudeLabel = null;
|
||||
}
|
||||
|
||||
if (longitudeLabel != null) {
|
||||
longitudeLabel.Dispose ();
|
||||
longitudeLabel = null;
|
||||
}
|
||||
|
||||
if (magneticHeadingLabel != null) {
|
||||
magneticHeadingLabel.Dispose ();
|
||||
magneticHeadingLabel = null;
|
||||
}
|
||||
|
||||
if (speedLabel != null) {
|
||||
speedLabel.Dispose ();
|
||||
speedLabel = null;
|
||||
}
|
||||
|
||||
if (trueHeadingLabel != null) {
|
||||
trueHeadingLabel.Dispose ();
|
||||
trueHeadingLabel = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
using System;
|
||||
using UIKit;
|
||||
|
||||
namespace Example_CoreLocation
|
||||
{
|
||||
/// <summary>
|
||||
/// This interface is so we can use a different xib for iPhone and iPad from the same code.
|
||||
/// </summary>
|
||||
public interface IMainScreen
|
||||
{
|
||||
UILabel LblAltitude { get; }
|
||||
UILabel LblLatitude { get; }
|
||||
UILabel LblLongitude { get; }
|
||||
UILabel LblCourse { get; }
|
||||
UILabel LblMagneticHeading { get; }
|
||||
UILabel LblSpeed { get; }
|
||||
UILabel LblTrueHeading { get; }
|
||||
UILabel LblDistanceToParis { get; }
|
||||
}
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
using System;
|
||||
using UIKit;
|
||||
using Foundation;
|
||||
using CoreLocation;
|
||||
using Example_CoreLocation.MainScreen;
|
||||
|
||||
namespace Example_CoreLocation
|
||||
{
|
||||
public class MainViewController : UIViewController
|
||||
{
|
||||
#region -= declarations =-
|
||||
|
||||
MainViewController_iPhone mainViewController_iPhone;
|
||||
MainViewController_iPad mainViewController_iPad;
|
||||
|
||||
IMainScreen mainScreen = null;
|
||||
|
||||
// location stuff
|
||||
CLLocationManager iPhoneLocationManager = null;
|
||||
// uncomment this if you want to use the delegate pattern
|
||||
//LocationDelegate locationDelegate = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region -= constructors =-
|
||||
//
|
||||
// Constructor invoked from the NIB loader
|
||||
//
|
||||
public MainViewController (IntPtr p) : base(p)
|
||||
{
|
||||
}
|
||||
|
||||
public MainViewController () : base()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void ViewDidLoad ()
|
||||
{
|
||||
// all your base
|
||||
base.ViewDidLoad ();
|
||||
|
||||
// load the appropriate view, based on the device type
|
||||
this.LoadViewForDevice ();
|
||||
|
||||
// initialize our location manager and callback handler
|
||||
iPhoneLocationManager = new CLLocationManager ();
|
||||
|
||||
// uncomment this if you want to use the delegate pattern:
|
||||
//locationDelegate = new LocationDelegate (mainScreen);
|
||||
//iPhoneLocationManager.Delegate = locationDelegate;
|
||||
|
||||
// you can set the update threshold and accuracy if you want:
|
||||
//iPhoneLocationManager.DistanceFilter = 10; // move ten meters before updating
|
||||
//iPhoneLocationManager.HeadingFilter = 3; // move 3 degrees before updating
|
||||
|
||||
// you can also set the desired accuracy:
|
||||
iPhoneLocationManager.DesiredAccuracy = 1000; // 1000 meters/1 kilometer
|
||||
// you can also use presets, which simply evalute to a double value:
|
||||
//iPhoneLocationManager.DesiredAccuracy = CLLocation.AccuracyNearestTenMeters;
|
||||
|
||||
// handle the updated location method and update the UI
|
||||
if (UIDevice.CurrentDevice.CheckSystemVersion (6, 0)) {
|
||||
iPhoneLocationManager.LocationsUpdated += (object sender, CLLocationsUpdatedEventArgs e) => {
|
||||
UpdateLocation (mainScreen, e.Locations [e.Locations.Length - 1]);
|
||||
};
|
||||
} else {
|
||||
#pragma warning disable 618
|
||||
// this won't be called on iOS 6 (deprecated)
|
||||
iPhoneLocationManager.UpdatedLocation += (object sender, CLLocationUpdatedEventArgs e) => {
|
||||
UpdateLocation (mainScreen, e.NewLocation);
|
||||
};
|
||||
#pragma warning restore 618
|
||||
}
|
||||
|
||||
//iOS 8 requires you to manually request authorization now - Note the Info.plist file has a new key called requestWhenInUseAuthorization added to.
|
||||
if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
|
||||
{
|
||||
iPhoneLocationManager.RequestWhenInUseAuthorization();
|
||||
}
|
||||
|
||||
// handle the updated heading method and update the UI
|
||||
iPhoneLocationManager.UpdatedHeading += (object sender, CLHeadingUpdatedEventArgs e) => {
|
||||
mainScreen.LblMagneticHeading.Text = e.NewHeading.MagneticHeading.ToString () + "º";
|
||||
mainScreen.LblTrueHeading.Text = e.NewHeading.TrueHeading.ToString () + "º";
|
||||
};
|
||||
|
||||
// start updating our location, et. al.
|
||||
if (CLLocationManager.LocationServicesEnabled)
|
||||
iPhoneLocationManager.StartUpdatingLocation ();
|
||||
if (CLLocationManager.HeadingAvailable)
|
||||
iPhoneLocationManager.StartUpdatingHeading ();
|
||||
}
|
||||
|
||||
static public void UpdateLocation (IMainScreen ms, CLLocation newLocation)
|
||||
{
|
||||
ms.LblAltitude.Text = newLocation.Altitude.ToString () + " meters";
|
||||
ms.LblLongitude.Text = newLocation.Coordinate.Longitude.ToString () + "º";
|
||||
ms.LblLatitude.Text = newLocation.Coordinate.Latitude.ToString () + "º";
|
||||
ms.LblCourse.Text = newLocation.Course.ToString () + "º";
|
||||
ms.LblSpeed.Text = newLocation.Speed.ToString () + " meters/s";
|
||||
|
||||
// get the distance from here to paris
|
||||
ms.LblDistanceToParis.Text = (newLocation.DistanceFrom(new CLLocation(48.857, 2.351)) / 1000).ToString() + " km";
|
||||
}
|
||||
|
||||
#region -= protected methods =-
|
||||
|
||||
// Loads either the iPad or iPhone view, based on the current device
|
||||
protected void LoadViewForDevice()
|
||||
{
|
||||
// load the appropriate view based on the device
|
||||
if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) {
|
||||
mainViewController_iPad = new MainViewController_iPad ();
|
||||
this.View.AddSubview (mainViewController_iPad.View);
|
||||
mainScreen = mainViewController_iPad as IMainScreen;
|
||||
} else {
|
||||
mainViewController_iPhone = new MainViewController_iPhone ();
|
||||
var b = this.View.Bounds;
|
||||
this.View.AddSubview (mainViewController_iPhone.View);
|
||||
mainViewController_iPhone.View.Frame = b; // for 4 inch iPhone5 screen
|
||||
mainScreen = mainViewController_iPhone as IMainScreen;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// If you don't want to use events, you could define a delegate to do the
|
||||
// updates as well, as shown here.
|
||||
public class LocationDelegate : CLLocationManagerDelegate
|
||||
{
|
||||
IMainScreen ms;
|
||||
|
||||
public LocationDelegate (IMainScreen mainScreen) : base()
|
||||
{
|
||||
ms = mainScreen;
|
||||
}
|
||||
|
||||
// called for iOS6 and later
|
||||
public override void LocationsUpdated (CLLocationManager manager, CLLocation[] locations)
|
||||
{
|
||||
MainViewController.UpdateLocation (ms, locations [locations.Length - 1]);
|
||||
}
|
||||
|
||||
public override void UpdatedHeading (CLLocationManager manager, CLHeading newHeading)
|
||||
{
|
||||
ms.LblMagneticHeading.Text = newHeading.MagneticHeading.ToString () + "º";
|
||||
ms.LblTrueHeading.Text = newHeading.TrueHeading.ToString () + "º";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,173 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES">
|
||||
<device id="ipad9_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MainViewController_iPad">
|
||||
<connections>
|
||||
<outlet property="lblAltitude" destination="14" id="24"/>
|
||||
<outlet property="lblCourse" destination="15" id="25"/>
|
||||
<outlet property="lblDistanceToParis" destination="33" id="34"/>
|
||||
<outlet property="lblLatitude" destination="12" id="26"/>
|
||||
<outlet property="lblLongitude" destination="13" id="27"/>
|
||||
<outlet property="lblMagneticHeading" destination="19" id="28"/>
|
||||
<outlet property="lblSpeed" destination="17" id="29"/>
|
||||
<outlet property="lblTrueHeading" destination="21" id="30"/>
|
||||
<outlet property="view" destination="1" id="7"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Latitude:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="8">
|
||||
<rect key="frame" x="76" y="57" width="66" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Longitude:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="9">
|
||||
<rect key="frame" x="308" y="57" width="80" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Course:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="10">
|
||||
<rect key="frame" x="276" y="86" width="112" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Altitude:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="11">
|
||||
<rect key="frame" x="80" y="86" width="62" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[lat]" lineBreakMode="tailTruncation" minimumFontSize="10" id="12">
|
||||
<rect key="frame" x="150" y="57" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[lon]" lineBreakMode="tailTruncation" minimumFontSize="10" id="13">
|
||||
<rect key="frame" x="396" y="57" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[alt]" lineBreakMode="tailTruncation" minimumFontSize="10" id="14">
|
||||
<rect key="frame" x="150" y="86" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[course]" lineBreakMode="tailTruncation" minimumFontSize="10" id="15">
|
||||
<rect key="frame" x="396" y="86" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Speed:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="16">
|
||||
<rect key="frame" x="30" y="115" width="112" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[speed]" lineBreakMode="tailTruncation" minimumFontSize="10" id="17">
|
||||
<rect key="frame" x="150" y="115" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Mag. Heading:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="18">
|
||||
<rect key="frame" x="30" y="196" width="112" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[mag head]" lineBreakMode="tailTruncation" minimumFontSize="10" id="19">
|
||||
<rect key="frame" x="150" y="196" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Paris (lat 48.857, long 2.351):" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="32">
|
||||
<rect key="frame" x="30" y="283" width="226" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[distance to paris]" lineBreakMode="tailTruncation" minimumFontSize="10" id="33">
|
||||
<rect key="frame" x="264" y="283" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="True Heading:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="20">
|
||||
<rect key="frame" x="308" y="196" width="112" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[true head]" lineBreakMode="tailTruncation" minimumFontSize="10" id="21">
|
||||
<rect key="frame" x="428" y="196" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Location:" lineBreakMode="tailTruncation" minimumFontSize="10" id="22">
|
||||
<rect key="frame" x="20" y="20" width="107" height="31"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="24"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Distance To:" lineBreakMode="tailTruncation" minimumFontSize="10" id="31">
|
||||
<rect key="frame" x="20" y="244" width="144" height="31"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="24"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Heading:" lineBreakMode="tailTruncation" minimumFontSize="10" id="23">
|
||||
<rect key="frame" x="20" y="159" width="109" height="31"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="24"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<metadata/>
|
||||
</view>
|
||||
</objects>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
|
@ -1,73 +0,0 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace Example_CoreLocation.MainScreen
|
||||
{
|
||||
public partial class MainViewController_iPad : UIViewController, IMainScreen
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
// The IntPtr and initWithCoder constructors are required for controllers that need
|
||||
// to be able to be created from a xib rather than from managed code
|
||||
|
||||
public MainViewController_iPad (IntPtr handle) : base(handle)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
[Export("initWithCoder:")]
|
||||
public MainViewController_iPad (NSCoder coder) : base(coder)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
public MainViewController_iPad () : base("MainViewController_iPad", null)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
void Initialize ()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public UILabel LblAltitude
|
||||
{
|
||||
get { return this.lblAltitude; }
|
||||
}
|
||||
public UILabel LblLatitude
|
||||
{
|
||||
get { return this.lblLatitude; }
|
||||
}
|
||||
public UILabel LblLongitude
|
||||
{
|
||||
get { return this.lblLongitude; }
|
||||
}
|
||||
public UILabel LblCourse
|
||||
{
|
||||
get { return this.lblCourse; }
|
||||
}
|
||||
public UILabel LblMagneticHeading
|
||||
{
|
||||
get { return this.lblMagneticHeading; }
|
||||
}
|
||||
public UILabel LblSpeed
|
||||
{
|
||||
get { return this.lblSpeed; }
|
||||
}
|
||||
public UILabel LblTrueHeading
|
||||
{
|
||||
get { return this.lblTrueHeading; }
|
||||
}
|
||||
public UILabel LblDistanceToParis
|
||||
{
|
||||
get { return this.lblDistanceToParis; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,144 +0,0 @@
|
|||
// ------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Mono Runtime Version: 2.0.50727.1433
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
namespace Example_CoreLocation.MainScreen {
|
||||
|
||||
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
|
||||
[Foundation.Register("MainViewController_iPad")]
|
||||
public partial class MainViewController_iPad {
|
||||
|
||||
private UIKit.UIView __mt_view;
|
||||
|
||||
private UIKit.UILabel __mt_lblAltitude;
|
||||
|
||||
private UIKit.UILabel __mt_lblCourse;
|
||||
|
||||
private UIKit.UILabel __mt_lblLatitude;
|
||||
|
||||
private UIKit.UILabel __mt_lblLongitude;
|
||||
|
||||
private UIKit.UILabel __mt_lblMagneticHeading;
|
||||
|
||||
private UIKit.UILabel __mt_lblSpeed;
|
||||
|
||||
private UIKit.UILabel __mt_lblTrueHeading;
|
||||
|
||||
private UIKit.UILabel __mt_lblDistanceToParis;
|
||||
|
||||
#pragma warning disable 0169
|
||||
[Foundation.Connect("view")]
|
||||
private UIKit.UIView view {
|
||||
get {
|
||||
this.__mt_view = ((UIKit.UIView)(this.GetNativeField("view")));
|
||||
return this.__mt_view;
|
||||
}
|
||||
set {
|
||||
this.__mt_view = value;
|
||||
this.SetNativeField("view", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblAltitude")]
|
||||
private UIKit.UILabel lblAltitude {
|
||||
get {
|
||||
this.__mt_lblAltitude = ((UIKit.UILabel)(this.GetNativeField("lblAltitude")));
|
||||
return this.__mt_lblAltitude;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblAltitude = value;
|
||||
this.SetNativeField("lblAltitude", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblCourse")]
|
||||
private UIKit.UILabel lblCourse {
|
||||
get {
|
||||
this.__mt_lblCourse = ((UIKit.UILabel)(this.GetNativeField("lblCourse")));
|
||||
return this.__mt_lblCourse;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblCourse = value;
|
||||
this.SetNativeField("lblCourse", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblLatitude")]
|
||||
private UIKit.UILabel lblLatitude {
|
||||
get {
|
||||
this.__mt_lblLatitude = ((UIKit.UILabel)(this.GetNativeField("lblLatitude")));
|
||||
return this.__mt_lblLatitude;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblLatitude = value;
|
||||
this.SetNativeField("lblLatitude", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblLongitude")]
|
||||
private UIKit.UILabel lblLongitude {
|
||||
get {
|
||||
this.__mt_lblLongitude = ((UIKit.UILabel)(this.GetNativeField("lblLongitude")));
|
||||
return this.__mt_lblLongitude;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblLongitude = value;
|
||||
this.SetNativeField("lblLongitude", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblMagneticHeading")]
|
||||
private UIKit.UILabel lblMagneticHeading {
|
||||
get {
|
||||
this.__mt_lblMagneticHeading = ((UIKit.UILabel)(this.GetNativeField("lblMagneticHeading")));
|
||||
return this.__mt_lblMagneticHeading;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblMagneticHeading = value;
|
||||
this.SetNativeField("lblMagneticHeading", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblSpeed")]
|
||||
private UIKit.UILabel lblSpeed {
|
||||
get {
|
||||
this.__mt_lblSpeed = ((UIKit.UILabel)(this.GetNativeField("lblSpeed")));
|
||||
return this.__mt_lblSpeed;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblSpeed = value;
|
||||
this.SetNativeField("lblSpeed", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblTrueHeading")]
|
||||
private UIKit.UILabel lblTrueHeading {
|
||||
get {
|
||||
this.__mt_lblTrueHeading = ((UIKit.UILabel)(this.GetNativeField("lblTrueHeading")));
|
||||
return this.__mt_lblTrueHeading;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblTrueHeading = value;
|
||||
this.SetNativeField("lblTrueHeading", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblDistanceToParis")]
|
||||
private UIKit.UILabel lblDistanceToParis {
|
||||
get {
|
||||
this.__mt_lblDistanceToParis = ((UIKit.UILabel)(this.GetNativeField("lblDistanceToParis")));
|
||||
return this.__mt_lblDistanceToParis;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblDistanceToParis = value;
|
||||
this.SetNativeField("lblDistanceToParis", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,165 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MainViewController_iPhone">
|
||||
<connections>
|
||||
<outlet property="lblAltitude" destination="14" id="24"/>
|
||||
<outlet property="lblCourse" destination="15" id="25"/>
|
||||
<outlet property="lblDistanceToParis" destination="32" id="35"/>
|
||||
<outlet property="lblLatitude" destination="12" id="26"/>
|
||||
<outlet property="lblLongitude" destination="13" id="27"/>
|
||||
<outlet property="lblMagneticHeading" destination="19" id="28"/>
|
||||
<outlet property="lblSpeed" destination="17" id="29"/>
|
||||
<outlet property="lblTrueHeading" destination="21" id="30"/>
|
||||
<outlet property="view" destination="1" id="7"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Latitude:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="8">
|
||||
<rect key="frame" x="76" y="57" width="66" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Longitude:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="9">
|
||||
<rect key="frame" x="62" y="86" width="80" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Course:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="10">
|
||||
<rect key="frame" x="30" y="144" width="112" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Altitude:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="11">
|
||||
<rect key="frame" x="80" y="115" width="62" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[lat]" lineBreakMode="tailTruncation" minimumFontSize="10" id="12">
|
||||
<rect key="frame" x="150" y="57" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[lon]" lineBreakMode="tailTruncation" minimumFontSize="10" id="13">
|
||||
<rect key="frame" x="150" y="86" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[alt]" lineBreakMode="tailTruncation" minimumFontSize="10" id="14">
|
||||
<rect key="frame" x="150" y="115" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[course]" lineBreakMode="tailTruncation" minimumFontSize="10" id="15">
|
||||
<rect key="frame" x="150" y="144" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Speed:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="16">
|
||||
<rect key="frame" x="30" y="173" width="112" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[speed]" lineBreakMode="tailTruncation" minimumFontSize="10" id="17">
|
||||
<rect key="frame" x="150" y="173" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Mag. Heading:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="18">
|
||||
<rect key="frame" x="30" y="248" width="112" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[mag head]" lineBreakMode="tailTruncation" minimumFontSize="10" id="19">
|
||||
<rect key="frame" x="150" y="248" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="True Heading:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="20">
|
||||
<rect key="frame" x="30" y="277" width="112" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[true head]" lineBreakMode="tailTruncation" minimumFontSize="10" id="21">
|
||||
<rect key="frame" x="150" y="277" width="150" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Location:" lineBreakMode="tailTruncation" minimumFontSize="10" id="22">
|
||||
<rect key="frame" x="20" y="20" width="98" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="24"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Heading:" lineBreakMode="tailTruncation" minimumFontSize="10" id="23">
|
||||
<rect key="frame" x="20" y="211" width="109" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="24"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Distance To:" lineBreakMode="tailTruncation" minimumFontSize="10" id="34">
|
||||
<rect key="frame" x="20" y="308" width="136" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="24"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Paris (lat 48.857, long 2.351):" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="31">
|
||||
<rect key="frame" x="30" y="345" width="226" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="[distance to paris]" lineBreakMode="tailTruncation" minimumFontSize="10" id="32">
|
||||
<rect key="frame" x="30" y="374" width="226" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
|
@ -1,73 +0,0 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace Example_CoreLocation.MainScreen
|
||||
{
|
||||
public partial class MainViewController_iPhone : UIViewController, IMainScreen
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
// The IntPtr and initWithCoder constructors are required for controllers that need
|
||||
// to be able to be created from a xib rather than from managed code
|
||||
|
||||
public MainViewController_iPhone (IntPtr handle) : base(handle)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
[Export("initWithCoder:")]
|
||||
public MainViewController_iPhone (NSCoder coder) : base(coder)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
public MainViewController_iPhone () : base("MainViewController_iPhone", null)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
void Initialize ()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public UILabel LblAltitude
|
||||
{
|
||||
get { return this.lblAltitude; }
|
||||
}
|
||||
public UILabel LblLatitude
|
||||
{
|
||||
get { return this.lblLatitude; }
|
||||
}
|
||||
public UILabel LblLongitude
|
||||
{
|
||||
get { return this.lblLongitude; }
|
||||
}
|
||||
public UILabel LblCourse
|
||||
{
|
||||
get { return this.lblCourse; }
|
||||
}
|
||||
public UILabel LblMagneticHeading
|
||||
{
|
||||
get { return this.lblMagneticHeading; }
|
||||
}
|
||||
public UILabel LblSpeed
|
||||
{
|
||||
get { return this.lblSpeed; }
|
||||
}
|
||||
public UILabel LblTrueHeading
|
||||
{
|
||||
get { return this.lblTrueHeading; }
|
||||
}
|
||||
public UILabel LblDistanceToParis
|
||||
{
|
||||
get { return this.lblDistanceToParis; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,144 +0,0 @@
|
|||
// ------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Mono Runtime Version: 2.0.50727.1433
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
namespace Example_CoreLocation.MainScreen {
|
||||
|
||||
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
|
||||
[Foundation.Register("MainViewController_iPhone")]
|
||||
public partial class MainViewController_iPhone {
|
||||
|
||||
private UIKit.UIView __mt_view;
|
||||
|
||||
private UIKit.UILabel __mt_lblAltitude;
|
||||
|
||||
private UIKit.UILabel __mt_lblCourse;
|
||||
|
||||
private UIKit.UILabel __mt_lblLatitude;
|
||||
|
||||
private UIKit.UILabel __mt_lblLongitude;
|
||||
|
||||
private UIKit.UILabel __mt_lblMagneticHeading;
|
||||
|
||||
private UIKit.UILabel __mt_lblSpeed;
|
||||
|
||||
private UIKit.UILabel __mt_lblTrueHeading;
|
||||
|
||||
private UIKit.UILabel __mt_lblDistanceToParis;
|
||||
|
||||
#pragma warning disable 0169
|
||||
[Foundation.Connect("view")]
|
||||
private UIKit.UIView view {
|
||||
get {
|
||||
this.__mt_view = ((UIKit.UIView)(this.GetNativeField("view")));
|
||||
return this.__mt_view;
|
||||
}
|
||||
set {
|
||||
this.__mt_view = value;
|
||||
this.SetNativeField("view", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblAltitude")]
|
||||
private UIKit.UILabel lblAltitude {
|
||||
get {
|
||||
this.__mt_lblAltitude = ((UIKit.UILabel)(this.GetNativeField("lblAltitude")));
|
||||
return this.__mt_lblAltitude;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblAltitude = value;
|
||||
this.SetNativeField("lblAltitude", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblCourse")]
|
||||
private UIKit.UILabel lblCourse {
|
||||
get {
|
||||
this.__mt_lblCourse = ((UIKit.UILabel)(this.GetNativeField("lblCourse")));
|
||||
return this.__mt_lblCourse;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblCourse = value;
|
||||
this.SetNativeField("lblCourse", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblLatitude")]
|
||||
private UIKit.UILabel lblLatitude {
|
||||
get {
|
||||
this.__mt_lblLatitude = ((UIKit.UILabel)(this.GetNativeField("lblLatitude")));
|
||||
return this.__mt_lblLatitude;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblLatitude = value;
|
||||
this.SetNativeField("lblLatitude", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblLongitude")]
|
||||
private UIKit.UILabel lblLongitude {
|
||||
get {
|
||||
this.__mt_lblLongitude = ((UIKit.UILabel)(this.GetNativeField("lblLongitude")));
|
||||
return this.__mt_lblLongitude;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblLongitude = value;
|
||||
this.SetNativeField("lblLongitude", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblMagneticHeading")]
|
||||
private UIKit.UILabel lblMagneticHeading {
|
||||
get {
|
||||
this.__mt_lblMagneticHeading = ((UIKit.UILabel)(this.GetNativeField("lblMagneticHeading")));
|
||||
return this.__mt_lblMagneticHeading;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblMagneticHeading = value;
|
||||
this.SetNativeField("lblMagneticHeading", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblSpeed")]
|
||||
private UIKit.UILabel lblSpeed {
|
||||
get {
|
||||
this.__mt_lblSpeed = ((UIKit.UILabel)(this.GetNativeField("lblSpeed")));
|
||||
return this.__mt_lblSpeed;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblSpeed = value;
|
||||
this.SetNativeField("lblSpeed", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblTrueHeading")]
|
||||
private UIKit.UILabel lblTrueHeading {
|
||||
get {
|
||||
this.__mt_lblTrueHeading = ((UIKit.UILabel)(this.GetNativeField("lblTrueHeading")));
|
||||
return this.__mt_lblTrueHeading;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblTrueHeading = value;
|
||||
this.SetNativeField("lblTrueHeading", value);
|
||||
}
|
||||
}
|
||||
|
||||
[Foundation.Connect("lblDistanceToParis")]
|
||||
private UIKit.UILabel lblDistanceToParis {
|
||||
get {
|
||||
this.__mt_lblDistanceToParis = ((UIKit.UILabel)(this.GetNativeField("lblDistanceToParis")));
|
||||
return this.__mt_lblDistanceToParis;
|
||||
}
|
||||
set {
|
||||
this.__mt_lblDistanceToParis = value;
|
||||
this.SetNativeField("lblDistanceToParis", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +1,13 @@
|
|||
Core Location
|
||||
=============
|
||||
|
||||
This sample illustrates how to retrieve location, orientation, and velocity
|
||||
data from the device using the Core Location API exposed in MonoTouch. It
|
||||
covers initializing the CLLocationManager, configuring update frequency and
|
||||
accuracy, and receiving updates using both the event and delegate pattern.
|
||||
This sample illustrates how to retrieve location, orientation, and velocity data from the device using the Core Location API. It covers initializing the CLLocationManager, configuring update frequency and accuracy, and receiving updates using delegate pattern.
|
||||
It also illustrates how to retrieve "Distance To" information.
|
||||
|
||||
License
|
||||
-------
|
||||
Code is released under the MIT license
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
|
|
Двоичные данные
CoreLocation/Resources/Default-568h@2x.png
До Ширина: | Высота: | Размер: 12 KiB |
Двоичные данные
CoreLocation/Resources/Default-Landscape@2x~ipad.png
До Ширина: | Высота: | Размер: 24 KiB |
Двоичные данные
CoreLocation/Resources/Default-Landscape~ipad.png
До Ширина: | Высота: | Размер: 9.4 KiB |
Двоичные данные
CoreLocation/Resources/Default-Portrait@2x~ipad.png
До Ширина: | Высота: | Размер: 25 KiB |
Двоичные данные
CoreLocation/Resources/Default-Portrait~ipad.png
До Ширина: | Высота: | Размер: 9.8 KiB |
Двоичные данные
CoreLocation/Resources/Default.png
До Ширина: | Высота: | Размер: 5.2 KiB |
Двоичные данные
CoreLocation/Resources/Default@2x.png
До Ширина: | Высота: | Размер: 12 KiB |
Двоичные данные
CoreLocation/Resources/Icon-60@2x.png
До Ширина: | Высота: | Размер: 15 KiB |
Двоичные данные
CoreLocation/Resources/Icon-76.png
До Ширина: | Высота: | Размер: 8.1 KiB |
Двоичные данные
CoreLocation/Resources/Icon-76@2x.png
До Ширина: | Высота: | Размер: 20 KiB |
Двоичные данные
CoreLocation/Resources/Icon-Small-40.png
До Ширина: | Высота: | Размер: 3.3 KiB |
Двоичные данные
CoreLocation/Resources/Icon-Small-40@2x.png
До Ширина: | Высота: | Размер: 8.6 KiB |
|
@ -1,38 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="gAE-YM-kbH">
|
||||
<objects>
|
||||
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Xamarin" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0q6-MR-edx">
|
||||
<rect key="frame" x="201" y="300" width="194" height="39"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Light" family="Helvetica Neue" pointSize="36"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="0q6-MR-edx" secondAttribute="centerX" id="18"/>
|
||||
<constraint firstItem="0q6-MR-edx" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" id="19"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="349" y="339"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
Двоичные данные
CoreLocation/Resources/iTunesArtwork.png
До Ширина: | Высота: | Размер: 106 KiB |
Двоичные данные
CoreLocation/Resources/iTunesArtwork@2x
До Ширина: | Высота: | Размер: 273 KiB |
Двоичные данные
CoreLocation/Resources/icon-100.png
До Ширина: | Высота: | Размер: 11 KiB |
Двоичные данные
CoreLocation/Resources/icon-114.png
До Ширина: | Высота: | Размер: 14 KiB |
Двоичные данные
CoreLocation/Resources/icon-144.png
До Ширина: | Высота: | Размер: 18 KiB |
Двоичные данные
CoreLocation/Resources/icon-29.png
До Ширина: | Высота: | Размер: 2.0 KiB |
Двоичные данные
CoreLocation/Resources/icon-50.png
До Ширина: | Высота: | Размер: 4.2 KiB |
Двоичные данные
CoreLocation/Resources/icon-57.png
До Ширина: | Высота: | Размер: 5.1 KiB |
Двоичные данные
CoreLocation/Resources/icon-58.png
До Ширина: | Высота: | Размер: 5.2 KiB |
Двоичные данные
CoreLocation/Resources/icon-72.png
До Ширина: | Высота: | Размер: 6.6 KiB |