Skip to content

Commit

Permalink
Merge pull request #194 from oskargargas/master
Browse files Browse the repository at this point in the history
`sharedInstance` should return `instancetype` to ease subclassing.
  • Loading branch information
nicklockwood committed May 5, 2015
2 parents 1136d97 + 2d524d8 commit cd8025d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion iRate/iRate.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ typedef NS_ENUM(NSUInteger, iRateErrorCode)

@interface iRate : NSObject

+ (iRate *)sharedInstance;
+ (instancetype)sharedInstance;

//app store ID - this is only needed if your
//bundle ID is not unique between iOS and Mac app stores
Expand Down
4 changes: 2 additions & 2 deletions iRate/iRate.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ + (void)load
[self performSelectorOnMainThread:@selector(sharedInstance) withObject:nil waitUntilDone:NO];
}

+ (iRate *)sharedInstance
+ (instancetype)sharedInstance
{
static iRate *sharedInstance = nil;
if (sharedInstance == nil)
{
sharedInstance = [[iRate alloc] init];
sharedInstance = [[self alloc] init];
}
return sharedInstance;
}
Expand Down

0 comments on commit cd8025d

Please sign in to comment.