¡@

Home 

2014/10/15 ¤U¤È 10:04:59

iphone Programming Glossary: cfurlref

Annotate PDF within iPhone SDK

http://stackoverflow.com/questions/2313008/annotate-pdf-within-iphone-sdk

NSURL url NSURL fileURLWithPath self getPDFFileName CGPDFDocumentRef document CGPDFDocumentCreateWithURL CFURLRef url 2 size_t count CGPDFDocumentGetNumberOfPages document 3 if count 0 NSLog @ PDF needs at least one page return CGRect..

Reading PDF files as string through iPhone application

http://stackoverflow.com/questions/2362393/reading-pdf-files-as-string-through-iphone-application

total pages a method to get the pdf ref CGPDFDocumentRef MyGetPDFDocumentRef const char filename CFStringRef path CFURLRef url CGPDFDocumentRef document path CFStringCreateWithCString NULL filename kCFStringEncodingUTF8 url CFURLCreateWithFileSystemPath..

how to route iPhone audio to the bluetooth headset

http://stackoverflow.com/questions/2375837/how-to-route-iphone-audio-to-the-bluetooth-headset

now play a quick sound we put in the bundle bomb.wav CFBundleRef mainBundle CFBundleGetMainBundle CFURLRef soundFileURLRef SystemSoundID soundFileObject soundFileURLRef CFBundleCopyResourceURL mainBundle CFSTR bomb CFSTR wav NULL..

Get a PDF/PNG as output from a UIWebView or UIView

http://stackoverflow.com/questions/2454309/get-a-pdf-png-as-output-from-a-uiwebview-or-uiview

void renderInPDFFile NSString path CGRect mediaBox self.bounds CGContextRef ctx CGPDFContextCreateWithURL CFURLRef NSURL fileURLWithPath path mediaBox NULL CGPDFContextBeginPage ctx NULL CGContextScaleCTM ctx 1 1 CGContextTranslateCTM..

Extracting images from a PDF

http://stackoverflow.com/questions/2475450/extracting-images-from-a-pdf

ref NSMutableArray ImgArrRef return aRefImgs CGPDFDocumentRef MyGetPDFDocumentRef const char filename CFStringRef path CFURLRef url CGPDFDocumentRef document path CFStringCreateWithCString NULL filename kCFStringEncodingUTF8 url CFURLCreateWithFileSystemPath..

Create a table of contents from a pdf file

http://stackoverflow.com/questions/2556344/create-a-table-of-contents-from-a-pdf-file

NSURL documentURL ... URL to file or http resource etc. CGPDFDocumentRef pdfDocument CGPDFDocumentCreateWithURL CFURLRef documentURL CGPDFDictionaryRef pdfDocDictionary CGPDFDocumentGetCatalog pdfDocument loop through dictionary... CGPDFDictionaryApplyFunction..

iOS SDK - Programmatically generate a PDF file

http://stackoverflow.com/questions/4362734/ios-sdk-programmatically-generate-a-pdf-file

filename This code block sets up our PDF Context so that we can draw to it CGContextRef pdfContext CFStringRef path CFURLRef url CFMutableDictionaryRef myDictionary NULL Create a CFString from the filename we provide to this method when we call.. then draw to the page const char picture Picture CGImageRef image CGDataProviderRef provider CFStringRef picturePath CFURLRef pictureURL picturePath CFStringCreateWithCString NULL picture kCFStringEncodingUTF8 pictureURL CFBundleCopyResourceURL..

AVFoundation, how to turn off the shutter sound when captureStillImageAsynchronouslyFromConnection?

http://stackoverflow.com/questions/4401232/avfoundation-how-to-turn-off-the-shutter-sound-when-capturestillimageasynchrono

@ wav SystemSoundID soundID NSURL filePath NSURL fileURLWithPath path isDirectory NO AudioServicesCreateSystemSoundID CFURLRef filePath soundID AudioServicesPlaySystemSound soundID Here is a blank audio file if you need it. http cl.ly 3cKi _ __ _..

Problem setting exif data for an image

http://stackoverflow.com/questions/5125323/problem-setting-exif-data-for-an-image

works but there is never any exif data in the image. CGImageDestinationRef myImageDest CGImageDestinationCreateWithURL CFURLRef docurl kUTTypeJPEG 1 NULL Add the image to the destination using previously saved options. CGImageDestinationAddImage myImageDest..

Merge PDF files on iOS

http://stackoverflow.com/questions/6553540/merge-pdf-files-on-ios

@ 2.pdf NSString pdfPathOutput documentsDirectory stringByAppendingPathComponent @ out.pdf File URLs CFURLRef pdfURL1 CFURLRef NSURL alloc initFileURLWithPath pdfPath1 CFURLRef pdfURL2 CFURLRef NSURL alloc initFileURLWithPath pdfPath2.. @ 2.pdf NSString pdfPathOutput documentsDirectory stringByAppendingPathComponent @ out.pdf File URLs CFURLRef pdfURL1 CFURLRef NSURL alloc initFileURLWithPath pdfPath1 CFURLRef pdfURL2 CFURLRef NSURL alloc initFileURLWithPath pdfPath2 CFURLRef pdfURLOutput.. stringByAppendingPathComponent @ out.pdf File URLs CFURLRef pdfURL1 CFURLRef NSURL alloc initFileURLWithPath pdfPath1 CFURLRef pdfURL2 CFURLRef NSURL alloc initFileURLWithPath pdfPath2 CFURLRef pdfURLOutput CFURLRef NSURL alloc initFileURLWithPath..

How to reverse an audio file?

http://stackoverflow.com/questions/6593118/how-to-reverse-an-audio-file

16 myPCMFormat.mBytesPerPacket 2 myPCMFormat.mBytesPerFrame 2 AudioFileCreateWithURL __bridge CFURLRef self.flippedAudioUrl kAudioFileCAFType myPCMFormat kAudioFileFlags_EraseFile outputAudioFile set up input file AudioFileID.. AudioStreamBasicDescription theFileFormat UInt32 thePropertySize sizeof theFileFormat theErr AudioFileOpenURL __bridge CFURLRef self.recordedAudioUrl kAudioFileReadPermission 0 inputAudioFile thePropertySize sizeof fileDataSize theErr AudioFileGetProperty..

How to record sound produced by mixer unit output (iOS Core Audio & Audio Graph)

http://stackoverflow.com/questions/7118429/how-to-record-sound-produced-by-mixer-unit-output-ios-core-audio-audio-graph

NSString alloc initWithFormat @ @ output.caf documentsDirectory autorelease NSLog @ @ destinationFilePath CFURLRef destinationURL CFURLCreateWithFileSystemPath kCFAllocatorDefault CFStringRef destinationFilePath kCFURLPOSIXPathStyle false..

Couldn't play system sound after switching to iOS 5

http://stackoverflow.com/questions/7856896/couldnt-play-system-sound-after-switching-to-ios-5

system sound after switching to iOS 5 This is how I played a beep sound effect in iOS 4 SystemSoundId beepOnSoundId CFURLRef soundUrl CFBundleCopyResourceURL CFBundleGetMainBundle CFSTR beep CFSTR wav NULL soundUrl logged file localhost var mobile..

Can anybody help me in recording iPhone output sound through Audio Unit

http://stackoverflow.com/questions/8615358/can-anybody-help-me-in-recording-iphone-output-sound-through-audio-unit

NSString alloc initWithFormat @ @ output.caf documentsDirectory autorelease NSLog @ @ destinationFilePath CFURLRef destinationURL CFURLCreateWithFileSystemPath kCFAllocatorDefault CFStringRef destinationFilePath kCFURLPOSIXPathStyle false..

Get Exif data from UIImage - UIImagePickerController

http://stackoverflow.com/questions/9766394/get-exif-data-from-uiimage-uiimagepickercontroller

componentsSeparatedByString @ . objectAtIndex 1 CGImageDestinationRef dr CGImageDestinationCreateWithURL __bridge CFURLRef fileURL __bridge CFStringRef sourceOptionsDict objectForKey @ kCGImageSourceTypeIdentifierHint 1 NULL ..

Best way to play simple sound effect in iOS

http://stackoverflow.com/questions/9791491/best-way-to-play-simple-sound-effect-in-ios

ofType @ m4a NSURL pathURL NSURL fileURLWithPath path SystemSoundID audioEffect AudioServicesCreateSystemSoundID CFURLRef pathURL audioEffect AudioServicesPlaySystemSound audioEffect call the following function when the sound is no longer used..