One Logo Pool Ball
GameplayKit · IOS API REFERENCE

GKRule

class · iOS 9.0+ · SDK 27.1

class GKRule

Members (6)

init · iOS 9.0+

init

TypeScript
static initPredicateAssertingFactGrade(predicate: _Foundation_NSPredicate, fact: SDKHandle, grade: number): GKRule
Swift declaration
convenience init(predicate: NSPredicate, assertingFact fact: any NSObjectProtocol, grade: Float)
init · iOS 9.0+

init

TypeScript
static initPredicateRetractingFactGrade(predicate: _Foundation_NSPredicate, fact: SDKHandle, grade: number): GKRule
Swift declaration
convenience init(predicate: NSPredicate, retractingFact fact: any NSObjectProtocol, grade: Float)
method · iOS 9.0+

evaluatePredicate

TypeScript
evaluatePredicate(system: GKRuleSystem): boolean
Swift declaration
func evaluatePredicate(in system: GKRuleSystem) -> Bool
method · iOS 9.0+

performAction

TypeScript
performAction(system: GKRuleSystem): void
Swift declaration
func performAction(in system: GKRuleSystem)
get · iOS 9.0+

salience

TypeScript
get salience(): number
Swift declaration
var salience: Int { get set }
set · iOS 9.0+

salience

TypeScript
set salience(value: number)
Swift declaration
var salience: Int { get set }

Skipped declarations

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

GKRule.init(blockPredicate:action:)

callback cannot propagate synchronous failure

GKRule.init()

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

All GameplayKit types →