Sono un novizio nell'obiettivo C e sto cercando di capire cosa fa l'operatore ^? Durante l'esplorazione del codice sorgente ho visto prossima costruzione:Objective-C the^operator
dispatch_once(&onceToken, ^{
UIGraphicsBeginImageContextWithOptions(CGSizeMake(20.f, 13.f), NO, 0.0f);
[[UIColor blackColor] setFill];
[[UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 20, 1)] fill];
[[UIBezierPath bezierPathWithRect:CGRectMake(0, 5, 20, 1)] fill];
[[UIBezierPath bezierPathWithRect:CGRectMake(0, 10, 20, 1)] fill];
[[UIColor whiteColor] setFill];
[[UIBezierPath bezierPathWithRect:CGRectMake(0, 1, 20, 2)] fill];
[[UIBezierPath bezierPathWithRect:CGRectMake(0, 6, 20, 2)] fill];
[[UIBezierPath bezierPathWithRect:CGRectMake(0, 11, 20, 2)] fill];
defaultImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
});
E mi piacerebbe sapere qual è il ^?
Legga questo: http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/Blocks/Articles/00_Introduction.html –
@DanielSchneller direi che è perché, in questo caso, è molto difficile cercare la documentazione sui blocchi se non si sa come vengono chiamati. Puoi leggere la guida Objective-C ma non è il modo migliore per imparare. –
@RogerNolan Sono completamente d'accordo con te, grazie. – HackU