Skip to content

Commit 0683a2e

Browse files
authored
[net10.0] Merge main into net10.0. (#21917)
2 parents 9a42fc9 + f21a0cc commit 0683a2e

File tree

1,187 files changed

+51524
-39456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,187 files changed

+51524
-39456
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# EditorConfig is awesome: https://editorconfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
16
[*.{props,targets}]
27
indent_style = tab
38
indent_size = 4

.gitmodules

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
[submodule "external/Touch.Unit"]
2-
path = external/Touch.Unit
3-
url = ../../xamarin/Touch.Unit.git
4-
branch = main
51
[submodule "external/Xamarin.MacDev"]
62
path = external/Xamarin.MacDev
73
url = ../../xamarin/Xamarin.MacDev
84
branch = main
9-
[submodule "external/MonoTouch.Dialog"]
10-
path = external/MonoTouch.Dialog
11-
url = ../../xamarin/MonoTouch.Dialog
12-
branch = dotnet
5+

CODEOWNERS

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
/src/HomeKit
9696
/src/homekit.cs
9797
/src/iad.cs
98-
/src/iAd.framework
9998
/src/identitylookup.cs @dalexsoto
10099
/src/identitylookupui.cs @dalexsoto
101100
/src/ituneslibrary.cs @mandel-macaque
@@ -184,8 +183,6 @@
184183
/src/vision.cs @dalexsoto
185184
/src/WatchConnectivity @rolfbjarne
186185
/src/watchconnectivity.cs @rolfbjarne
187-
/src/WatchKit @rolfbjarne
188-
/src/watchkit.cs @rolfbjarne
189186
/src/WebKit
190187
/src/webkit.cs
191188

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<MicrosoftBuildFrameworkPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildFrameworkPackageVersion>
99
<MicrosoftBuildTasksCorePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildTasksCorePackageVersion>
1010
<MicrosoftBuildUtilitiesCorePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildUtilitiesCorePackageVersion>
11+
<NUnitXmlTestLoggerPackageVersion>3.1.15</NUnitXmlTestLoggerPackageVersion>
1112
</PropertyGroup>
1213
<Import Project="Build.props" Condition="Exists('Build.props')" />
1314
</Project>

Make.config

Lines changed: 25 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ include $(TOP)/Make.versions
4444
# The value is taken from the name + version of the Ref pack.
4545
# Example: given the Ref pack "Microsoft.iOS.Ref.net8.0_17.5" with the version "17.5.8030", the value
4646
# to write here would be the part after "Microsoft.iOS.Ref." + "/" + version: "net8.0_17.5/17.5.8030"
47-
STABLE_NUGET_VERSION_iOS=net9.0_18.0/18.0.9617
48-
STABLE_NUGET_VERSION_tvOS=net9.0_18.0/18.0.9617
49-
STABLE_NUGET_VERSION_MacCatalyst=net9.0_18.0/18.0.9617
50-
STABLE_NUGET_VERSION_macOS=net9.0_15.0/15.0.9617
47+
STABLE_NUGET_VERSION_iOS=net9.0_18.2/18.2.9170
48+
STABLE_NUGET_VERSION_tvOS=net9.0_18.2/18.2.9170
49+
STABLE_NUGET_VERSION_MacCatalyst=net9.0_18.2/18.2.9170
50+
STABLE_NUGET_VERSION_macOS=net9.0_15.2/15.2.9170
5151

5252
PACKAGE_HEAD_REV=$(shell git rev-parse HEAD)
5353

@@ -169,15 +169,6 @@ endif
169169

170170
NUGET_BUILD_METADATA=
171171

172-
IOS_PRODUCT=Xamarin.iOS
173-
IOS_PACKAGE_NAME=Xamarin.iOS
174-
IOS_PACKAGE_NAME_LOWER=$(shell echo $(IOS_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]")
175-
IOS_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(IOS_PACKAGE_VERSION)))
176-
IOS_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(IOS_PACKAGE_VERSION)))
177-
IOS_PACKAGE_VERSION_REV:=$(word 3, $(subst ., ,$(IOS_PACKAGE_VERSION)))
178-
IOS_PACKAGE_VERSION_BUILD=$(IOS_COMMIT_DISTANCE)
179-
IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD))
180-
181172
IOS_NUGET=Microsoft.iOS
182173
IOS_NUGET_VERSION=$(IOS_NUGET_OS_VERSION).$(IOS_NUGET_COMMIT_DISTANCE)
183174
IOS_NUGET_VERSION_MAJOR=$(word 1, $(subst ., ,$(IOS_NUGET_VERSION)))
@@ -312,31 +303,18 @@ RANLIB=$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranli
312303
# paths to the modules we depend on, as variables, so people can put
313304
# things in other places if they absolutely must.
314305
MONO_PATH=$(TOP)/external/mono
315-
TOUCH_UNIT_PATH=$(TOP)/external/Touch.Unit
316306
XAMARIN_MACDEV_PATH=$(TOP)/external/Xamarin.MacDev
317307
MONOTOUCH_DIALOG_PATH=$(TOP)/external/MonoTouch.Dialog
318308
API_TOOLS_PATH=$(TOP)/external/api-tools
319309
MACCORE_PATH=$(TOP)/../maccore
320-
ADR_PATH=$(TOP)/../macios-adr
310+
ADR_PATH:=$(abspath $(TOP)/../macios-adr)
321311

322312
MONO_PREFIX ?= /Library/Frameworks/Mono.framework/Versions/Current
323313
SYSTEM_MONO=$(MONO_PREFIX)/bin/mono
324314
SYSTEM_MSBUILD=unset MSBuildExtensionsPath && $(MONO_PREFIX)/bin/msbuild /p:Features=strict /m
325315

326316
PKG_CONFIG=$(MONO_PREFIX)/bin/pkg-config
327317

328-
MAC_PRODUCT=Xamarin.Mac
329-
MAC_PACKAGE_NAME=xamarin.mac
330-
MAC_PACKAGE_NAME_LOWER=$(shell echo $(MAC_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]")
331-
332-
MAC_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(MAC_PACKAGE_VERSION)))
333-
MAC_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(MAC_PACKAGE_VERSION)))
334-
MAC_PACKAGE_VERSION_REV=$(word 3, $(subst ., ,$(MAC_PACKAGE_VERSION)))
335-
MAC_PACKAGE_VERSION_BUILD=$(word 4, $(subst ., ,$(MAC_PACKAGE_VERSION)))
336-
MAC_PACKAGE_VERSION_MAJOR_MINOR=$(MAC_PACKAGE_VERSION_MAJOR).$(MAC_PACKAGE_VERSION_MINOR)
337-
MAC_PACKAGE_UPDATE_ID=$(shell echo $(subst ., ,$(MAC_PACKAGE_VERSION).$(MAC_PACKAGE_VERSION_BUILD)) | awk '{printf "2%02d%02d%02d%03d",$$1,$$2,$$3,$$4}')
338-
MAC_PACKAGE_TITLE=Xamarin $(MAC_PACKAGE_NAME) $(MAC_PACKAGE_VERSION)
339-
340318
MACOS_NUGET=Microsoft.macOS
341319
MACOS_NUGET_VERSION=$(MACOS_NUGET_OS_VERSION).$(MACOS_NUGET_COMMIT_DISTANCE)
342320
MACOS_NUGET_VERSION_MAJOR=$(word 1, $(subst ., ,$(MACOS_NUGET_VERSION)))
@@ -345,11 +323,6 @@ MACOS_NUGET_VERSION_PATCH=$(word 3, $(subst ., ,$(MACOS_NUGET_VERSION)))
345323
MACOS_NUGET_VERSION_NO_METADATA=$(MACOS_NUGET_VERSION)$(NUGET_PRERELEASE_IDENTIFIER)
346324
MACOS_NUGET_VERSION_FULL=$(MACOS_NUGET_VERSION_NO_METADATA)$(NUGET_BUILD_METADATA)
347325

348-
MAC_PACKAGE_FILENAME=$(MAC_PACKAGE_NAME_LOWER)-$(MAC_PACKAGE_VERSION).pkg
349-
MAC_PACKAGE_DMG_FILENAME=$(MAC_PACKAGE_NAME_LOWER)-$(MAC_PACKAGE_VERSION).dmg
350-
MAC_PACKAGE_DMG_DIRNAME="$(MAC_PACKAGE_TITLE)"
351-
MAC_PACKAGE_UTI=com.$(MAC_PACKAGE_NAME_LOWER).pkg
352-
353326
TT = $(DOTNET) tool restore && $(DOTNET) t4
354327

355328
PRODUCT_KEY_PATH?=$(TOP)/product.snk
@@ -600,28 +573,28 @@ DOTNET_maccatalyst_PLATFORM=maccatalyst
600573
DOTNET_macos_PLATFORM=macos
601574

602575
# XCFRAMEWORK -> clang argument for min OS version
603-
CLANG_iossimulator-x64_VERSION_MIN=-mios-simulator-version-min=$(MIN_IOS_SDK_VERSION)
604-
CLANG_iossimulator-arm64_VERSION_MIN=-mios-simulator-version-min=$(MIN_IOS_SDK_VERSION)
605-
CLANG_ios-arm64_VERSION_MIN=-miphoneos-version-min=$(MIN_IOS_SDK_VERSION)
606-
CLANG_tvossimulator-x64_VERSION_MIN=-mtvos-simulator-version-min=$(MIN_TVOS_SDK_VERSION)
607-
CLANG_tvossimulator-arm64_VERSION_MIN=-mtvos-simulator-version-min=$(MIN_TVOS_SDK_VERSION)
608-
CLANG_tvos-arm64_VERSION_MIN=-mtvos-version-min=$(MIN_TVOS_SDK_VERSION)
609-
CLANG_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi -arch x86_64
610-
CLANG_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi -arch arm64
611-
CLANG_osx-x64_VERSION_MIN=-mmacosx-version-min=$(MIN_MACOS_SDK_VERSION)
612-
CLANG_osx-arm64_VERSION_MIN=-mmacosx-version-min=$(MIN_MACOS_SDK_VERSION)
576+
CLANG_iossimulator-x64_VERSION_MIN=-mios-simulator-version-min=$(DOTNET_MIN_IOS_SDK_VERSION)
577+
CLANG_iossimulator-arm64_VERSION_MIN=-mios-simulator-version-min=$(DOTNET_MIN_IOS_SDK_VERSION)
578+
CLANG_ios-arm64_VERSION_MIN=-miphoneos-version-min=$(DOTNET_MIN_IOS_SDK_VERSION)
579+
CLANG_tvossimulator-x64_VERSION_MIN=-mtvos-simulator-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION)
580+
CLANG_tvossimulator-arm64_VERSION_MIN=-mtvos-simulator-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION)
581+
CLANG_tvos-arm64_VERSION_MIN=-mtvos-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION)
582+
CLANG_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi -arch x86_64
583+
CLANG_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi -arch arm64
584+
CLANG_osx-x64_VERSION_MIN=-mmacosx-version-min=$(DOTNET_MIN_MACOS_SDK_VERSION)
585+
CLANG_osx-arm64_VERSION_MIN=-mmacosx-version-min=$(DOTNET_MIN_MACOS_SDK_VERSION)
613586

614587
# RUNTIMEIDENTIFIER -> swiftc argument(s) for min OS version
615-
SWIFTC_iossimulator-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_IOS_SDK_VERSION)-simulator
616-
SWIFTC_iossimulator-x64_VERSION_MIN=-target x86_64-apple-ios$(MIN_IOS_SDK_VERSION)-simulator
617-
SWIFTC_ios-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_IOS_SDK_VERSION)
618-
SWIFTC_tvossimulator-x64_VERSION_MIN=-target x86_64-apple-tvos$(MIN_TVOS_SDK_VERSION)-simulator
619-
SWIFTC_tvossimulator-arm64_VERSION_MIN=-target arm64-apple-tvos$(MIN_TVOS_SDK_VERSION)-simulator
620-
SWIFTC_tvos-arm64_VERSION_MIN=-target arm64-apple-tvos$(MIN_TVOS_SDK_VERSION)
621-
SWIFTC_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi
622-
SWIFTC_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi
623-
SWIFTC_osx-x64_VERSION_MIN=-target x86_64-apple-macos$(MIN_MACOS_SDK_VERSION)
624-
SWIFTC_osx-arm64_VERSION_MIN=-target arm64-apple-macos$(MIN_MACOS_SDK_VERSION)
588+
SWIFTC_iossimulator-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_IOS_SDK_VERSION)-simulator
589+
SWIFTC_iossimulator-x64_VERSION_MIN=-target x86_64-apple-ios$(DOTNET_MIN_IOS_SDK_VERSION)-simulator
590+
SWIFTC_ios-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_IOS_SDK_VERSION)
591+
SWIFTC_tvossimulator-x64_VERSION_MIN=-target x86_64-apple-tvos$(DOTNET_MIN_TVOS_SDK_VERSION)-simulator
592+
SWIFTC_tvossimulator-arm64_VERSION_MIN=-target arm64-apple-tvos$(DOTNET_MIN_TVOS_SDK_VERSION)-simulator
593+
SWIFTC_tvos-arm64_VERSION_MIN=-target arm64-apple-tvos$(DOTNET_MIN_TVOS_SDK_VERSION)
594+
SWIFTC_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi
595+
SWIFTC_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi
596+
SWIFTC_osx-x64_VERSION_MIN=-target x86_64-apple-macos$(DOTNET_MIN_MACOS_SDK_VERSION)
597+
SWIFTC_osx-arm64_VERSION_MIN=-target arm64-apple-macos$(DOTNET_MIN_MACOS_SDK_VERSION)
625598

626599

627600
# Misc other computed variables

Make.versions

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#
2-
# A release branch requires updating the following six variables at the bottom of this file:
3-
#
4-
# IOS_PACKAGE_VERSION (major/minor/revision #)
5-
# MAC_PACKAGE_VERSION (major/minor/revision #)
2+
# A release branch requires updating the following four variables further down in this file:
63
#
74
# IOS_NUGET_VERSION (major/minor/patch #)
85
# TVOS_NUGET_VERSION (major/minor/patch #)
@@ -12,45 +9,6 @@
129
# Update version numbers on main as well, to the next version
1310
#
1411

15-
#
16-
# ** Version numbers **
17-
#
18-
# Versions are defined as: Major.Minor.Revison.Build
19-
#
20-
# Major/minor (first/second numbers - max 2 digits each):
21-
# - Bump for major/minor releases.
22-
#
23-
# Revision (third number - max 2 digits):
24-
# - Reset to 0 after a major or minor bump (do not use 99 for Xcode preview
25-
# branches (use 0 instead), because otherwise we can't bump it further if
26-
# needed).
27-
# - Bump for service releases and previews.
28-
# - Bump if commit distance becomes > 999.
29-
# - Can also be bumped for other reasons (in particular there's no correlation
30-
# between Preview/Service Release #X and Revision #Y).
31-
# - Bumping revision to a high enough number to make it clear that there's
32-
# no correlation is a valid reason to bump.
33-
# - The revision must be bumped at the same time for both iOS and Mac
34-
# (otherwise the commit distance will differ).
35-
# - Also bump if the [IOS|MAC]_PACKAGE_VERSION lines change for any other
36-
# reason (otherwise we end up with repeating version numbers, since the
37-
# commit distance would restart at 0, while the other numbers wouldn't
38-
# change).
39-
# - Any other problem can also usually be solved by bumping the revision.
40-
# - Do not refactor the revision to a separate variable, because the reason
41-
# bumping the revision is a general solution for many problems is that it
42-
# also resets the commit distance (which wouldn't happen if the revision was
43-
# refactored to a separate variable).
44-
#
45-
# Build (fourth number - max 3 digits):
46-
# - Automatically calculated as the number of commits since the last time any
47-
# of the other three numbers changed (technically since the corresponding
48-
# line changed in git).
49-
#
50-
51-
IOS_PACKAGE_VERSION=17.99.0.$(IOS_COMMIT_DISTANCE)
52-
MAC_PACKAGE_VERSION=9.99.0.$(MAC_COMMIT_DISTANCE)
53-
5412
#
5513
# ** NuGet package version numbers **
5614
#
@@ -63,8 +21,6 @@ MAC_PACKAGE_VERSION=9.99.0.$(MAC_COMMIT_DISTANCE)
6321
# IMPORTANT: There must be *no* managed API differences unless the two first
6422
# numbers (major.minor) changes.
6523

66-
# WARNING: Do **not** use versions higher than the available Xcode SDK or else we will have issues with mtouch (See https://github.com/xamarin/xamarin-macios/issues/7705)
67-
6824
IOS_NUGET_OS_VERSION=18.2
6925
TVOS_NUGET_OS_VERSION=18.2
7026
MACOS_NUGET_OS_VERSION=15.2

Makefile

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,6 @@ world: check-system
2020

2121
.PHONY: check-system
2222
check-system:
23-
ifdef INCLUDE_MAC
24-
ifdef INCLUDE_IOS
25-
@if [[ "x$(IOS_COMMIT_DISTANCE)" != "x$(MAC_COMMIT_DISTANCE)" ]]; then \
26-
echo "$(COLOR_RED)*** The commit distance for Xamarin.iOS ($(IOS_COMMIT_DISTANCE)) and Xamarin.Mac ($(MAC_COMMIT_DISTANCE)) are different.$(COLOR_CLEAR)"; \
27-
echo "$(COLOR_RED)*** To fix this problem, bump the revision (the third number) for both $(COLOR_GRAY)IOS_PACKAGE_NUMBER$(COLOR_RED) and $(COLOR_GRAY)MAC_PACKAGE_NUMBER$(COLOR_RED) in Make.versions.$(COLOR_CLEAR)"; \
28-
echo "$(COLOR_RED)*** Once fixed, you need to commit the changes for them to pass this check.$(COLOR_CLEAR)"; \
29-
exit 1; \
30-
elif (( $(IOS_COMMIT_DISTANCE) > 999 || $(MAC_COMMIT_DISTANCE) > 999 )); then \
31-
echo "$(COLOR_RED)*** The commit distance for Xamarin.iOS ($(IOS_COMMIT_DISTANCE)) and/or Xamarin.Mac ($(MAC_COMMIT_DISTANCE)) are > 999.$(COLOR_CLEAR)"; \
32-
echo "$(COLOR_RED)*** To fix this problem, bump the revision (the third number) for both $(COLOR_GRAY)IOS_PACKAGE_NUMBER$(COLOR_RED) and $(COLOR_GRAY)MAC_PACKAGE_NUMBER$(COLOR_RED) in Make.versions.$(COLOR_CLEAR)"; \
33-
echo "$(COLOR_RED)*** Once fixed, you need to commit the changes for them to pass this check.$(COLOR_CLEAR)"; \
34-
exit 1; \
35-
fi
36-
endif
37-
endif
3823
@./system-dependencies.sh
3924
$(Q) $(MAKE) show-versions
4025

create-make-config.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ LANG=C
1212
export LANG
1313

1414
# Compute commit distances
15-
printf "IOS_COMMIT_DISTANCE:=$(git log $(git blame -- ./Make.versions HEAD | grep IOS_PACKAGE_VERSION= | sed 's/ .*//' )..HEAD --oneline | wc -l | sed 's/ //g')\n" >> "$OUTPUT_FILE"
16-
printf "MAC_COMMIT_DISTANCE:=$(git log $(git blame -- ./Make.versions HEAD | grep MAC_PACKAGE_VERSION= | sed 's/ .*//' )..HEAD --oneline | wc -l | sed 's/ //g')\n" >> "$OUTPUT_FILE"
17-
1815
for platform in $ALL_DOTNET_PLATFORMS; do
1916
PLATFORM=$(echo "$platform" | tr '[:lower:]' '[:upper:]')
2017
COMMIT=$(git blame -- ./Make.versions HEAD | grep "${PLATFORM}_NUGET_OS_VERSION=" | sed 's/ .*//')

docs/api/UIKit/UIAlertView.xml

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,55 @@
11
<Documentation>
22
<Docs DocId="T:UIKit.UIAlertView">
3-
<summary>A <see cref="T:UIKit.UIView" /> that displays a dialog message with one or more buttons. (As of iOS 8, devs should use <see cref="T:UIKit.UIAlertController" /> rather than this class.)</summary>
3+
<summary>
4+
A <see cref="UIView" /> that displays a dialog message with one or more buttons.
5+
(As of iOS 8, devs should use <see cref="UIAlertController" /> rather than this class.)
6+
</summary>
47
<remarks>
5-
<para>As of iOS 8, app devs should use <see cref="T:UIKit.UIAlertController" /> rather than this class. Extensions may not use this class at all.</para>
68
<para>
7-
The <see cref="T:UIKit.UIAlertView" /> allows the application user to choose among alternative actions. The following code and image, taken from the "AlertViews" section of the "ios Standard Controls" sample illustrates the simplest use-case:
9+
As of iOS 8, app devs should use <see cref="UIAlertController" /> rather than this class.
10+
Extensions may not use this class at all.
11+
</para>
12+
<para>
13+
The <see cref="UIAlertView" /> allows the application user to choose among alternative actions.
14+
The following code and image, taken from the "AlertViews" section of the "ios Standard Controls"
15+
sample illustrates the simplest use-case:
816
</para>
917
<example>
1018
<code lang="csharp lang-csharp"><![CDATA[
11-
UIAlertView alert = new UIAlertView () {
12-
Title = "alert title", Message = "this is a simple alert"
19+
var alert = new UIAlertView () {
20+
Title = "alert title",
21+
Message = "this is a simple alert"
1322
};
14-
alert.AddButton("OK");
23+
alert.AddButton ("OK");
1524
alert.Show ();
1625
]]></code>
1726
</example>
1827
<para>
19-
<img href="~/UIKit/_images/UIKit.UIAlertView.png" alt="Screenshot showing the alert view" />
28+
An alternative to the <see cref="UIAlertView" /> is the <see cref="UIActionSheet" />.
2029
</para>
21-
<para>An alternative to the <see cref="T:UIKit.UIAlertView" /> is the <see cref="T:UIKit.UIActionSheet" />.</para>
22-
<para>The application developer can use <see cref="T:UIKit.UIAlertViewStyle" />s such as <see cref="F:UIKit.UIAlertViewStyle.PlainTextInput" /> or <see cref="F:UIKit.UIAlertViewStyle.LoginAndPasswordInput" /> to allow the application user to enter values.</para>
2330
<para>
24-
The Xamarin API supports two styles of event notification: the Objective-C style that uses a delegate class or the C# style using event notifications.
25-
</para>
31+
The application developer can use <see cref="UIAlertViewStyle" />s such as <see cref="UIAlertViewStyle.PlainTextInput" />
32+
or <see cref="UIAlertViewStyle.LoginAndPasswordInput" /> to allow the application user to enter values.
33+
</para>
34+
<para>
35+
The managed API supports two styles of event notification: the Objective-C style that uses a delegate class or the C# style using event notifications.
36+
</para>
2637
<para>
27-
The C# style allows the user to add or remove event handlers at runtime by assigning to the events of properties of this class. Event handlers can be anyone of a method, an anonymous methods or a lambda expression. Using the C# style events or properties will override any manual settings to the Objective-C Delegate or WeakDelegate settings.
28-
</para>
29-
<para>The Objective-C style requires the user to create a new class derived from <see cref="T:UIKit.UIAlertViewDelegate" /> class and assign it to the <format type="text/html"><a href="https://docs.microsoft.com/en-us/search/index?search=UIKit%20Delegate&amp;scope=Xamarin" title="P:UIKit.Delegate">P:UIKit.Delegate</a></format> property. Alternatively, for low-level control, by creating a class derived from <see cref="T:Foundation.NSObject" /> which has every entry point properly decorated with an [Export] attribute. The instance of this object can then be assigned to the <see cref="P:UIKit.UIAlertView.WeakDelegate" /> property.
38+
The C# style allows the user to add or remove event handlers at runtime by assigning to the
39+
events of properties of this class. Event handlers can be anyone of a method, an anonymous method
40+
or a lambda expression. Using the C# style events or properties will override any manual settings
41+
to the Objective-C Delegate or WeakDelegate settings.
3042
</para>
31-
<block subset="none" type="overrides">
43+
<para>
44+
The Objective-C style requires the user to create a new class derived from <see cref="UIAlertViewDelegate" />
45+
class and assign it to the <see cref="Delegate" /> property. Alternatively, for low-level control, by creating
46+
a class derived from <see cref="NSObject" /> which has every entry point properly decorated with an
47+
<see cref="ExportAttribute" /> attribute and assigning an instance of this class to the <see cref="WeakDelegate" />
48+
property.
49+
</para>
50+
<para>
3251
<para>This class should not be subclassed.</para>
33-
</block>
52+
</para>
3453
</remarks>
3554
<related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIAlertView_Class/index.html">Apple documentation for <c>UIAlertView</c></related>
3655
</Docs>

0 commit comments

Comments
 (0)