小编The*_*per的帖子

如何在iphone中连接三个字符串

我有三个字符串,我希望它们连接,但它们不连接.我正在使用此代码.

我希望我的最后一个字符串显示如下:

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)

iphone xcode

8
推荐指数
1
解决办法
4万
查看次数

如何在iPhone应用程序中为pdf文件添加背景颜色

我正在使用这种方式生成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 iphone xcode background uiimage

3
推荐指数
1
解决办法
809
查看次数

在iBooks的iPad文档文件夹中打开保存的PDF文件?

我已将pdf文件保存在iPad上的apps文件夹中.我希望用户使用iBooks在iPad上打开该PDF文件.有没有办法在iBooks中打开保存在应用程序的文档文件夹中的PDF?

iphone xcode

0
推荐指数
1
解决办法
3778
查看次数

标签 统计

iphone ×3

xcode ×3

background ×1

pdf ×1

uiimage ×1