Skip to content

Instantly share code, notes, and snippets.

@zwaldowski
Last active December 18, 2015 17:18
Show Gist options
  • Save zwaldowski/5817381 to your computer and use it in GitHub Desktop.
Save zwaldowski/5817381 to your computer and use it in GitHub Desktop.
// "Semantic issue - Unsequences modification and access to '_cmd'"
// Expanded from macro 'NSParameterAssert'
// Expanded from macro 'NSAssert'
// Expanded from macro 'self'
@implementation _ModelClass
+ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_ {
NSParameterAssert(moc_);
return [NSEntityDescription insertNewObjectForEntityForName:@"Model" inManagedObjectContext:moc_];
}
@end
// "Semantic issue - Expression is not assignable"
// (at "self = ")
@implementation MyViewClass
- (id)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame])
{
[self commonInit];
}
return self;
}
@end
// Expected: "Variable is not assignable (missing __block type specifier)"
// Expanded from macro 'self'
// at "self."
@implementation MyControlClass
- (void)notifyActionCompleted:(NSNotification *)note { // HBAOneTouchActivationCompleteNotification
self.label.text = @"Activated.";
[UIView animateWithDuration:3.0 animations:^{
self.label.alpha = 0.0;
} completion:^(BOOL fin) {
self.label.text = @"";
self.label.alpha = 1.0;
}] ;
[self.activityIndicator stopAnimating];
self.activityIndicator.hidden = YES;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment