UNPKG

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