Convert NSString to string

Posted by coure06 on Stack Overflow See other posts from Stack Overflow or by coure06
Published on 2010-05-28T04:58:07Z Indexed on 2010/05/28 5:01 UTC
Read the original article Hit count: 193

Filed under:
|

NSDate *now = [NSDate date];
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy"];

        NSString *stringFromDate = [formatter stringFromDate:now]; 
        CGContextShowTextAtPoint(context, 50, 50, stringFromDate, 5);

I am not getting the exact date? also getting warning while compiling
warning: passing argument 4 of 'CGContextShowTextAtPoint' from incompatible pointer type

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone-sdk