Я сделал это, определив FormControl для FormGroup следующим образом:
{
controlName: new FormControl({
validators: [ Validators.required, etc ]
asyncValidators: yourValidatorFunction(),
updateOn: 'blur',
}),
}
The argument to NSLog needs to be an NSString, so you want
NSLog(@"%p", &myIntVar);
Try:
NSLog(@"%p", &myIntVar);
or
NSLog(@"%lx", (long)&myIntVar);
The first version uses the pointer-specific print format, which assumes that the passed parameter is a pointer, but internally treats it as a long.
The second version takes the address, then casts it to a long integer. This is necessary for portability on 64-bit platforms, because without the "l
" format qualifier it would assume that the supplied value is an integer, typically only 32-bits long.