Skip to content

Commit

Permalink
Added support warnings for most properties/methods/classes and improv…
Browse files Browse the repository at this point in the history
…ed linking
  • Loading branch information
Mcrich23 committed May 5, 2024
1 parent 8415912 commit 84282e5
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Detect if a device has the Dynamic Island.

`hasDynamicIsland` is a property of [`ByDevice`](<doc:ByDevice>) that can provide a non-hardcoded boolean value of whether or not a device has the Dynamic Island

> Warning: It is unknown when this property of `ByDevice` was added, and to which operating systems, testing is required before production use. `ByDevice` and/or `hasDynamicIsland` may be removed at any time.
> Warning: It is unknown when this property of `ByDevice` was added, and exatly which operating systems and versions support it. Testing is required before production use, and `ByDevice` and/or `hasDynamicIsland` may be removed at any time.
## Method

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Text("Downtown Bus")
```
![A screenshot showing the image of a bus with a caption reading Downtown Bus](ViewModifier-Image)

Full Documentation [Here](https://developer.apple.com/documentation/swiftui/ViewModifier)

## Topics

- <doc:variableBlur>
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ Apply a variable blur overlay to a view.

Modify a view to have variable layers of blur.

> Warning: It is unknown when `variableBlur(_:)` was added to `ViewModifier` and exactly which operating systems/versions support it. Testing is required before release into production and `variableBlur(_:)` may be removed in the future.
![An example of this UI](SwiftUI-variableBlur-Image)

> Warning: SwiftUI already has the symbols for a variable blur modifier, they can be found at link time. you just need to add some stubs to the *.swiftinterface files. See [Sam Henry Gold's Tweet](https://twitter.com/samhenrigold/status/1786399498308059482) for more information or use [SwiftUI-HiddenApi](https://github.com/Wouter01/SwiftUI-HiddenAPI?tab=readme-ov-file)
> Warning: SwiftUI already has the symbols for a variable blur modifier, they can be found at link time. you just need to add some stubs to the \*.swiftinterface files. See [Sam Henry Gold's Tweet](https://twitter.com/samhenrigold/status/1786399498308059482) for more information or use [SwiftUI-HiddenApi](https://github.com/Wouter01/SwiftUI-HiddenAPI?tab=readme-ov-file)
## Modifier

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ self.present(alert, animated: true, completion: nil)
```
When configuring an alert with the [`UIAlertController.Style.alert`](https://developer.apple.com/documentation/uikit/uialertcontroller/style/alert) style, you can also add text fields to the alert interface. The alert controller lets you provide a block for configuring your text fields prior to display. The alert controller maintains a reference to each text field so that you can access its value later.

Full Documentation [Here](https://developer.apple.com/documentation/uikit/UIAlertController)

## Topics

- <doc:_setHeaderContentViewController>
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ Set any UIViewController as a custom header for your alert

## Overview

UIAlertController's `_setHeaderContentViewController(_:)` method lets you set any UIViewController as a custom header for your alert.
[`UIAlertController`](<doc:UIAlertController>)'s `_setHeaderContentViewController(_:)` method lets you set any [`UIViewController`](https://developer.apple.com/documentation/uikit/UIViewController) as a custom header for your alert.

Apple use this in the new Journal app's UI to present a date picker in an action sheet, as pointed out in
[lickability](https://x.com/lickability/status/1775577442117190067)'s design critique.

> Warning: It is unknown when `_setHeaderContentViewController(_:)` was added to `UIAlertController` and exactly which operating systems/versions support it. Testing is required before release into production and `_setHeaderContentViewController(_:)` may be removed in the future.
![An example of this UI](_setHeaderContentViewController-Video)

## Method

We can use this code to present a `UIAlertController` with our custom header:
We can use this code to present a [`UIAlertController`](<doc:UIAlertController>) with our custom header:
```swift
let selector = NSSelectorFromString("_setHeaderContentViewController:")
let headerContentViewController = CalendarViewController()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ Navigation bars are accessible by default. The default accessibility trait for a
With VoiceOver enabled on an iOS device, after the user navigates to a new view in the hierarchy, VoiceOver reads the navigation bar’s title, followed by the name of the left bar button item. When the user taps an element in a navigation bar, VoiceOver reads the name and the type of the element; for example, "General back button," "Keyboard heading," and "Edit button."
For general information about making your interface accessible, see [Accessibility Programming Guide for iOS](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/iPhoneAccessibility/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008785).

Full Documentation [Here](https://developer.apple.com/documentation/uikit/UINavigationBar)

## Topics

- <doc:_accessoryView>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Add an accent selection color to `UINavigationBar`

## Overview

This let's you add a "palette" below a `UINavigationBar` as per Calendar and Fitness.
This let's you add a "palette" below a [`UINavigationBar`](<doc:UINavigationBar>) as per Calendar and Fitness.

> Warning: It is unknown when `_UINavigationBarPalette` was added to `UINavigationBar` and exactly which operating systems/versions support it. Testing is required before release into production and `_UINavigationBarPalette` may be removed in the future.
![An example of this UI](_UINavigationBarPalette-Video)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ Include an inline large view in your `UINavigationBar`

## Overview

UINavigationBar’s \_UINavigationBarLargeTitleView subview has an \_accessoryView property that acts as a sort of bar button item that aligns with the large title label.
[`UINavigationBar`](<doc:UINavigationBar>)’s \_UINavigationBarLargeTitleView subview has an \_accessoryView property that acts as a sort of bar button item that aligns with the large title label.

This is used in all sorts of system apps like Health, Music, and Podcasts.

> Warning: It is unknown when `_accessoryView` and `_UINavigationBarLargeTitleView` were added to `UINavigationBar` and exactly which operating systems/versions support it. Testing is required before release into production and these properties may be removed in the future.
![An example of this UI](_accessoryView-Video)

## Method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ A navigation item always reflects information about its associated view controll
The [`backBarButtonItem`](https://developer.apple.com/documentation/uikit/uinavigationitem/1624958-backbarbuttonitem) property of a navigation item reflects the Back button you want to display when the current view controller is just below the topmost view controller. The Back button doesn’t appear when the current view controller is topmost.
When specifying buttons for a navigation item, you must use [`UIBarButtonItem`](https://developer.apple.com/documentation/uikit/uibarbuttonitem) objects. If you want to display custom views in the navigation bar, you must wrap those views inside a [`UIBarButtonItem`](https://developer.apple.com/documentation/uikit/uibarbuttonitem) object before adding them to the navigation item.

Full Documentation [Here](https://developer.apple.com/documentation/uikit/UINavigationItem)

## Topics

- <doc:__largeTitleTwoLineMode>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Multiple lines for a `UINavigationItem`

## Overview

You can achieve this two line large title in your navigation bar very easily with this extension of UINavigationItem.
You can achieve this two line large title in your navigation bar very easily with this extension of [`UINavigationItem`](<doc:UINavigationItem>).

> Warning: It is unknown when `__largeTitleTwoLineMode` was added to `UINavigationItem` and exactly which operating systems/versions support it. Testing is required before release into production and `__largeTitleTwoLineMode` may be removed in the future.
![An example of this UI](__largeTitleTwoLineMode-Image)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ In iOS 6 and later, if you assign a value to this view’s [`restorationIdentifi
During the next launch cycle, the view attempts to restore these properties to their saved values. If the selection range can’t be applied to the text in the restored view, no text is selected. For more information about how state preservation and restoration works, see [App Programming Guide for iOS](https://developer.apple.com/library/archive/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007072).
For design guidance, see [Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/components/content/text-views/).

Full Documentation [Here](https://developer.apple.com/documentation/uikit/UITextView)

## Topics

- <doc:setAttributedPlaceholder>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ A placeholder for UITextViews

## Overview

Adding a placeholder string to a UITextView. Has been possible for a long time with UITextField, but for some reason not (publicly) with the text view counterpart. No more subclassing UITextView and manually showing/hiding a UILabel
Adding a placeholder string has been possible for a long time with [`UITextField`](https://developer.apple.com/documentation/uikit/UITextField), but for some reason not (publicly) with the [`UITextView`](<doc:UITextView>) counterpart. No more subclassing [`UITextView`](<doc:UITextView>) and manually showing/hiding a [`UILabel`](https://developer.apple.com/documentation/uikit/UILabel)

> Warning: It is unknown when `setAttributedPlaceholder(_:)` was added to `UITextView` and exactly which operating systems/versions support it. Testing is required before release into production and `setAttributedPlaceholder(_:)` may be removed in the future.
![An example of this UI](setAttributedPlaceholder-Video)

Expand Down

0 comments on commit 84282e5

Please sign in to comment.