如何在 iPad 中获取实际的 pdf 页面大小?

发布于 2024-09-05 08:26:51 字数 51 浏览 12 评论 0原文

如何在 iPad 中获取 PDF 页面的宽度和高度?关于如何找到此信息的任何文件或建议?

How can I get PDF page width and height in iPad? Any document or suggestions on how I can find this information?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

青衫负雪 2024-09-12 08:26:51

我一直在使用这里的答案,直到我意识到这一点

CGRect pageRect = CGPDFPageGetBoxRect(pdf, kCGPDFMediaBox);
// Which you can convert to size as
CGSize size = pageRect.size;

在 Apple 的示例 ZoomingPDFViewer 应用程序中使用

I was using the answers here until I realised a one-liner for this

CGRect pageRect = CGPDFPageGetBoxRect(pdf, kCGPDFMediaBox);
// Which you can convert to size as
CGSize size = pageRect.size;

Used in Apple's sample ZoomingPDFViewer app

愛上了 2024-09-12 08:26:51

这是执行此操作的代码;还可以将页面上的点从 PDF 坐标转换为 iOS 坐标。另请参阅使用 Quartz 在 iOS 上获取 PDF 超链接

#import <CoreGraphics/CoreGraphics.h>


. . . . . . . . . . . 

NSString *pathToPdfDoc = [[NSBundle mainBundle] pathForResource:@"Test2" offType:@"pdf"];
NSURL *pdfUrl = [NSURL fileURLWithPath:pathToPdfDoc];

CGPDFDocumentRef document = CGPDFDocumentCreateWithURL((CFURLRef)pdfUrl);

CGPDFPageRef page = CGPDFDocumentGetPage(document, 1); // assuming all the pages are the same size!

// code from https://stackoverflow.com/questions/4080373/get-pdf-hyperlinks-on-ios-with-quartz, 
// suitably amended

CGPDFDictionaryRef pageDictionary = CGPDFPageGetDictionary(page);


//******* getting the page size

CGPDFArrayRef pageBoxArray;
if(!CGPDFDictionaryGetArray(pageDictionary, "MediaBox", &pageBoxArray)) {
    return; // we've got something wrong here!!!
}

int pageBoxArrayCount = CGPDFArrayGetCount( pageBoxArray );
CGPDFReal pageCoords[4];
for( int k = 0; k < pageBoxArrayCount; ++k )
{
    CGPDFObjectRef pageRectObj;
    if(!CGPDFArrayGetObject(pageBoxArray, k, &pageRectObj))
    {
        return;
    }

    CGPDFReal pageCoord;
    if(!CGPDFObjectGetValue(pageRectObj, kCGPDFObjectTypeReal, &pageCoord)) {
        return;
    }

    pageCoords[k] = pageCoord;
}

NSLog(@"PDF coordinates -- bottom left x %f  ",pageCoords[0]); // should be 0
NSLog(@"PDF coordinates -- bottom left y %f  ",pageCoords[1]); // should be 0
NSLog(@"PDF coordinates -- top right   x %f  ",pageCoords[2]);
NSLog(@"PDF coordinates -- top right   y %f  ",pageCoords[3]);
NSLog(@"-- i.e. PDF page is %f wide and %f high",pageCoords[2],pageCoords[3]);

// **** now to convert a point on the page from PDF coordinates to iOS coordinates. 

double PDFHeight, PDFWidth;
PDFWidth =  pageCoords[2];
PDFHeight = pageCoords[3];

// the size of your iOS view or image into which you have rendered your PDF page 
// in this example full screen iPad in portrait orientation  
double iOSWidth = 768.0; 
double iOSHeight = 1024.0;

// the PDF co-ordinate values you want to convert 
double PDFxval = 89;  // or whatever
double PDFyval = 520; // or whatever

// the iOS coordinate values
int iOSxval, iOSyval;

iOSxval = (int) PDFxval * (iOSWidth/PDFWidth);
iOSyval = (int) (PDFHeight - PDFyval) * (iOSHeight/PDFHeight);

NSLog(@"PDF: %f %f",PDFxval,PDFyval);
NSLog(@"iOS: %i %i",iOSxval,iOSyval);

Here's the code to do it; also to convert a point on the page from PDF coordinates to iOS coordinates. See also Get PDF hyperlinks on iOS with Quartz

#import <CoreGraphics/CoreGraphics.h>


. . . . . . . . . . . 

NSString *pathToPdfDoc = [[NSBundle mainBundle] pathForResource:@"Test2" offType:@"pdf"];
NSURL *pdfUrl = [NSURL fileURLWithPath:pathToPdfDoc];

CGPDFDocumentRef document = CGPDFDocumentCreateWithURL((CFURLRef)pdfUrl);

CGPDFPageRef page = CGPDFDocumentGetPage(document, 1); // assuming all the pages are the same size!

// code from https://stackoverflow.com/questions/4080373/get-pdf-hyperlinks-on-ios-with-quartz, 
// suitably amended

CGPDFDictionaryRef pageDictionary = CGPDFPageGetDictionary(page);


//******* getting the page size

CGPDFArrayRef pageBoxArray;
if(!CGPDFDictionaryGetArray(pageDictionary, "MediaBox", &pageBoxArray)) {
    return; // we've got something wrong here!!!
}

int pageBoxArrayCount = CGPDFArrayGetCount( pageBoxArray );
CGPDFReal pageCoords[4];
for( int k = 0; k < pageBoxArrayCount; ++k )
{
    CGPDFObjectRef pageRectObj;
    if(!CGPDFArrayGetObject(pageBoxArray, k, &pageRectObj))
    {
        return;
    }

    CGPDFReal pageCoord;
    if(!CGPDFObjectGetValue(pageRectObj, kCGPDFObjectTypeReal, &pageCoord)) {
        return;
    }

    pageCoords[k] = pageCoord;
}

NSLog(@"PDF coordinates -- bottom left x %f  ",pageCoords[0]); // should be 0
NSLog(@"PDF coordinates -- bottom left y %f  ",pageCoords[1]); // should be 0
NSLog(@"PDF coordinates -- top right   x %f  ",pageCoords[2]);
NSLog(@"PDF coordinates -- top right   y %f  ",pageCoords[3]);
NSLog(@"-- i.e. PDF page is %f wide and %f high",pageCoords[2],pageCoords[3]);

// **** now to convert a point on the page from PDF coordinates to iOS coordinates. 

double PDFHeight, PDFWidth;
PDFWidth =  pageCoords[2];
PDFHeight = pageCoords[3];

// the size of your iOS view or image into which you have rendered your PDF page 
// in this example full screen iPad in portrait orientation  
double iOSWidth = 768.0; 
double iOSHeight = 1024.0;

// the PDF co-ordinate values you want to convert 
double PDFxval = 89;  // or whatever
double PDFyval = 520; // or whatever

// the iOS coordinate values
int iOSxval, iOSyval;

iOSxval = (int) PDFxval * (iOSWidth/PDFWidth);
iOSyval = (int) (PDFHeight - PDFyval) * (iOSHeight/PDFHeight);

NSLog(@"PDF: %f %f",PDFxval,PDFyval);
NSLog(@"iOS: %i %i",iOSxval,iOSyval);
梦中的蝴蝶 2024-09-12 08:26:51

以下方法返回根据 Web 视图缩放的第一个 pdf 页面的高度:

-(NSInteger) pdfPageSize:(NSData*) pdfData{

    CGPDFDocumentRef document = CGPDFDocumentCreateWithProvider(CGDataProviderCreateWithCFData((__bridge CFDataRef)pdfData));

    CGPDFPageRef page = CGPDFDocumentGetPage(document, 1);
    CGRect pageRect = CGPDFPageGetBoxRect(page, kCGPDFMediaBox);

    double pdfHeight, pdfWidth;
    pdfWidth =  pageRect.size.width;
    pdfHeight = pageRect.size.height;

    double iOSWidth = _webView.frame.size.width;
    double iOSHeight = _webView.frame.size.height;

    double scaleWidth = iOSWidth/pdfWidth;
    double scaleHeight = iOSHeight/pdfHeight;

    double scale = scaleWidth > scaleHeight ? scaleWidth : scaleHeight;
    NSInteger finalHeight = pdfHeight * scale;

    NSLog(@"MediaRect %f, %f, %f, %f", pageRect.origin.x, pageRect.origin.y, pageRect.size.width, pageRect.size.height);
    NSLog(@"Scale: %f",scale);
    NSLog(@"Final Height: %i", finalHeight);

    return finalHeight;
}

它比 Donal O'Danachair 的小很多,并且执行基本相同的操作。您可以轻松地将其调整为您的视图大小,并返回宽度和高度。

The following method returns the height of the first pdf page scaled according to a webview:

-(NSInteger) pdfPageSize:(NSData*) pdfData{

    CGPDFDocumentRef document = CGPDFDocumentCreateWithProvider(CGDataProviderCreateWithCFData((__bridge CFDataRef)pdfData));

    CGPDFPageRef page = CGPDFDocumentGetPage(document, 1);
    CGRect pageRect = CGPDFPageGetBoxRect(page, kCGPDFMediaBox);

    double pdfHeight, pdfWidth;
    pdfWidth =  pageRect.size.width;
    pdfHeight = pageRect.size.height;

    double iOSWidth = _webView.frame.size.width;
    double iOSHeight = _webView.frame.size.height;

    double scaleWidth = iOSWidth/pdfWidth;
    double scaleHeight = iOSHeight/pdfHeight;

    double scale = scaleWidth > scaleHeight ? scaleWidth : scaleHeight;
    NSInteger finalHeight = pdfHeight * scale;

    NSLog(@"MediaRect %f, %f, %f, %f", pageRect.origin.x, pageRect.origin.y, pageRect.size.width, pageRect.size.height);
    NSLog(@"Scale: %f",scale);
    NSLog(@"Final Height: %i", finalHeight);

    return finalHeight;
}

It's a lot smaller than Donal O'Danachair's and does basically the same thing. You could easily adapt it to your View size and to return the width along with the height.

深海夜未眠 2024-09-12 08:26:51

Swift 3.x(基于 Ege Akpinar 提供的答案)

let pageRect = pdfPage.getBoxRect(CGPDFBox.mediaBox) // where pdfPage is a CGPDFPage
let pageSize = pageRect.size

更完整的示例展示了如何提取 PDF 文件中页面的尺寸:

/**
 Returns the dimensions of a PDF page.
 - Parameter pdfURL: The URL of the PDF file.
 - Parameter pageNumber: The number of the page to obtain dimensions (Note: page numbers start from `1`, not `0`)
 */
func pageDimension(pdfURL: URL, pageNumber: Int) -> CGSize? {

    // convert URL to NSURL which is toll-free-briged with CFURL
    let url = pdfURL as NSURL
    guard let pdf = CGPDFDocument(url) else { return nil }
    guard let pdfPage = pdf.page(at: pageNumber) else { return nil }

    let pageRect = pdfPage.getBoxRect(CGPDFBox.mediaBox)
    let pageSize = pageRect.size

    return pageSize
}

let url = Bundle.main.url(forResource: "file", withExtension: "pdf")!
let dimensions = pageDimension(pdfURL: url, pageNumber: 1)
print(dimensions ?? "Cannot get dimensions")

Swift 3.x (based on answer provided by Ege Akpinar)

let pageRect = pdfPage.getBoxRect(CGPDFBox.mediaBox) // where pdfPage is a CGPDFPage
let pageSize = pageRect.size

A more full example showing how to extract the dimensions of page in a PDF file:

/**
 Returns the dimensions of a PDF page.
 - Parameter pdfURL: The URL of the PDF file.
 - Parameter pageNumber: The number of the page to obtain dimensions (Note: page numbers start from `1`, not `0`)
 */
func pageDimension(pdfURL: URL, pageNumber: Int) -> CGSize? {

    // convert URL to NSURL which is toll-free-briged with CFURL
    let url = pdfURL as NSURL
    guard let pdf = CGPDFDocument(url) else { return nil }
    guard let pdfPage = pdf.page(at: pageNumber) else { return nil }

    let pageRect = pdfPage.getBoxRect(CGPDFBox.mediaBox)
    let pageSize = pageRect.size

    return pageSize
}

let url = Bundle.main.url(forResource: "file", withExtension: "pdf")!
let dimensions = pageDimension(pdfURL: url, pageNumber: 1)
print(dimensions ?? "Cannot get dimensions")
撧情箌佬 2024-09-12 08:26:51

我采纳了 Donal O'Danachair 的答案并做了一些修改,因此矩形大小也缩放为 pdf 的大小。这段代码实际上是从 pdf 页面获取所有注释,并从 PDF 矩形创建 CGRect。部分代码是 Donal 评论的一个问题的答案。

CGPDFDictionaryRef pageDictionary = CGPDFPageGetDictionary(pageRef);

    CGFloat boundsWidth = pdfView.bounds.size.width;
    CGFloat boundsHeight = pdfView.bounds.size.height;
    CGRect cropBoxRect = CGPDFPageGetBoxRect(pageRef, kCGPDFCropBox);
    CGRect mediaBoxRect = CGPDFPageGetBoxRect(pageRef, kCGPDFMediaBox);
    CGRect effectiveRect = CGRectIntersection(cropBoxRect, mediaBoxRect);

    CGFloat effectiveWidth = effectiveRect.size.width;
    CGFloat effectiveHeight = effectiveRect.size.height;

    CGFloat widthScale = (boundsWidth / effectiveWidth);
    CGFloat heightScale = (boundsHeight / effectiveHeight);

    CGFloat pdfScale = (widthScale < heightScale) ? widthScale : heightScale;

    CGFloat x_offset = ((boundsWidth - (effectiveWidth * pdfScale)) / 2.0f);
    CGFloat y_offset = ((boundsHeight - (effectiveHeight * pdfScale)) / 2.0f);

    y_offset = (boundsHeight - y_offset); // Co-ordinate system adjust

    //CGFloat x_translate = (x_offset - effectiveRect.origin.x);
    //CGFloat y_translate = (y_offset + effectiveRect.origin.y);

    CGPDFArrayRef outputArray;

    if(!CGPDFDictionaryGetArray(pageDictionary, "Annots", &outputArray)) {
        return;
    }

    int arrayCount = CGPDFArrayGetCount( outputArray );
    if(!arrayCount) {
        //continue;
    }

    self.annotationRectArray = [[NSMutableArray alloc] initWithCapacity:arrayCount];

    for( int j = 0; j < arrayCount; ++j ) {
        CGPDFObjectRef aDictObj;
        if(!CGPDFArrayGetObject(outputArray, j, &aDictObj)) {
            return;
        }

        CGPDFDictionaryRef annotDict;
        if(!CGPDFObjectGetValue(aDictObj, kCGPDFObjectTypeDictionary, &annotDict)) {
            return;
        }

        CGPDFDictionaryRef aDict;
        if(!CGPDFDictionaryGetDictionary(annotDict, "A", &aDict)) {
            return;
        }

        CGPDFStringRef uriStringRef;
        if(!CGPDFDictionaryGetString(aDict, "URI", &uriStringRef)) {
            return;
        }

        CGPDFArrayRef rectArray;
        if(!CGPDFDictionaryGetArray(annotDict, "Rect", &rectArray)) {
            return;
        }

        int arrayCount = CGPDFArrayGetCount( rectArray );
        CGPDFReal coords[4];
        for( int k = 0; k < arrayCount; ++k ) {
            CGPDFObjectRef rectObj;
            if(!CGPDFArrayGetObject(rectArray, k, &rectObj)) {
                return;
            }

            CGPDFReal coord;
            if(!CGPDFObjectGetValue(rectObj, kCGPDFObjectTypeReal, &coord)) {
                return;
            }

            coords[k] = coord;
        }               

        char *uriString = (char *)CGPDFStringGetBytePtr(uriStringRef);
        //******* getting the page size

        CGPDFArrayRef pageBoxArray;
        if(!CGPDFDictionaryGetArray(pageDictionary, "MediaBox", &pageBoxArray)) {
            return; // we've got something wrong here!!!
        }

        int pageBoxArrayCount = CGPDFArrayGetCount( pageBoxArray );
        CGPDFReal pageCoords[4];
        for( int k = 0; k < pageBoxArrayCount; ++k )
        {
            CGPDFObjectRef pageRectObj;
            if(!CGPDFArrayGetObject(pageBoxArray, k, &pageRectObj))
            {
                return;
            }

            CGPDFReal pageCoord;
            if(!CGPDFObjectGetValue(pageRectObj, kCGPDFObjectTypeReal, &pageCoord)) {
                return;
            }

            pageCoords[k] = pageCoord;
        }

#if DEBUG
        NSLog(@"PDF coordinates -- bottom left x %f  ",pageCoords[0]); // should be 0
        NSLog(@"PDF coordinates -- bottom left y %f  ",pageCoords[1]); // should be 0
        NSLog(@"PDF coordinates -- top right   x %f  ",pageCoords[2]);
        NSLog(@"PDF coordinates -- top right   y %f  ",pageCoords[3]);
        NSLog(@"-- i.e. PDF page is %f wide and %f high",pageCoords[2],pageCoords[3]);
#endif
        // **** now to convert a point on the page from PDF coordinates to iOS coordinates. 

        double PDFHeight, PDFWidth;
        PDFWidth =  pageCoords[2];
        PDFHeight = pageCoords[3];

        // the size of your iOS view or image into which you have rendered your PDF page 
        // in this example full screen iPad in portrait orientation  
        double iOSWidth = 768.0; 
        double iOSHeight = 1024.0;

        // the PDF co-ordinate values you want to convert 
        double PDFxval = coords[0];  // or whatever
        double PDFyval = coords[3]; // or whatever
        double PDFhval = (coords[3]-coords[1]);
        double PDFwVal = coords[2]-coords[0];

        // the iOS coordinate values
        CGFloat iOSxval, iOSyval,iOShval,iOSwval;

        iOSxval =  PDFxval * (iOSWidth/PDFWidth);
        iOSyval =  (PDFHeight - PDFyval) * (iOSHeight/PDFHeight);
        iOShval =  PDFhval *(iOSHeight/PDFHeight);// here I scale the width and height
        iOSwval = PDFwVal *(iOSWidth/PDFWidth);

#if DEBUG
        NSLog(@"PDF: { {%f %f }, { %f %f } }",PDFxval,PDFyval,PDFwVal,PDFhval);
        NSLog(@"iOS: { {%f %f }, { %f %f } }",iOSxval,iOSyval,iOSwval,iOShval);
#endif


        NSString *uri = [NSString stringWithCString:uriString encoding:NSUTF8StringEncoding];
        CGRect rect = CGRectMake(iOSxval,iOSyval,iOSwval,iOShval);// create the rect and use it as you wish

I took Donal O'Danachair's answer and made a few modifications so the rect size is also scaled to the pdf's size. This code snipped actually gets all the annotations off a pdf page and creates the CGRect from the PDF rect. Part of the code is form the answer to a question Donal commented on his.

CGPDFDictionaryRef pageDictionary = CGPDFPageGetDictionary(pageRef);

    CGFloat boundsWidth = pdfView.bounds.size.width;
    CGFloat boundsHeight = pdfView.bounds.size.height;
    CGRect cropBoxRect = CGPDFPageGetBoxRect(pageRef, kCGPDFCropBox);
    CGRect mediaBoxRect = CGPDFPageGetBoxRect(pageRef, kCGPDFMediaBox);
    CGRect effectiveRect = CGRectIntersection(cropBoxRect, mediaBoxRect);

    CGFloat effectiveWidth = effectiveRect.size.width;
    CGFloat effectiveHeight = effectiveRect.size.height;

    CGFloat widthScale = (boundsWidth / effectiveWidth);
    CGFloat heightScale = (boundsHeight / effectiveHeight);

    CGFloat pdfScale = (widthScale < heightScale) ? widthScale : heightScale;

    CGFloat x_offset = ((boundsWidth - (effectiveWidth * pdfScale)) / 2.0f);
    CGFloat y_offset = ((boundsHeight - (effectiveHeight * pdfScale)) / 2.0f);

    y_offset = (boundsHeight - y_offset); // Co-ordinate system adjust

    //CGFloat x_translate = (x_offset - effectiveRect.origin.x);
    //CGFloat y_translate = (y_offset + effectiveRect.origin.y);

    CGPDFArrayRef outputArray;

    if(!CGPDFDictionaryGetArray(pageDictionary, "Annots", &outputArray)) {
        return;
    }

    int arrayCount = CGPDFArrayGetCount( outputArray );
    if(!arrayCount) {
        //continue;
    }

    self.annotationRectArray = [[NSMutableArray alloc] initWithCapacity:arrayCount];

    for( int j = 0; j < arrayCount; ++j ) {
        CGPDFObjectRef aDictObj;
        if(!CGPDFArrayGetObject(outputArray, j, &aDictObj)) {
            return;
        }

        CGPDFDictionaryRef annotDict;
        if(!CGPDFObjectGetValue(aDictObj, kCGPDFObjectTypeDictionary, &annotDict)) {
            return;
        }

        CGPDFDictionaryRef aDict;
        if(!CGPDFDictionaryGetDictionary(annotDict, "A", &aDict)) {
            return;
        }

        CGPDFStringRef uriStringRef;
        if(!CGPDFDictionaryGetString(aDict, "URI", &uriStringRef)) {
            return;
        }

        CGPDFArrayRef rectArray;
        if(!CGPDFDictionaryGetArray(annotDict, "Rect", &rectArray)) {
            return;
        }

        int arrayCount = CGPDFArrayGetCount( rectArray );
        CGPDFReal coords[4];
        for( int k = 0; k < arrayCount; ++k ) {
            CGPDFObjectRef rectObj;
            if(!CGPDFArrayGetObject(rectArray, k, &rectObj)) {
                return;
            }

            CGPDFReal coord;
            if(!CGPDFObjectGetValue(rectObj, kCGPDFObjectTypeReal, &coord)) {
                return;
            }

            coords[k] = coord;
        }               

        char *uriString = (char *)CGPDFStringGetBytePtr(uriStringRef);
        //******* getting the page size

        CGPDFArrayRef pageBoxArray;
        if(!CGPDFDictionaryGetArray(pageDictionary, "MediaBox", &pageBoxArray)) {
            return; // we've got something wrong here!!!
        }

        int pageBoxArrayCount = CGPDFArrayGetCount( pageBoxArray );
        CGPDFReal pageCoords[4];
        for( int k = 0; k < pageBoxArrayCount; ++k )
        {
            CGPDFObjectRef pageRectObj;
            if(!CGPDFArrayGetObject(pageBoxArray, k, &pageRectObj))
            {
                return;
            }

            CGPDFReal pageCoord;
            if(!CGPDFObjectGetValue(pageRectObj, kCGPDFObjectTypeReal, &pageCoord)) {
                return;
            }

            pageCoords[k] = pageCoord;
        }

#if DEBUG
        NSLog(@"PDF coordinates -- bottom left x %f  ",pageCoords[0]); // should be 0
        NSLog(@"PDF coordinates -- bottom left y %f  ",pageCoords[1]); // should be 0
        NSLog(@"PDF coordinates -- top right   x %f  ",pageCoords[2]);
        NSLog(@"PDF coordinates -- top right   y %f  ",pageCoords[3]);
        NSLog(@"-- i.e. PDF page is %f wide and %f high",pageCoords[2],pageCoords[3]);
#endif
        // **** now to convert a point on the page from PDF coordinates to iOS coordinates. 

        double PDFHeight, PDFWidth;
        PDFWidth =  pageCoords[2];
        PDFHeight = pageCoords[3];

        // the size of your iOS view or image into which you have rendered your PDF page 
        // in this example full screen iPad in portrait orientation  
        double iOSWidth = 768.0; 
        double iOSHeight = 1024.0;

        // the PDF co-ordinate values you want to convert 
        double PDFxval = coords[0];  // or whatever
        double PDFyval = coords[3]; // or whatever
        double PDFhval = (coords[3]-coords[1]);
        double PDFwVal = coords[2]-coords[0];

        // the iOS coordinate values
        CGFloat iOSxval, iOSyval,iOShval,iOSwval;

        iOSxval =  PDFxval * (iOSWidth/PDFWidth);
        iOSyval =  (PDFHeight - PDFyval) * (iOSHeight/PDFHeight);
        iOShval =  PDFhval *(iOSHeight/PDFHeight);// here I scale the width and height
        iOSwval = PDFwVal *(iOSWidth/PDFWidth);

#if DEBUG
        NSLog(@"PDF: { {%f %f }, { %f %f } }",PDFxval,PDFyval,PDFwVal,PDFhval);
        NSLog(@"iOS: { {%f %f }, { %f %f } }",iOSxval,iOSyval,iOSwval,iOShval);
#endif


        NSString *uri = [NSString stringWithCString:uriString encoding:NSUTF8StringEncoding];
        CGRect rect = CGRectMake(iOSxval,iOSyval,iOSwval,iOShval);// create the rect and use it as you wish
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文