UNPKG

@nativescript/core

Version:

A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.

63 lines (62 loc) 3.07 kB
import { Position, View } from '..'; export * from './view-helper-common'; export declare const AndroidHelper = 0; declare class UILayoutViewController extends UIViewController { owner: WeakRef<View>; static initWithOwner(owner: WeakRef<View>): UILayoutViewController; viewDidLoad(): void; viewWillLayoutSubviews(): void; viewDidLayoutSubviews(): void; viewWillAppear(animated: boolean): void; viewDidDisappear(animated: boolean): void; traitCollectionDidChange(previousTraitCollection: UITraitCollection): void; } declare class UIAdaptivePresentationControllerDelegateImp extends NSObject implements UIAdaptivePresentationControllerDelegate { static ObjCProtocols: { prototype: UIAdaptivePresentationControllerDelegate; }[]; private owner; private closedCallback; static initWithOwnerAndCallback(owner: WeakRef<View>, whenClosedCallback: Function): UIAdaptivePresentationControllerDelegateImp; presentationControllerDidDismiss(presentationController: UIPresentationController): void; } declare class UIPopoverPresentationControllerDelegateImp extends NSObject implements UIPopoverPresentationControllerDelegate { static ObjCProtocols: { prototype: UIPopoverPresentationControllerDelegate; }[]; private owner; private closedCallback; static initWithOwnerAndCallback(owner: WeakRef<View>, whenClosedCallback: Function): UIPopoverPresentationControllerDelegateImp; popoverPresentationControllerDidDismissPopover(popoverPresentationController: UIPopoverPresentationController): void; } export declare class IOSHelper { static traitCollectionColorAppearanceChangedEvent: string; static UILayoutViewController: typeof UILayoutViewController; static UIAdaptivePresentationControllerDelegateImp: typeof UIAdaptivePresentationControllerDelegateImp; static UIPopoverPresentationControllerDelegateImp: typeof UIPopoverPresentationControllerDelegateImp; static getParentWithViewController(view: View): View; static updateAutoAdjustScrollInsets(controller: UIViewController, owner: View): void; /** * This method simulates the iOS 11+ safeAreaLayoutGuide property and its constraints for older versions. * * @param controller * @param owner */ static updateConstraints(controller: UIViewController, owner: View): void; /** * This method simulates the iOS 11+ safeAreaLayoutGuide property for older versions. * * @param controller */ static initLayoutGuide(controller: UIViewController): UILayoutGuide; static layoutView(controller: UIViewController, owner: View): void; static getPositionFromFrame(frame: CGRect): Position; static getFrameFromPosition(position: Position, insets?: Position): CGRect; static shrinkToSafeArea(view: View, frame: CGRect): CGRect; static expandBeyondSafeArea(view: View, frame: CGRect): CGRect; static getAvailableSpaceFromParent(view: View, frame: CGRect): { safeArea: CGRect; fullscreen: CGRect; inWindow: CGRect; }; }