我有三个字符串,我希望它们连接,但它们不连接.我正在使用此代码.
我希望我的最后一个字符串显示如下:
Cerenia Results 12Jun 2012.pdf
像这样
NSString *fileName = @"Cerenia Results";
NSString* str = [formatter stringFromDate:date];
NSString*extention=@".pdf";
NSString * strRR = [NSString stringWithFormat:@"Cerenia Results_%@ [%@].pdf", extension];
Run Code Online (Sandbox Code Playgroud) 我正在使用这种方式生成pdf文件现在它工作正常但背景是白色我想给背景一些颜色所以是否有可能给backgorund颜色.
- (void) generatePdfWithFilePath: (NSString *)thefilePath
{
UIGraphicsBeginPDFContextToFile(thefilePath, CGRectZero, nil);
NSInteger currentPage = 0;
BOOL done = NO;
do
{
UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, pageSize.width, pageSize.height), nil);
currentPage++;
[self drawPageNumber:currentPage];
//Draw a border for each page.
[self drawBorder];
//Draw text fo our header.
[self drawHeader];
//Draw a line below the header.
[self drawLine];
//Draw some text for the page.
[self drawText];
//Draw an image
[self drawImage];
done = YES;
}
while (!done);
UIGraphicsEndPDFContext();
}
Run Code Online (Sandbox Code Playgroud) 我已将pdf文件保存在iPad上的apps文件夹中.我希望用户使用iBooks在iPad上打开该PDF文件.有没有办法在iBooks中打开保存在应用程序的文档文件夹中的PDF?