Skip to content

Commit

Permalink
Added runtime check for imageWithRenderingMode: to prevent crash in i…
Browse files Browse the repository at this point in the history
…OS 6

Signed-off-by: Jai Govindani <[email protected]>
  • Loading branch information
Jai Govindani committed Nov 4, 2013
1 parent 94c5f95 commit 98eb78d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion quickdialog/QLabelElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ - (NSString *)imageNamed {

-(void)setIconNamed:(NSString *)name {
#if __IPHONE_7_0
self.image = [[UIImage imageNamed:name] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
if ([self.image respondsToSelector:@selector(imageWithRenderingMode:)]) {
self.image = [[UIImage imageNamed:name] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
}
#endif
}

Expand Down

0 comments on commit 98eb78d

Please sign in to comment.