One Logo Pool Ball
GameplayKit · IOS API REFERENCE

GKBehavior

class · iOS 9.0+ · SDK 27.1

class GKBehavior

Members (11)

init · iOS 9.0+

init

TypeScript
static initGoalWeight(goal: GKGoal, weight: number): GKBehavior
Swift declaration
convenience init(goal: GKGoal, weight: Float)
init · iOS 9.0+

init

TypeScript
static initGoals(goals: Array<GKGoal>): GKBehavior
Swift declaration
convenience init(goals: [GKGoal])
init · iOS 9.0+

init

TypeScript
static initGoalsAndWeights(goals: Array<GKGoal>, weights: Array<_Foundation_NSNumber>): GKBehavior
Swift declaration
convenience init(goals: [GKGoal], andWeights weights: [NSNumber])
init · iOS 9.0+

init

TypeScript
static initWeightedGoals(weightedGoals: NativeMap<GKGoal, _Foundation_NSNumber>): GKBehavior
Swift declaration
convenience init(weightedGoals: [GKGoal : NSNumber])
subscript · iOS 9.0+

subscript

TypeScript
subscript(idx: number): GKGoal
Swift declaration
subscript(idx: Int) -> GKGoal { get }
subscript · iOS 9.0+

subscript

TypeScript
subscript22683(goal: GKGoal): (_Foundation_NSNumber) | null
Swift declaration
subscript(goal: GKGoal) -> NSNumber! { get set }
method · iOS 9.0+

removeAllGoals

TypeScript
removeAllGoals(): void
Swift declaration
func removeAllGoals()
method · iOS 9.0+

remove

TypeScript
remove(goal: GKGoal): void
Swift declaration
func remove(_ goal: GKGoal)
method · iOS 9.0+

setWeight

TypeScript
setWeight(weight: number, goal: GKGoal): void
Swift declaration
func setWeight(_ weight: Float, for goal: GKGoal)
method · iOS 9.0+

weight

TypeScript
weight(goal: GKGoal): number
Swift declaration
func weight(for goal: GKGoal) -> Float
get · iOS 9.0+

goalCount

TypeScript
get goalCount(): number
Swift declaration
var goalCount: Int { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

GKBehavior.init()

inherited init: cannot prove legal (class declares 4 custom initializers)

All GameplayKit types →