I need to pass the number of iterations to the measureBlock method i.e. I would like to write in Objective-C the following Swift code:
Code Block swift
let options = XCTMeasureOptions()
options.iterationCount = 5;
measure(options: options) {
/* The code that's being measured */
}
I wrote:
Code Block Objective-C
XCTMeasureOptions *opt = [XCTMeasureOptions new];
opt.iterationCount = 5;
[self measureBlock:^{
/* The code that's being measured */
}];
What syntax should I use to pass the opt object to measureBlock?
Thanks
Stefano Gragnani
Code Block swift
let options = XCTMeasureOptions()
options.iterationCount = 5;
measure(options: options) {
/* The code that's being measured */
}
I wrote:
Code Block Objective-C
XCTMeasureOptions *opt = [XCTMeasureOptions new];
opt.iterationCount = 5;
[self measureBlock:^{
/* The code that's being measured */
}];
What syntax should I use to pass the opt object to measureBlock?
Thanks
Stefano Gragnani