Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UIScrollView

Hierarchy

Index

Constructors

constructor

Properties

Readonly entity

entity: Entity2D

物体对象。

Readonly id

id: number = ...

Readonly isDestroyed

isDestroyed: boolean = false

Readonly isDestroying

isDestroying: boolean = false

Readonly priority

priority: number = ...

Static Movement

Movement: Readonly<typeof Movement> = ...

UIScrollView具有的滑动方向类型枚举值

static
memberof

UIScrollView

Static MovementType

MovementType: Readonly<typeof Movement> = ...
deprecated

Static Priority

Priority: { Align: number; Layout: number; Low: number; Physics: number; Render: number; Tool: number } = ...

Type declaration

  • Align: number
  • Layout: number
  • Low: number
  • Physics: number
  • Render: number
  • Tool: number

Static Optional Serialize

Serialize: (...args: any[]) => any

Type declaration

    • (...args: any[]): any
    • Parameters

      • Rest ...args: any[]

      Returns any

Accessors

active

  • get active(): boolean
  • set active(value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

activeInHierarchy

  • get activeInHierarchy(): boolean
  • 在场景树中是否active

    readonly
    memberof

    Component

    Returns boolean

autoFix

  • get autoFix(): boolean
  • set autoFix(val: boolean): void
  • 默认值为false,是否开启组件根据内容区域大小与滑动区域大小(对应Transform2D大小),将内容区域移动到相对于当前组件的对齐位置,内容区域只会根据UIScrollView第一层子元素大小进行位置适配。

    memberof

    UIScrollView

    Returns boolean

  • 默认值为false,是否开启组件根据内容区域大小与滑动区域大小(对应Transform2D大小),将内容区域移动到相对于当前组件的对齐位置,内容区域只会根据UIScrollView第一层子元素大小进行位置适配。

    Parameters

    • val: boolean

    Returns void

cellAlignmentX

  • get cellAlignmentX(): number
  • set cellAlignmentX(val: number): void
  • 默认值为0,在autoFix情况下,内容区域位于滑动区域(对应Transform2D大小)水平方向的相对位置,取值范围(0-1)。

    memberof

    UIScrollView

    Returns number

  • 默认值为0,在autoFix情况下,内容区域位于滑动区域(对应Transform2D大小)水平方向的相对位置,取值范围(0-1)。

    Parameters

    • val: number

    Returns void

cellAlignmentY

  • get cellAlignmentY(): number
  • set cellAlignmentY(val: number): void
  • 默认值为1,在autoFix情况下,内容区域位于滑动区域(对应Transform2D大小)垂直方向的相对位置,取值范围(0-1)。

    memberof

    UIScrollView

    Returns number

  • 默认值为1,在autoFix情况下,内容区域位于滑动区域(对应Transform2D大小)垂直方向的相对位置,取值范围(0-1)。

    Parameters

    • val: number

    Returns void

disableDragIfFits

  • get disableDragIfFits(): boolean
  • set disableDragIfFits(val: boolean): void
  • 默认值true,内容区域尺寸小于滑动区域(对应Transform2D大小)时,是否禁止滑动。

    memberof

    UIScrollView

    Returns boolean

  • 默认值true,内容区域尺寸小于滑动区域(对应Transform2D大小)时,是否禁止滑动。

    Parameters

    • val: boolean

    Returns void

maxContextMove

  • get maxContextMove(): number
  • set maxContextMove(val: number): void
  • 相对于滑动起点的,最大滑动距离,若设定,则UIScrollView自动计算最大滑动距离逻辑失效,最大值固定取该值。

    memberof

    UIScrollView

    Returns number

  • 相对于滑动起点的,最大滑动距离,若设定,则UIScrollView自动计算最大滑动距离逻辑失效,最大值固定取该值。

    Parameters

    • val: number

    Returns void

minContextMove

  • get minContextMove(): number
  • set minContextMove(val: number): void
  • 相对于滑动起点的,最小滑动距离,若设定,则UIScrollView自动计算最小滑动距离逻辑失效,最小值固定取该值。

    memberof

    UIScrollView

    Returns number

  • 相对于滑动起点的,最小滑动距离,若设定,则UIScrollView自动计算最小滑动距离逻辑失效,最小值固定取该值。

    Parameters

    • val: number

    Returns void

moveDistance

  • get moveDistance(): number
  • 只读属性,相对于滑动起点,正向的已滑动的距离。

    memberof

    UIScrollView

    Returns number

movement

  • get movement(): Movement
  • set movement(val: Movement): void
  • Movement类型,UIScrollView的滑动方向。

    memberof

    UIScrollView

    Returns Movement

  • Movement类型,UIScrollView的滑动方向。

    Parameters

    • val: Movement

    Returns void

onClick

  • get onClick(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 点击事件,只有触发过触摸开始事件才可能触发。

    readonly
    memberof

    Touchable

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onReachEnd

  • get onReachEnd(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • Delegate<this, TouchInputEvent> | 返回UIScrollView到底行为的Delegate,通过add方法添加事件。

    readonly
    memberof

    UIScrollView

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onReachStart

  • get onReachStart(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 返回UIScrollView到顶行为的Delegate,通过add方法添加事件。

    readonly
    memberof

    UIScrollView

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onScroll

  • get onScroll(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 返回UIScrollView到顶行为的Delegate,通过add方法添加事件。

    readonly
    memberof

    UIScrollView

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onTouchCancel

  • get onTouchCancel(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 触摸取消事件,只有触发过触摸开始事件才可能触发。

    readonly
    memberof

    Touchable

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onTouchEnd

  • get onTouchEnd(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 触摸结束事件,只有触发过触摸开始事件才可能触发。

    readonly
    memberof

    Touchable

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onTouchEnter

  • get onTouchEnter(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 触摸进入事件,只有触发过触摸开始事件才可能触发。

    readonly
    memberof

    Touchable

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onTouchLeave

  • get onTouchLeave(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 触摸离开事件,只有触发过触摸开始事件才可能触发。

    readonly
    memberof

    Touchable

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onTouchMove

  • get onTouchMove(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 触摸移动事件,只有触发过触摸开始事件才可能触发。

    readonly
    memberof

    Touchable

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onTouchOut

  • get onTouchOut(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 触摸掠过后移出事件,没有触发过触摸开始事件才能触发。

    readonly
    memberof

    Touchable

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onTouchOver

  • get onTouchOver(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 触摸掠过事件,没有触发过触摸开始事件才能触发。

    readonly
    memberof

    Touchable

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onTouchStart

  • get onTouchStart(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 触摸开始事件。

    readonly
    memberof

    Touchable

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

onTouchUp

  • get onTouchUp(): Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>
  • 触摸掠过后移出事件,没有触发过触摸开始事件才能触发。

    readonly
    memberof

    Touchable

    Returns Delegate<this, Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>>

snapToEnd

  • get snapToEnd(): boolean
  • set snapToEnd(val: boolean): void
  • 默认值为false,滑动到底后(大于maxContentMove),是否允许继续滑动

    memberof

    UIScrollView

    Returns boolean

  • 默认值为false,滑动到底后(大于maxContentMove),是否允许继续滑动

    Parameters

    • val: boolean

    Returns void

snapToStart

  • get snapToStart(): boolean
  • set snapToStart(val: boolean): void
  • 默认值为false,滑动到顶后(小于minContentMove),是否允许继续滑动

    memberof

    UIScrollView

    Returns boolean

  • 默认值为false,滑动到顶后(小于minContentMove),是否允许继续滑动

    Parameters

    • val: boolean

    Returns void

Methods

clearMinMax

  • clearMinMax(): void
  • 清理设定的最大最小,取消后会恢复使用自动生成最大最小距离逻辑。

    memberof

    UIScrollView

    Returns void

destroy

  • destroy(): void
  • Returns void

disableScroll

  • disableScroll(): void
  • 停止UIScrollView滑动

    memberof

    UIScrollView

    Returns void

enableScroll

  • enableScroll(): void
  • 开启UIScrollView滑动

    memberof

    UIScrollView

    Returns void

getTypeName

  • getTypeName(): string

isDetached

  • isDetached(): boolean
  • Returns boolean

off

  • off(): void
  • Returns void

on

  • on(): void
  • Returns void

refreshMove

  • refreshMove(): void
  • 清空当前滑动了的距离,并重新初始化

    memberof

    UIScrollView

    Returns void

resetProperties

  • resetProperties(): void

scrollTo

  • scrollTo(pos: number): void
  • 组件滑动到,pos对应的滑动距离

    memberof

    UIScrollView

    Parameters

    • pos: number

    Returns void

setMinMax

  • setMinMax(min: number, max: number): void
  • 设置设定的最大最小滑动距离,若设定则优先使用这两个值。

    memberof

    UIScrollView

    Parameters

    • min: number
    • max: number

    Returns void

Generated using TypeDoc