Browse files

Use concrete type in itemWithLabel instead of id

If something else in a project has an object with a label property and that class is ahead of RIButton in the imports, the compiler gives a warning that setLabel: is possibly receiving the wrong type.

Switching to the concrete RIButtonItem type clears this warning. There should be no adverse impact that I'm aware of.
  • Loading branch information...
1 parent f2c5ea8 commit 788013e531456bfe0c2ea7bea39ebf2931afb3e0 @pburleson pburleson committed with pburleson Nov 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 RIButtonItem.m
View
2 RIButtonItem.m
@@ -19,7 +19,7 @@ +(id)item
+(id)itemWithLabel:(NSString *)inLabel
{
- id newItem = [self item];
+ RIButtonItem *newItem = [self item];
[newItem setLabel:inLabel];
return newItem;
}

0 comments on commit 788013e

Please sign in to comment.