### Request Guided Access Session Source: https://developer.apple.com/documentation/uikit/accessibility-for-uikit Transitions the application into or out of Single App mode asynchronously. The completion handler returns a boolean indicating if the transition was successful. ```swift UIAccessibility.requestGuidedAccessSession(enabled: true) { success in print("Guided Access status: \(success)") } ``` -------------------------------- ### Convenience Functions API Source: https://developer.apple.com/documentation/uikit/accessibility-for-uikit Utility functions for managing accessibility focus, hearing device status, gesture conflicts, and Guided Access sessions. ```APIDOC ## GET /accessibility/focusedElement ### Description Returns the accessibility element that’s currently in focus by the specified assistive app. ### Method GET ### Endpoint /accessibility/focusedElement ### Parameters #### Query Parameters - **assistiveTechnologyIdentifier** (UIAccessibility.AssistiveTechnologyIdentifier?) - Optional - The identifier of the assistive app. ### Response #### Success Response (200) - **focusedElement** (Any?) - The currently focused accessibility element. #### Response Example ```json { "focusedElement": "" } ``` ``` ```APIDOC ## GET /accessibility/hearingDevicePairedEar ### Description Retrieves the current pairing status of Made for iPhone hearing devices. ### Method GET ### Endpoint /accessibility/hearingDevicePairedEar ### Response #### Success Response (200) - **hearingDevicePairedEar** (UIAccessibility.HearingDeviceEar) - The current pairing status. #### Response Example ```json { "hearingDevicePairedEar": "left" } ``` ``` ```APIDOC ## POST /accessibility/registerGestureConflictWithZoom ### Description Warns users that app-specific gestures conflict with the system-defined Zoom accessibility gestures. ### Method POST ### Endpoint /accessibility/registerGestureConflictWithZoom ### Response #### Success Response (200) Indicates the warning was registered. #### Response Example ```json { "status": "registered" } ``` ``` ```APIDOC ## POST /accessibility/requestGuidedAccessSession ### Description Transitions the app to or from Single App mode asynchronously. ### Method POST ### Endpoint /accessibility/requestGuidedAccessSession ### Parameters #### Request Body - **enabled** (Bool) - Required - Whether to enable or disable Guided Access. ### Request Example ```json { "enabled": true } ``` ### Response #### Success Response (200) - **success** (Bool) - True if the session transition was successful, false otherwise. #### Response Example ```json { "success": true } ``` ``` ```APIDOC ## POST /accessibility/zoomFocusChanged ### Description Notifies the system when the app’s focus changes to a new location. ### Method POST ### Endpoint /accessibility/zoomFocusChanged ### Parameters #### Request Body - **zoomType** (UIAccessibility.ZoomType) - Required - The type of zoom. - **toFrame** (CGRect) - Required - The frame to focus on. - **view** (UIView) - Required - The view containing the focused frame. ### Request Example ```json { "zoomType": "default", "toFrame": {"x": 50, "y": 50, "width": 100, "height": 100}, "view": "" } ``` ### Response #### Success Response (200) Indicates the focus change was registered. #### Response Example ```json { "status": "registered" } ``` ``` -------------------------------- ### Storyboards Source: https://developer.apple.com/documentation/uikit/resource-management Learn how to customize segue-based presentations, pass data between view controllers, and dismiss view controllers using unwind segues. ```APIDOC ## Storyboards ### Description Customizing the behavior of segue-based presentations, passing data between view controllers, and programmatically controlling segues. ### Topics - Customizing segue-based presentations - Passing data between view controllers during a segue - Programmatically controlling segue execution - Dismissing a view controller with an unwind segue ### Classes - `class UIStoryboard`: An encapsulation of the design-time view controller graph represented in an Interface Builder storyboard resource file. - `class UIStoryboardSegue`: An object that prepares for and performs the visual transition between two view controllers. - `class UIStoryboardUnwindSegueSource`: An encapsulation of information about an unwind segue. ``` -------------------------------- ### Nib Files Source: https://developer.apple.com/documentation/uikit/resource-management Details on using UINib to load Interface Builder nib files for creating custom views and cell layouts. ```APIDOC ## Nib Files ### Description Loading and using Interface Builder nib files to define custom UI elements. ### Class - `class UINib`: An object that contains Interface Builder nib files. ``` -------------------------------- ### View Fundamentals Source: https://developer.apple.com/documentation/uikit/views-and-controls Details on the `UIView` class, the foundational object for managing content in a rectangular screen area. ```APIDOC ## UIView Class ### Description `UIView` is the fundamental object that manages the content for a rectangular region of your screen. It serves as the base class for all visual elements in UIKit, defining common behaviors for drawing, layout, and event handling. ### Class `UIView` ### Usage - Manages content within a rectangular area. - Can host other views, forming a hierarchy. - Responds to touch events. - Supports custom drawing and layout. ### Related Topics - **UIKit Catalog: Creating and customizing views and controls**: For examples and best practices. ``` -------------------------------- ### Text Manipulations Source: https://developer.apple.com/documentation/uikit/text-display-and-fonts Initializers for converting text alignment constants between UIKit and Core Text. ```APIDOC ## Text Manipulations ### init(NSTextAlignment) Converts a UIKit text alignment constant value to the matching constant value that Core Text uses. ### init(CTTextAlignment) Converts a Core Text alignment constant value to the matching constant value in UIKit. ``` -------------------------------- ### Text Views for Text Handling Source: https://developer.apple.com/documentation/uikit/views-and-controls Documentation for text-related views like `UILabel`, `UITextField`, and `UITextView`. ```APIDOC ## Text Views ### Description Text views are used to display and edit text within your application's interface. ### Text View Classes - **`UILabel`**: Displays one or more lines of non-editable informational text. - **`UITextField`**: Provides a single line of editable text input. - **`UITextView`**: Offers a scrollable region for editing multiline text. ### Related Topics - **Drag and drop customization**: Extending drag and drop support for text views. ``` -------------------------------- ### UIScreen API Overview Source: https://developer.apple.com/documentation/uikit/windows-and-screens The UIScreen class provides information about the hardware-based display, including resolution and scale. ```APIDOC ## CLASS UIScreen ### Description An object that defines the properties associated with a hardware-based display. ### Properties - **bounds** (CGRect) - The bounding rectangle of the screen. - **scale** (CGFloat) - The scale factor associated with the screen. - **main** (UIScreen) - The screen object representing the device's main display. ``` -------------------------------- ### UIWindow API Overview Source: https://developer.apple.com/documentation/uikit/windows-and-screens The UIWindow class acts as the primary container for an app's view hierarchy and handles event dispatching. ```APIDOC ## CLASS UIWindow ### Description The backdrop for your app’s user interface and the object that dispatches events to your views. ### Properties - **rootViewController** (UIViewController) - The root view controller for the window. - **isKeyWindow** (Bool) - A Boolean value indicating whether the window is the key window for the app. ### Methods - **makeKeyAndVisible()** - Makes the window the key window and shows it on the screen. ``` -------------------------------- ### Overview of Views and Controls Source: https://developer.apple.com/documentation/uikit/views-and-controls Views and controls are the fundamental visual elements in UIKit for building user interfaces. They manage content, respond to user interactions, and form the structure of an app's display. ```APIDOC ## Overview of Views and Controls ### Description Views and controls are the visual building blocks of your app’s user interface. Use them to draw and organize your app’s content onscreen. Views can host other views, creating view hierarchies for easier management. They are essential for responding to events, drawing custom content, supporting drag and drop, and animating appearance attributes. `UIView` is the base class for all views, while `UIControl` extends this for interactive elements like buttons and switches. ### Key Concepts - **View Hierarchies**: Organizing views by embedding them within others (superview/subview relationships). - **Event Handling**: Responding to user touches and gestures. - **Custom Drawing**: Using Core Graphics or UIKit to render custom content. - **Interactivity**: `UIControl` provides a base for elements that gather user input. ``` -------------------------------- ### Bar Navigation API Source: https://developer.apple.com/documentation/uikit/views-and-controls Components for managing navigation bars, tab bars, and toolbars. ```APIDOC ## Bar Navigation Components ### Description Manages items displayed on navigation bars, tab bars, search bars, and toolbars. ### Key Classes - **UINavigationBar**: Top-level navigation controls. - **UITabBar**: Bottom-level selection between subtasks or modes. - **UIToolbar**: Edge-based button container. - **UISearchBar**: Specialized view for search input. - **UIBarButtonItem**: Specialized button for bars. ### Protocols - **UIBarPositioning**: Defines positioning logic for bars. - **UIBarPositioningDelegate**: Delegate methods for bar positioning. ``` -------------------------------- ### Text Views Source: https://developer.apple.com/documentation/uikit/text-display-and-fonts Classes for displaying and editing text within your interface. ```APIDOC ## Text Views ### UILabel A view that displays one or more lines of informational text. ### UITextField An object that displays an editable text area in your interface. ### UITextView A scrollable, multiline text region. ### Drag and Drop Customization Extend the standard drag and drop support for text views to include custom types of content. ``` -------------------------------- ### Font Picker Source: https://developer.apple.com/documentation/uikit/text-display-and-fonts View controller and delegate for selecting fonts. ```APIDOC ## Font Picker ### UIFontPickerViewController A view controller that manages the interface for selecting a font that the system provides or the user installs. ### UIFontPickerViewControllerDelegate A set of optional methods for receiving messages about the user’s interaction with the font picker. ### Configuration The filters and display settings a font picker view controller uses to set up a font picker. ``` -------------------------------- ### Text Formatting Source: https://developer.apple.com/documentation/uikit/text-display-and-fonts Objects for coordinating and handling text formatting. ```APIDOC ## Text Formatting ### UITextFormattingCoordinator An object that coordinates text formatting using the standard Mac font panel. ### UITextAttributesConversionHandler A handler for updating text with current font panel settings. ``` -------------------------------- ### UIWritingToolsBehavior Source: https://developer.apple.com/documentation/uikit/writing-tools Configuration enum to define how Writing Tools should behave within standard UIKit text views. ```APIDOC ## UIWritingToolsBehavior ### Description Constants that specify the writing tools experience for the underlying view. ### Method Enum ### Endpoint UIKit.UIWritingToolsBehavior ### Parameters #### Options - **default** - Standard system behavior. - **none** - Disables Writing Tools for the specific view. - **limited** - Restricts the types of suggestions provided by the LLM. ### Request Example textView.writingToolsBehavior = .default ``` -------------------------------- ### UIWritingToolsCoordinator Source: https://developer.apple.com/documentation/uikit/writing-tools The coordinator class manages the interaction between the system Writing Tools and custom text views, allowing developers to integrate LLM-powered text editing. ```APIDOC ## UIWritingToolsCoordinator ### Description An object that manages interactions between Writing Tools and your custom text view. ### Method N/A (Class) ### Endpoint UIKit.UIWritingToolsCoordinator ### Parameters #### Properties - **delegate** (UIWritingToolsCoordinatorDelegate) - Required - The object that handles the interaction lifecycle. - **context** (UIWritingToolsCoordinator.Context) - Required - The data object containing the text to be processed. ### Request Example let coordinator = UIWritingToolsCoordinator(view: myCustomView) ### Response #### Success Response - **status** (void) - Initializes the coordinator to facilitate text replacement and animation handling. ``` -------------------------------- ### Metrics Source: https://developer.apple.com/documentation/uikit/text-display-and-fonts Classes for representing positions, ranges, and selection rectangles in text. ```APIDOC ## Metrics ### UITextPosition A position in a text container—that is, an index into the backing string in a text-display view. ### UITextRange A range of characters in a text container with a starting index and an ending index in string backing a text-entry object. ### UITextSelectionRect An encapsulation of information about a selected range of text in a document. ``` -------------------------------- ### Assets Source: https://developer.apple.com/documentation/uikit/resource-management Information on managing image assets and data assets within your application's asset catalog. ```APIDOC ## Assets ### Description Managing images, strings, and other resources stored in asset catalogs. ### Classes - `class UIImageAsset`: A container for a collection of images that represent multiple ways of describing a single piece of artwork. - `class NSDataAsset`: An object from a data set type stored in an asset catalog. ``` -------------------------------- ### Controls for User Interaction Source: https://developer.apple.com/documentation/uikit/views-and-controls Information on `UIControl` and its subclasses like `UIButton`, `UIDatePicker`, `UISwitch`, etc., used for gathering user input. ```APIDOC ## Controls ### Description Controls are visual elements that gather input and respond to user interactions. They are built upon the `UIControl` class, which defines behaviors specific to interactive views. ### Base Class - **`UIControl`**: The base class for controls, handling user interactions and state changes. ### Common Controls - **`UIButton`**: Executes custom code in response to user taps. - **`UIColorWell`**: Allows users to pick a color. - **`UIDatePicker`**: Provides an interface for selecting date and time values. - **`UIPageControl`**: Indicates the current page in a series of pages. - **`UISegmentedControl`**: Presents a row of segments, each acting as a discrete button. - **`UISlider`**: Allows selection of a single value from a continuous range. - **`UIStepper`**: Increments or decrements a value. - **`UISwitch`**: Offers a binary choice (e.g., on/off). ### Event Handling - **Responding to control-based events using target-action**: Connect controls to your app's logic using the target-action design pattern. ``` -------------------------------- ### Check Accessibility System Capabilities Source: https://developer.apple.com/documentation/uikit/accessibility-for-uikit Queries the current state of various system accessibility settings such as VoiceOver, AssistiveTouch, or Reduce Motion. These properties return a boolean value indicating if the specific feature is currently enabled. ```swift if UIAccessibility.isVoiceOverRunning { // Handle VoiceOver specific logic } ``` -------------------------------- ### Container Views Source: https://developer.apple.com/documentation/uikit/views-and-controls Information on container views used for organizing and presenting data, including Collection Views, Table Views, and Stack Views. ```APIDOC ## Container Views ### Description Container views are specialized views used to organize and present large data sets or manage the layout of other views. They provide structure and efficient ways to display information. ### Types of Container Views - **Collection Views**: Display nested views using configurable and customizable layouts, ideal for grid-like structures. - **Table Views**: Present data in a single column of customizable rows, suitable for lists. - **`UIStackView`**: Arranges a collection of views in either a column or a row, simplifying layout management. - **`UIScrollView`**: Enables scrolling and zooming of its contained views, useful for content that exceeds screen dimensions. ### Related Topics - **Autosizing views for localization in iOS**: Techniques for adapting view layouts for different languages. ``` -------------------------------- ### Fonts Source: https://developer.apple.com/documentation/uikit/text-display-and-fonts Classes and methods for managing and scaling fonts. ```APIDOC ## Fonts ### Scaling Fonts Automatically Scale text in your interface automatically using Dynamic Type. ### Adding a Custom Font to Your App Add a custom font to your app and use it in your app’s interface. ### UIFont An object that provides access to the font’s characteristics. ### UIFontDescriptor A collection of attributes that describes a font. ### SymbolicTraits Constants that describe the stylistic aspects of a font. ### UIFontMetrics A utility object for obtaining custom fonts that scale to support Dynamic Type. ``` -------------------------------- ### UIPrintInteractionController Source: https://developer.apple.com/documentation/uikit/printing Manages the system print interface for documents and images. ```APIDOC ## CLASS UIPrintInteractionController ### Description A user interface that manages the printing of documents, images, and other printable content in iOS. ### Usage Use this controller to present the standard system print panel to the user and manage the print job lifecycle. ### Key Properties - **shared** (UIPrintInteractionController) - The shared print interaction controller for the application. - **printInfo** (UIPrintInfo) - Information about the print job. - **printFormatter** (UIPrintFormatter) - The formatter used to lay out content. ### Example ```swift let printController = UIPrintInteractionController.shared printController.printInfo = myPrintInfo printController.present(animated: true) ``` ``` -------------------------------- ### Capabilities API Source: https://developer.apple.com/documentation/uikit/accessibility-for-uikit APIs to check the status of various accessibility features. ```APIDOC ## GET /accessibility/capabilities ### Description Retrieves the status of various accessibility capabilities. ### Method GET ### Endpoint /accessibility/capabilities ### Response #### Success Response (200) - **isAssistiveTouchRunning** (Bool) - Indicates if AssistiveTouch is running. - **isVoiceOverRunning** (Bool) - Indicates if VoiceOver is running. - **isSwitchControlRunning** (Bool) - Indicates if Switch Control is running. - **isShakeToUndoEnabled** (Bool) - Indicates if Shake to Undo is enabled. - **isClosedCaptioningEnabled** (Bool) - Indicates if Closed Captions are enabled. - **isBoldTextEnabled** (Bool) - Indicates if Bold Text is enabled. - **isDarkerSystemColorsEnabled** (Bool) - Indicates if Darker System Colors (Increase Contrast) is enabled. - **isGrayscaleEnabled** (Bool) - Indicates if Grayscale is enabled. - **isGuidedAccessEnabled** (Bool) - Indicates if Guided Access is enabled. - **isInvertColorsEnabled** (Bool) - Indicates if Invert Colors is enabled. - **isMonoAudioEnabled** (Bool) - Indicates if Mono Audio is enabled. - **isReduceMotionEnabled** (Bool) - Indicates if Reduce Motion is enabled. - **isReduceTransparencyEnabled** (Bool) - Indicates if Reduce Transparency is enabled. - **isSpeakScreenEnabled** (Bool) - Indicates if Speak Screen is enabled. - **isSpeakSelectionEnabled** (Bool) - Indicates if Speak Selection is enabled. - **isOnOffSwitchLabelsEnabled** (Bool) - Indicates if On/Off Switch Labels are enabled. - **isVideoAutoplayEnabled** (Bool) - Indicates if Video Autoplay is enabled. - **buttonShapesEnabled** (Bool) - Indicates if Button Shapes are enabled. - **prefersCrossFadeTransitions** (Bool) - Indicates if Prefer Cross-Fade Transitions is enabled. - **shouldDifferentiateWithoutColor** (Bool) - Indicates if Differentiate Without Color is enabled. #### Response Example ```json { "isAssistiveTouchRunning": true, "isVoiceOverRunning": false, "isSwitchControlRunning": false, "isShakeToUndoEnabled": false, "isClosedCaptioningEnabled": false, "isBoldTextEnabled": true, "isDarkerSystemColorsEnabled": false, "isGrayscaleEnabled": false, "isGuidedAccessEnabled": false, "isInvertColorsEnabled": false, "isMonoAudioEnabled": false, "isReduceMotionEnabled": true, "isReduceTransparencyEnabled": false, "isSpeakScreenEnabled": false, "isSpeakSelectionEnabled": false, "isOnOffSwitchLabelsEnabled": false, "isVideoAutoplayEnabled": true, "buttonShapesEnabled": false, "prefersCrossFadeTransitions": false, "shouldDifferentiateWithoutColor": false } ``` ``` -------------------------------- ### Visual Effects API Source: https://developer.apple.com/documentation/uikit/views-and-controls Endpoints and classes for implementing blur and vibrancy effects within UIKit views. ```APIDOC ## Visual Effects Classes ### Description Provides classes for applying visual effects like blur and vibrancy to content layered behind a view. ### Classes - **UIVisualEffect**: Base class for visual effects. - **UIVisualEffectView**: Container for implementing complex visual effects. - **UIBlurEffect**: Applies a blur effect to underlying content. - **UIVibrancyEffect**: Amplifies and adjusts colors of content behind a visual effect view. ``` -------------------------------- ### UIAlertController API Overview Source: https://developer.apple.com/documentation/uikit/windows-and-screens The UIAlertController class is used to present alerts and action sheets to the user. ```APIDOC ## CLASS UIAlertController ### Description An object that displays an alert message or action sheet to the user. ### Methods - **alertController(title:message:preferredStyle:)** - Creates an alert controller with the specified title, message, and style. - **addAction(UIAlertAction)** - Adds an action to the alert. ### Request Example let alert = UIAlertController(title: "Alert", message: "Important message", preferredStyle: .alert) ``` -------------------------------- ### Content Views Source: https://developer.apple.com/documentation/uikit/views-and-controls Details on various content views like `UIActivityIndicatorView`, `UICalendarView`, `UIImageView`, `UIPickerView`, and `UIProgressView`. ```APIDOC ## Content Views ### Description Content views are specific types of views designed to display particular kinds of information or indicate task status. ### Common Content Views - **`UIActivityIndicatorView`**: Shows that a task is currently in progress. - **`UICalendarView`**: Displays a calendar, allowing date selection and decoration. - **`UIContentUnavailableView`**: Indicates that there is no content to display. - **`UIImageView`**: Displays a single image or a sequence of animated images. - **`UIPickerView`**: Presents one or more sets of values using a spinning-wheel or slot-machine metaphor. - **`UIProgressView`**: Depicts the progress of a task over time. ``` -------------------------------- ### Coordinate Conversion API Source: https://developer.apple.com/documentation/uikit/accessibility-for-uikit APIs for converting view coordinates to screen coordinates. ```APIDOC ## POST /conversions/screenCoordinates ### Description Converts the specified rectangle or path from view coordinates to screen coordinates. ### Method POST ### Endpoint /conversions/screenCoordinates ### Parameters #### Request Body - **viewCoordinates** (CGRect or UIBezierPath) - Required - The coordinates or path to convert. - **view** (UIView) - Required - The view whose coordinate system is used for the conversion. ### Request Example ```json { "viewCoordinates": {"x": 10, "y": 20, "width": 50, "height": 50}, "view": "" } ``` ### Response #### Success Response (200) - **screenCoordinates** (CGRect or UIBezierPath) - The converted coordinates or path in screen space. #### Response Example ```json { "screenCoordinates": {"x": 100, "y": 120, "width": 50, "height": 50} } ``` ``` -------------------------------- ### Notifications API Source: https://developer.apple.com/documentation/uikit/accessibility-for-uikit APIs for posting and handling accessibility notifications. ```APIDOC ## POST /notifications ### Description Posts a notification to assistive apps. ### Method POST ### Endpoint /notifications ### Parameters #### Request Body - **notification** (UIAccessibility.Notification) - Required - The name of the notification to post. - **argument** (Any?) - Optional - An argument associated with the notification. ### Request Example ```json { "notification": "someNotificationName", "argument": null } ``` ### Response #### Success Response (200) Indicates the notification was successfully posted. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Text Bounds Sizing Source: https://developer.apple.com/documentation/uikit/text-display-and-fonts Protocol for handling text with fonts containing oversize characters. ```APIDOC ## Text Bounds Sizing ### UILetterformAwareAdjusting The typographic bounds-sizing behavior to handle text with fonts that contain oversize characters. ``` -------------------------------- ### Convert Coordinates to Screen Space Source: https://developer.apple.com/documentation/uikit/accessibility-for-uikit Converts a CGRect or UIBezierPath from the coordinate system of a specific UIView to screen coordinates. This is essential for positioning accessibility elements correctly relative to the screen. ```swift let screenRect = UIAccessibility.convertToScreenCoordinates(view.bounds, in: view) ``` -------------------------------- ### UIPrintPageRenderer Source: https://developer.apple.com/documentation/uikit/printing Handles the drawing of pages for print jobs. ```APIDOC ## CLASS UIPrintPageRenderer ### Description An object that draws pages of content to print, with or without the assistance of print formatters. ### Methods - **drawPage(at:in:)** - Draws the content for a specific page. - **prepare(forDrawingPages:)** - Prepares the renderer for a range of pages. ### Usage Subclass UIPrintPageRenderer to provide custom drawing logic for complex print layouts. ``` -------------------------------- ### Post Accessibility Notifications Source: https://developer.apple.com/documentation/uikit/accessibility-for-uikit Posts a notification to assistive apps to inform them of changes in the user interface. This method takes a notification type and an optional argument. ```swift UIAccessibility.post(notification: .layoutChanged, argument: nil) ``` -------------------------------- ### Search Field Source: https://developer.apple.com/documentation/uikit/views-and-controls Details on `UISearchTextField` and `UISearchToken` for implementing search functionality. ```APIDOC ## Search Field ### Description Search fields provide a dedicated interface for users to enter search queries and for displaying search criteria. ### Components - **`UISearchTextField`**: A view specifically designed for displaying and editing text, including search tokens. - **`UISearchToken`**: Represents a search criterion, typically displayed with text and an optional icon within a search field. ### Delegate Protocol - **`protocol UISearchTextFieldDelegate`**: Defines methods for customizing the behavior and responding to events of a search field. ``` -------------------------------- ### Spell Checking Source: https://developer.apple.com/documentation/uikit/text-display-and-fonts Object for checking strings for misspelled words. ```APIDOC ## Spell Checking ### UITextChecker An object to check a string (usually the text of a document) for misspelled words. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.