[dotnet] Port the iOS tabbed app template to .NET. (#14592)

Ref: https://github.com/xamarin/xamarin-macios/issues/10747
This commit is contained in:
Rolf Bjarne Kvinge 2022-04-04 10:05:08 +02:00 коммит произвёл GitHub
Родитель 06140f1712
Коммит 6e348f0e65
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
46 изменённых файлов: 820 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}

Просмотреть файл

@ -0,0 +1,60 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": [ "iOS", "Mobile" ],
"identity": "Microsoft.iOS.iOSTabbedApp",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"shortName": "ios-tabbed",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "iOSTabbedApp1",
"sources": [
{
"source": "./",
"target": "./",
"copyOnly": [ "**/*.png", "**/*.pdf" ]
}
],
"preferNameDirectory": true,
"primaryOutputs": [
{ "path": "iOSTabbedApp1.csproj" }
],
"symbols": {
"bundleId": {
"type": "parameter",
"description": "Overrides CFBundleIdentifier in the Info.plist",
"datatype": "string",
"replaces": "com.companyname.iOSTabbedApp1"
},
"minOSVersion": {
"type": "parameter",
"description": "Overrides SupportedOSPlatformVersion in the project file",
"replaces": "minOSVersion",
"datatype": "string",
"defaultValue": "15.0"
},
"deviceFamily": {
"type": "parameter",
"datatype": "choice",
"defaultValue": "universal",
"choices": [
{
"choice": "universal",
"description": "Support both iPhone and iPad devices"
},
{
"choice": "iphone",
"description": "Support only iPhone devices"
},
{
"choice": "ipad",
"description": "Support only iPad devices"
}
]
}
},
"defaultName": "iOSTabbedApp1"
}

Просмотреть файл

@ -0,0 +1,35 @@
namespace iOSTabbedApp1;
// 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.
public class AppDelegate : UIResponder, IUIApplicationDelegate {
[Export ("window")]
public UIWindow? Window { get; set; }
[Export ("application:didFinishLaunchingWithOptions:")]
public 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;
}
// UISceneSession Lifecycle
[Export ("application:configurationForConnectingSceneSession:options:")]
public UISceneConfiguration GetConfiguration (UIApplication application, UISceneSession connectingSceneSession, UISceneConnectionOptions options)
{
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration.Create ("Default Configuration", connectingSceneSession.Role);
}
[Export ("application:didDiscardSceneSessions:")]
public void DidDiscardSceneSessions (UIApplication application, NSSet<UISceneSession> sceneSessions)
{
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after `FinishedLaunching`.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}

Просмотреть файл

@ -0,0 +1,117 @@
{
"images": [
{
"scale": "2x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon40.png"
},
{
"scale": "3x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon60.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon58.png"
},
{
"scale": "3x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon87.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon80.png"
},
{
"scale": "3x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "2x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "3x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon180.png"
},
{
"scale": "1x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon20.png"
},
{
"scale": "2x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "1x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon29.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon58.png"
},
{
"scale": "1x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon80.png"
},
{
"scale": "1x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon76.png"
},
{
"scale": "2x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon152.png"
},
{
"scale": "2x",
"size": "83.5x83.5",
"idiom": "ipad",
"filename": "Icon167.png"
},
{
"scale": "1x",
"size": "1024x1024",
"idiom": "ios-marketing",
"filename": "Icon1024.png"
}
],
"properties": {},
"info": {
"version": 1,
"author": "xcode"
}
}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 69 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 845 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.5 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.7 KiB

Просмотреть файл

@ -0,0 +1,55 @@
{
"images": [
{
"filename": "First.pdf",
"idiom": "universal"
},
{
"scale": "1x",
"idiom": "universal"
},
{
"scale": "2x",
"idiom": "universal"
},
{
"scale": "3x",
"idiom": "universal"
},
{
"idiom": "iphone"
},
{
"scale": "1x",
"idiom": "iphone"
},
{
"scale": "2x",
"idiom": "iphone"
},
{
"subtype": "retina4",
"scale": "2x",
"idiom": "iphone"
},
{
"scale": "3x",
"idiom": "iphone"
},
{
"idiom": "ipad"
},
{
"scale": "1x",
"idiom": "ipad"
},
{
"scale": "2x",
"idiom": "ipad"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

Двоичные данные
dotnet/Templates/Microsoft.iOS.Templates/ios-tabbed/Assets.xcassets/First.imageset/First.pdf поставляемый Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,55 @@
{
"images": [
{
"filename": "Second.pdf",
"idiom": "universal"
},
{
"scale": "1x",
"idiom": "universal"
},
{
"scale": "2x",
"idiom": "universal"
},
{
"scale": "3x",
"idiom": "universal"
},
{
"idiom": "iphone"
},
{
"scale": "1x",
"idiom": "iphone"
},
{
"scale": "2x",
"idiom": "iphone"
},
{
"subtype": "retina4",
"scale": "2x",
"idiom": "iphone"
},
{
"scale": "3x",
"idiom": "iphone"
},
{
"idiom": "ipad"
},
{
"scale": "1x",
"idiom": "ipad"
},
{
"scale": "2x",
"idiom": "ipad"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

Двоичные данные
dotnet/Templates/Microsoft.iOS.Templates/ios-tabbed/Assets.xcassets/Second.imageset/Second.pdf поставляемый Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -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>

Просмотреть файл

@ -0,0 +1,21 @@
namespace iOSTabbedApp1;
using ObjCRuntime;
public partial class FirstViewController : UIViewController {
protected FirstViewController (NativeHandle handle) : base (handle)
{
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
// Perform any additional setup after loading the view, typically from a nib.
}
public override void DidReceiveMemoryWarning ()
{
base.DidReceiveMemoryWarning ();
// Release any cached data, images, etc that aren't in use.
}
}

Просмотреть файл

@ -0,0 +1,8 @@
namespace iOSTabbedApp1;
[Register ("FirstViewController")]
partial class FirstViewController {
void ReleaseDesignerOutlets ()
{
}
}

Просмотреть файл

@ -0,0 +1,69 @@
<?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>
<string>iOSTabbedApp1</string>
<key>CFBundleIdentifier</key>
<string>com.companyname.iOSTabbedApp1</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UIDeviceFamily</key>
<array>
<!--#if((deviceFamily == "iphone") || (deviceFamily == "universal"))
<integer>1</integer>
#endif-->
<!--#if((deviceFamily == "ipad") || (deviceFamily == "universal"))
<integer>2</integer>
#endif-->
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIMainStoryboardFile~ipad</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,6 @@
using iOSTabbedApp1;
// This is the main entry point of the application.
// If you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main (args, null, typeof (AppDelegate));

Просмотреть файл

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="49e-Tb-3d3">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
</dependencies>
<scenes>
<!--First-->
<scene sceneID="hNz-n2-bh7">
<objects>
<viewController id="9pv-A4-QxB" customClass="FirstViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ia1-K6-d13"/>
<viewControllerLayoutGuide type="bottom" id="4ug-Mw-9AY"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="tsR-hK-woN">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="First View" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="KQZ-1w-vlD" misplaced="YES">
<rect key="frame" x="221" y="279" width="157.5" height="41.5"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loaded by FirstViewController" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A5M-7J-77L">
<rect key="frame" x="203" y="329" width="194.5" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="centerX" secondItem="KQZ-1w-vlD" secondAttribute="centerX" id="6BV-lF-sBN"/>
<constraint firstItem="A5M-7J-77L" firstAttribute="top" secondItem="KQZ-1w-vlD" secondAttribute="bottom" constant="8" symbolic="YES" id="cfb-er-3JN"/>
<constraint firstItem="A5M-7J-77L" firstAttribute="centerX" secondItem="KQZ-1w-vlD" secondAttribute="centerX" id="e1l-AV-tCB"/>
<constraint firstAttribute="centerY" secondItem="KQZ-1w-vlD" secondAttribute="centerY" id="exm-UA-ej4"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="First" image="First" id="acW-dT-cKf"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="W5J-7L-Pyd" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="750" y="-320"/>
</scene>
<!--Second-->
<scene sceneID="wg7-f3-ORb">
<objects>
<viewController id="8rJ-Kc-sve" customClass="SecondViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="L7p-HK-0SC"/>
<viewControllerLayoutGuide type="bottom" id="Djb-ko-YwX"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="QS5-Rx-YEW">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Second View" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="zEq-FU-wV5" misplaced="YES">
<rect key="frame" x="195" y="279" width="209.5" height="41.5"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loaded by SecondViewController" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NDk-cv-Gan" misplaced="YES">
<rect key="frame" x="192" y="329" width="215.5" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="NDk-cv-Gan" firstAttribute="top" secondItem="zEq-FU-wV5" secondAttribute="bottom" constant="8" symbolic="YES" id="Day-4N-Vmt"/>
<constraint firstItem="NDk-cv-Gan" firstAttribute="centerX" secondItem="zEq-FU-wV5" secondAttribute="centerX" id="JgO-Fn-dHn"/>
<constraint firstAttribute="centerX" secondItem="zEq-FU-wV5" secondAttribute="centerX" id="qqM-NS-xev"/>
<constraint firstAttribute="centerY" secondItem="zEq-FU-wV5" secondAttribute="centerY" id="qzY-Ky-pLD"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Second" image="Second" id="cPa-gy-q4n"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4Nw-L8-lE0" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="750" y="360"/>
</scene>
<!--Tab Bar Controller-->
<scene sceneID="yl2-sM-qoP">
<objects>
<tabBarController id="49e-Tb-3d3" sceneMemberID="viewController">
<nil key="simulatedBottomBarMetrics"/>
<tabBar key="tabBar" contentMode="scaleToFill" id="W28-zg-YXA">
<rect key="frame" x="0.0" y="519" width="320" height="49"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tabBar>
<connections>
<segue destination="9pv-A4-QxB" kind="relationship" relationship="viewControllers" id="u7Y-xg-7CH"/>
<segue destination="8rJ-Kc-sve" kind="relationship" relationship="viewControllers" id="lzU-1b-eKA"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="HuB-VB-40B" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="0.0" y="0.0"/>
</scene>
</scenes>
<resources>
<image name="First" width="30" height="30"/>
<image name="Second" width="30" height="30"/>
</resources>
</document>

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207" />
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1" />
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" />
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder" />
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2017 " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21" />
<fontDescription key="fontDescription" type="system" pointSize="17" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TabbedApp" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43" />
<fontDescription key="fontDescription" type="boldSystem" pointSize="36" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite" />
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC" />
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk" />
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l" />
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0" />
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9" />
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g" />
</constraints>
<nil key="simulatedStatusBarMetrics" />
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<point key="canvasLocation" x="548" y="455" />
</view>
</objects>
</document>

Просмотреть файл

@ -0,0 +1,54 @@
namespace iOSTabbedApp1;
[Register ("SceneDelegate")]
public class SceneDelegate : UIResponder, IUIWindowSceneDelegate {
[Export ("window")]
public UIWindow? Window { get; set; }
[Export ("scene:willConnectToSession:options:")]
public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions)
{
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see UIApplicationDelegate `GetConfiguration` instead).
}
[Export ("sceneDidDisconnect:")]
public void DidDisconnect (UIScene scene)
{
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
// Release any resources associated with this scene that can be re-created the next time the scene connects.
// The scene may re-connect later, as its session was not neccessarily discarded (see UIApplicationDelegate `DidDiscardSceneSessions` instead).
}
[Export ("sceneDidBecomeActive:")]
public void DidBecomeActive (UIScene scene)
{
// Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}
[Export ("sceneWillResignActive:")]
public void WillResignActive (UIScene scene)
{
// Called when the scene will move from an active state to an inactive state.
// This may occur due to temporary interruptions (ex. an incoming phone call).
}
[Export ("sceneWillEnterForeground:")]
public void WillEnterForeground (UIScene scene)
{
// Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background.
}
[Export ("sceneDidEnterBackground:")]
public void DidEnterBackground (UIScene scene)
{
// Called as the scene transitions from the foreground to the background.
// Use this method to save data, release shared resources, and store enough scene-specific state information
// to restore the scene back to its current state.
}
}

Просмотреть файл

@ -0,0 +1,21 @@
namespace iOSTabbedApp1;
using ObjCRuntime;
public partial class SecondViewController : UIViewController {
protected SecondViewController (NativeHandle handle) : base (handle)
{
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
// Perform any additional setup after loading the view, typically from a nib.
}
public override void DidReceiveMemoryWarning ()
{
base.DidReceiveMemoryWarning ();
// Release any cached data, images, etc that aren't in use.
}
}

Просмотреть файл

@ -0,0 +1,8 @@
namespace iOSTabbedApp1;
[Register ("SecondViewController")]
partial class SecondViewController {
void ReleaseDesignerOutlets ()
{
}
}

Просмотреть файл

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-ios</TargetFramework>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">iOSTabbedApp1</RootNamespace>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
<ImplicitUsings>true</ImplicitUsings>
<SupportedOSPlatformVersion>minOSVersion</SupportedOSPlatformVersion>
</PropertyGroup>
</Project>

Просмотреть файл

@ -29,6 +29,7 @@ namespace Xamarin.Tests {
public static TemplateInfo[] Templates = {
new TemplateInfo (ApplePlatform.iOS, "ios"),
new TemplateInfo (ApplePlatform.iOS, "ios-tabbed"),
new TemplateInfo (ApplePlatform.iOS, "ioslib"),
new TemplateInfo (ApplePlatform.iOS, "iosbinding", false), // Bindings can not build without a native library assigned
new TemplateInfo (ApplePlatform.TVOS, "tvos"),