UNPKG

1.43 kBTypeScriptView Raw
1export interface NativeScriptUIView extends UIView {
2 hasNonUniformBorder: boolean;
3 hasNonUniformBorderColor: boolean;
4 borderLayer: CAShapeLayer;
5
6 maskType: ios.LayerMaskType;
7 originalMask: CALayer;
8
9 gradientLayer: CAGradientLayer;
10 outerShadowContainerLayer: CALayer;
11}
12
13export namespace ios {
14 export type LayerMaskType = 'BORDER' | 'CLIP_PATH';
15 export namespace LayerMask {
16 export const BORDER = 'BORDER';
17 export const CLIP_PATH = 'CLIP_PATH';
18 }
19
20 /**
21 * Gets actual height of a [UIView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/) widget in device pixels.
22 * @param uiView - An instance of UIView.
23 */
24 export function getActualHeight(uiView: any /* UIView */): number;
25
26 /**
27 * Gets the height of the status bar in device pixels.
28 * @param viewController when specified it is used to check preferStatusBarHidden property.
29 */
30 export function getStatusBarHeight(viewController?: any): number;
31
32 /**
33 * Draw gradient using CAGradientLayer and insert into UIView sublayer
34 * @param nativeView NativeScriptUIView
35 * @param gradientLayer CAGradientLayer
36 * @param gradient Parsed LinearGradient
37 * @param gradientLayerOpacity Initial layer opacity (in case you'd like to use with animation sequence)
38 */
39 export function drawGradient(uiView: NativeScriptUIView, gradientLayer: CAGradientLayer, gradient: LinearGradient, gradientLayerOpacity?: number): void;
40}