Skip to content
Browse files

Fixed compilation for Mac and iOS in TKPost.m

  • Loading branch information...
1 parent 067e4c0 commit 32932427ed34efea6d0698eb6af065247b6952a8 @isutton committed Dec 15, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 TKPost.m
View
4 TKPost.m
@@ -476,9 +476,9 @@ - (NSDictionary *)attributesAsDictionary
if (source != nil)
[dict setObject:source forKey:@"source"];
if (image != nil && source == nil) {
-#ifdef TARGET_OS_IPHONE
+#if TARGET_OS_IPHONE
[dict setObject:UIImageJPEGRepresentation(image, 1.0) forKey:@"data"];
-#else
+#elif TARGET_OS_MAC
NSBitmapImageRep *bitmap = [[image representations] objectAtIndex:0];
[dict setObject:[bitmap representationUsingType:NSJPEGFileType properties:nil] forKey:@"data"];
#endif

0 comments on commit 3293242

Please sign in to comment.
Something went wrong with that request. Please try again.