Skip to content

Commit

Permalink
Fixed issues with macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
shnhrrsn committed Oct 14, 2017
1 parent c1f62db commit a54cfd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Sources/EGOCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
#import <Foundation/Foundation.h>

#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#endif

#if TARGET_OS_OSX
#import <AppKit/AppKit.h>
#endif

//! Project version number for EGOCache.
Expand Down
2 changes: 1 addition & 1 deletion Sources/EGOCache.m
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ - (void)setImage:(NSImage*)anImage forKey:(NSString*)key {
}

- (void)setImage:(NSImage*)anImage forKey:(NSString*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval {
[self setData:[[[anImage representations] objectAtIndex:0] representationUsingType:NSPNGFileType properties:nil] forKey:key withTimeoutInterval:timeoutInterval];
[self setData:[[NSBitmapImageRep imageRepWithData:anImage.TIFFRepresentation] representationUsingType:NSPNGFileType properties:@{ }] forKey:key withTimeoutInterval:timeoutInterval];
}

#endif
Expand Down

0 comments on commit a54cfd9

Please sign in to comment.