开发者

how to log image info selected by the user to the log file in iPhone

I am developing an iPhone application and i need to log the information about the images selected by the user to 开发者_如何学JAVAan external log file. How can this be achieved in iPhone?

I use Objective c for developing the application. I am not able to find out , which image the user has selected and get that information and write to the log file.


You can use NSFileHandle to write to a file.

NSFileHandle* fh = [NSFileHandle fileHandleForWritingAtPath:@"path/to/logfile"];
[fh seekToEndOfFile];
[fh writeData:[@"This is written" dataUsingEncoding:NSUTF8StringEncoding]];
[fh closeFile];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜