mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 13:51:27 +08:00
feat(root-layout): support gradient colors on shade cover (#9626)
Co-authored-by: William Juan <williamjuan027@gmail.com>
This commit is contained in:
32
packages/core/ui/utils.d.ts
vendored
32
packages/core/ui/utils.d.ts
vendored
@ -1,4 +1,19 @@
|
||||
export namespace ios {
|
||||
export interface NativeScriptUIView extends UIView {
|
||||
hasNonUniformBorder: boolean;
|
||||
borderLayer: CALayer;
|
||||
|
||||
hasBorderMask: boolean;
|
||||
borderOriginalMask: CALayer;
|
||||
|
||||
topBorderLayer: CALayer;
|
||||
rightBorderLayer: CALayer;
|
||||
bottomBorderLayer: CALayer;
|
||||
leftBorderLayer: CALayer;
|
||||
|
||||
gradientLayer: CAGradientLayer;
|
||||
boxShadowLayer: CALayer;
|
||||
}
|
||||
export namespace ios {
|
||||
/**
|
||||
* Gets actual height of a [UIView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/) widget in device pixels.
|
||||
* @param uiView - An instance of UIView.
|
||||
@ -10,4 +25,19 @@
|
||||
* @param viewController when specified it is used to check preferStatusBarHidden property.
|
||||
*/
|
||||
export function getStatusBarHeight(viewController?: any): number;
|
||||
|
||||
/**
|
||||
* draw gradient using CAGradientLayer and insert into UIView sublayer
|
||||
* @param nativeView UIView
|
||||
* @param gradient Parsed LinearGradient
|
||||
* @param gradientLayerOpacity Initial layer opacity (in case you'd like to use with animation sequence)
|
||||
* @param index sublayer index to insert layer at (defaults to 0)
|
||||
*/
|
||||
export function drawGradient(uiView: any /* UIView */, gradient: LinearGradient, gradientLayerOpacity?: number, index?: number): any; /* CAGradientLayer */
|
||||
|
||||
/**
|
||||
* clear gradientLayer if found on provided UIView
|
||||
* @param nativeView UIView
|
||||
*/
|
||||
export function clearGradient(uiView: any /* UIView */): void;
|
||||
}
|
||||
|
Reference in New Issue
Block a user