¡@

Home 

2014/10/15 ¤U¤È 10:15:39

iphone Programming Glossary: uses

How do I record audio on iPhone with AVAudioRecorder?

http://stackoverflow.com/questions/1010343/how-do-i-record-audio-on-iphone-with-avaudiorecorder

my working code. Recording is triggered by the user pressing a button on the navBar. The recording uses cd quality 44100 samples stereo 2 channels linear pcm. Beware if you want to use a different format..

How to programmatically send SMS on the iPhone?

http://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone

at a particular time of day Your best bet is to setup an intermediate server on the internet that uses an online SMS sending service and send the SMSs via that route if you need complete automation. ie your..

Detect the specific iPhone/iPod touch model [duplicate]

http://stackoverflow.com/questions/1108859/detect-the-specific-iphone-ipod-touch-model

is a category to UIDevice I think it's created by Erica Sadun I don't take credit for it that uses the following code to get the specific device model. You can find the whole category here along with..

UIImagePickerController and extracting EXIF data from existing photos

http://stackoverflow.com/questions/1238838/uiimagepickercontroller-and-extracting-exif-data-from-existing-photos

CLLocationManager to retrieve the current CLocation Once you have it you can use this method that uses exif iPhone library to geotag the UIImage from the CLLocation NSData geotagImage UIImage image withLocation..

iOS 6 apps - how to deal with iPhone 5 screen size? [duplicate]

http://stackoverflow.com/questions/12396545/ios-6-apps-how-to-deal-with-iphone-5-screen-size

iOS 6 then definitely consider using Auto Layout. It removes all fixed layout handling and instead uses constraints to lay things out. Nothing will be hard coded and your life will become a lot simpler. However..

How do I associate file types with an iPhone application?

http://stackoverflow.com/questions/2774343/how-do-i-associate-file-types-with-an-iphone-application

You can register your application to handle particular document types and any application that uses a document controller can hand off processing of these documents to your own application. For example..

Check iPhone iOS Version

http://stackoverflow.com/questions/3339722/check-iphone-ios-version

methods to check device capabilities if CLLocationManager headingAvailable Do something Apple uses systemVersion in their GLSprite sample code so my recommendation can't be absolute A system version..

Using the apple FFT and accelerate Framework

http://stackoverflow.com/questions/3398753/using-the-apple-fft-and-accelerate-framework

that if we set log2n to eg 8 you can throw these precalculated values into any fft function that uses resolution 2^8. So unless you want ultimate memory optimisation just create one set for the highest..

Build fat static library (device + simulator) using Xcode and SDK 4+

http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4

simulator using xcode and sdk 4 # # Version 2.7 # # Latest Change # Supports iPhone 5 iPod Touch 5 uses Apple's workaround to lipo bug # # Purpose # Automatically create a Universal static library for iPhone..

Bold & Non-Bold Text In A Single UILabel?

http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel

of good introductory blog posts here from guys at invasivecode that explain with more examples uses of NSAttributedString look for Introduction to NSAttributedString for iOS 6 and Attributed strings for..

Can I embed a custom font in an iPhone application?

http://stackoverflow.com/questions/360751/can-i-embed-a-custom-font-in-an-iphone-application

here git github.com zynga FontLabel.git The important files are FontLabel.h and FontLabel.m. It uses some of the code from Genericrich's answer above. Browse the source here http github.com zynga FontLabel..

display image from URL retrieved from ALAsset in iPhone

http://stackoverflow.com/questions/3837115/display-image-from-url-retrieved-from-alasset-in-iphone

resultBlock resultblock failureBlock failureblock A couple of things to note are that this uses blocks which were new to me before I started my iOS4 porting but you might like to look at http www.mikeash.com..

Difference between self.ivar and ivar?

http://stackoverflow.com/questions/4142177/difference-between-self-ivar-and-ivar

for an ivar i.e. self.ivar ... iphone objective c ios share improve this question self.name uses the accessor and or mutator defined by you this is nonatomic and retain in your case . So when you call..

How to capture UIView to UIImage without loss of quality on retina display

http://stackoverflow.com/questions/4334233/how-to-capture-uiview-to-uiimage-without-loss-of-quality-on-retina-display

you'll get a context with a scale factor equal to that of the screen. UIGraphicsBeginImageContext uses a fixed scale factor of 1.0 so you're actually getting exactly the same image on an iPhone 4 as on the..

Lock-down iPhone/iPod/iPad so it can only run one app

http://stackoverflow.com/questions/5011774/lock-down-iphone-ipod-ipad-so-it-can-only-run-one-app

I have not tried this. This config file will not load in the iPhone Configuration Utility as it uses keys that IPCU doesn't know about. You can combine this with whatever other enterprise configuration..

iPhone/iOS JSON parsing tutorial [closed]

http://stackoverflow.com/questions/5813077/iphone-ios-json-parsing-tutorial

want to make an iphone application that calls a webserver webservice retrieves a JSON response and uses that response to populate the rows of a UITableView assuming it converts the JSON into an NSArray first..

iPhone UIView Animation Best Practice

http://stackoverflow.com/questions/630265/iphone-uiview-animation-best-practice

animating view transitions on the iPhone For example the ViewTransitions sample project from apple uses code like CATransition applicationLoadViewIn CATransition animation applicationLoadViewIn setDuration..

SplitView like Facebook app on iPhone

http://stackoverflow.com/questions/7775195/splitview-like-facebook-app-on-iphone

like Facebook app on iPhone I want to create an iPhone app that uses a navigation scene similar to the one pictured in the link Please note I do not want this to only work..

Dispelling the UIImage imageNamed: FUD

http://stackoverflow.com/questions/924740/dispelling-the-uiimage-imagenamed-fud

File Upload to HTTP server in iphone programming

http://stackoverflow.com/questions/936855/file-upload-to-http-server-in-iphone-programming

APIs. Thanks in Advance BP iphone http file upload share improve this question The code below uses HTTP POST to post NSData to a webserver. You also need minor knowledge of PHP. NSString urlString @..

How do I record audio on iPhone with AVAudioRecorder?

http://stackoverflow.com/questions/1010343/how-do-i-record-audio-on-iphone-with-avaudiorecorder

question Actually there are no examples at all. Here is my working code. Recording is triggered by the user pressing a button on the navBar. The recording uses cd quality 44100 samples stereo 2 channels linear pcm. Beware if you want to use a different format especially an encoded one make sure you fully understand how..

How to programmatically send SMS on the iPhone?

http://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone

dialing operations. Imagine if the game instead dialed 911 at a particular time of day Your best bet is to setup an intermediate server on the internet that uses an online SMS sending service and send the SMSs via that route if you need complete automation. ie your program on the iPhone sends a UDP packet to your server..

Detect the specific iPhone/iPod touch model [duplicate]

http://stackoverflow.com/questions/1108859/detect-the-specific-iphone-ipod-touch-model

iPhone 3GS iPod touch 1st generation or something. EDIT There is a category to UIDevice I think it's created by Erica Sadun I don't take credit for it that uses the following code to get the specific device model. You can find the whole category here along with other useful stuff https github.com erica uidevice extension..

UIImagePickerController and extracting EXIF data from existing photos

http://stackoverflow.com/questions/1238838/uiimagepickercontroller-and-extracting-exif-data-from-existing-photos

the UIImagePickerController it's up to you to use the CLLocationManager to retrieve the current CLocation Once you have it you can use this method that uses exif iPhone library to geotag the UIImage from the CLLocation NSData geotagImage UIImage image withLocation CLLocation imageLocation NSData jpegData UIImageJPEGRepresentation..

iOS 6 apps - how to deal with iPhone 5 screen size? [duplicate]

http://stackoverflow.com/questions/12396545/ios-6-apps-how-to-deal-with-iphone-5-screen-size

height would simply be black. If you only plan to support iOS 6 then definitely consider using Auto Layout. It removes all fixed layout handling and instead uses constraints to lay things out. Nothing will be hard coded and your life will become a lot simpler. However if you have to support older iOS's then it really depends..

How do I associate file types with an iPhone application?

http://stackoverflow.com/questions/2774343/how-do-i-associate-file-types-with-an-iphone-application

and is different than the already existing custom URL schemes. You can register your application to handle particular document types and any application that uses a document controller can hand off processing of these documents to your own application. For example my application Molecules for which the source code is available..

Check iPhone iOS Version

http://stackoverflow.com/questions/3339722/check-iphone-ios-version

Some classes like CLLocationManager and UIDevice provide methods to check device capabilities if CLLocationManager headingAvailable Do something Apple uses systemVersion in their GLSprite sample code so my recommendation can't be absolute A system version of 3.1 or greater is required to use CADisplayLink. The NSTimer..

Using the apple FFT and accelerate Framework

http://stackoverflow.com/questions/3398753/using-the-apple-fft-and-accelerate-framework

vDSP_create_fftsetup log2n FFT_RADIX2 It's worth noting that if we set log2n to eg 8 you can throw these precalculated values into any fft function that uses resolution 2^8. So unless you want ultimate memory optimisation just create one set for the highest resolution you're going to need and use it for everything. Now..

Build fat static library (device + simulator) using Xcode and SDK 4+

http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4

questions 3520977 build fat static library device simulator using xcode and sdk 4 # # Version 2.7 # # Latest Change # Supports iPhone 5 iPod Touch 5 uses Apple's workaround to lipo bug # # Purpose # Automatically create a Universal static library for iPhone iPad iPhone Simulator from within XCode # # Author Adam..

Bold & Non-Bold Text In A Single UILabel?

http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel

I am just being lazy so p _label setText text There is a couple of good introductory blog posts here from guys at invasivecode that explain with more examples uses of NSAttributedString look for Introduction to NSAttributedString for iOS 6 and Attributed strings for iOS using Interface Builder PS Above code it should work..

Can I embed a custom font in an iPhone application?

http://stackoverflow.com/questions/360751/can-i-embed-a-custom-font-in-an-iphone-application

display image from URL retrieved from ALAsset in iPhone

http://stackoverflow.com/questions/3837115/display-image-from-url-retrieved-from-alasset-in-iphone

alloc init autorelease assetslibrary assetForURL asseturl resultBlock resultblock failureBlock failureblock A couple of things to note are that this uses blocks which were new to me before I started my iOS4 porting but you might like to look at http www.mikeash.com pyblog friday qa 2008 12 26.html and http developer.apple.com..

Difference between self.ivar and ivar?

http://stackoverflow.com/questions/4142177/difference-between-self-ivar-and-ivar

Thanks EDIT Follow up question How to write my own setter for an ivar i.e. self.ivar ... iphone objective c ios share improve this question self.name uses the accessor and or mutator defined by you this is nonatomic and retain in your case . So when you call self.name foo it will call the setName NSString str mutator..

How to capture UIView to UIImage without loss of quality on retina display

http://stackoverflow.com/questions/4334233/how-to-capture-uiview-to-uiimage-without-loss-of-quality-on-retina-display

on this page . Pass 0.0 for scale the third argument and you'll get a context with a scale factor equal to that of the screen. UIGraphicsBeginImageContext uses a fixed scale factor of 1.0 so you're actually getting exactly the same image on an iPhone 4 as on the other iPhones. I'll bet either the iPhone 4 is applying a..

Lock-down iPhone/iPod/iPad so it can only run one app

http://stackoverflow.com/questions/5011774/lock-down-iphone-ipod-ipad-so-it-can-only-run-one-app

It's possible that you can load the config using IPCU too but I have not tried this. This config file will not load in the iPhone Configuration Utility as it uses keys that IPCU doesn't know about. You can combine this with whatever other enterprise configuration profiles you have in play. EDIT @cocoanetics pointed out that..

iPhone/iOS JSON parsing tutorial [closed]

http://stackoverflow.com/questions/5813077/iphone-ios-json-parsing-tutorial

JSON parsing tutorial closed As a learning experience I want to make an iphone application that calls a webserver webservice retrieves a JSON response and uses that response to populate the rows of a UITableView assuming it converts the JSON into an NSArray first . Anyone know of anything that might be useful iphone objective..

iPhone UIView Animation Best Practice

http://stackoverflow.com/questions/630265/iphone-uiview-animation-best-practice

Best Practice What is considered best practice for animating view transitions on the iPhone For example the ViewTransitions sample project from apple uses code like CATransition applicationLoadViewIn CATransition animation applicationLoadViewIn setDuration 1 applicationLoadViewIn setType kCATransitionReveal applicationLoadViewIn..

SplitView like Facebook app on iPhone

http://stackoverflow.com/questions/7775195/splitview-like-facebook-app-on-iphone

like Facebook app on iPhone I want to create an iPhone app that uses a navigation scene similar to the one pictured in the link Please note I do not want this to only work for iPad I want it to work for iPhone exactly as pictured..

Dispelling the UIImage imageNamed: FUD

http://stackoverflow.com/questions/924740/dispelling-the-uiimage-imagenamed-fud

File Upload to HTTP server in iphone programming

http://stackoverflow.com/questions/936855/file-upload-to-http-server-in-iphone-programming

or examples to upload files to the HTTP server using iphone APIs. Thanks in Advance BP iphone http file upload share improve this question The code below uses HTTP POST to post NSData to a webserver. You also need minor knowledge of PHP. NSString urlString @ http yourserver.com upload.php NSString filename @ filename..

How do I record audio on iPhone with AVAudioRecorder?

http://stackoverflow.com/questions/1010343/how-do-i-record-audio-on-iphone-with-avaudiorecorder

at all. Here is my working code. Recording is triggered by the user pressing a button on the navBar. The recording uses cd quality 44100 samples stereo 2 channels linear pcm. Beware if you want to use a different format especially an encoded..

How to programmatically send SMS on the iPhone?

http://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone

instead dialed 911 at a particular time of day Your best bet is to setup an intermediate server on the internet that uses an online SMS sending service and send the SMSs via that route if you need complete automation. ie your program on the iPhone..

Detect the specific iPhone/iPod touch model [duplicate]

http://stackoverflow.com/questions/1108859/detect-the-specific-iphone-ipod-touch-model

or something. EDIT There is a category to UIDevice I think it's created by Erica Sadun I don't take credit for it that uses the following code to get the specific device model. You can find the whole category here along with other useful stuff..

UIImagePickerController and extracting EXIF data from existing photos

http://stackoverflow.com/questions/1238838/uiimagepickercontroller-and-extracting-exif-data-from-existing-photos

up to you to use the CLLocationManager to retrieve the current CLocation Once you have it you can use this method that uses exif iPhone library to geotag the UIImage from the CLLocation NSData geotagImage UIImage image withLocation CLLocation imageLocation..

iOS 6 apps - how to deal with iPhone 5 screen size? [duplicate]

http://stackoverflow.com/questions/12396545/ios-6-apps-how-to-deal-with-iphone-5-screen-size

plan to support iOS 6 then definitely consider using Auto Layout. It removes all fixed layout handling and instead uses constraints to lay things out. Nothing will be hard coded and your life will become a lot simpler. However if you have to..

How do I associate file types with an iPhone application?

http://stackoverflow.com/questions/2774343/how-do-i-associate-file-types-with-an-iphone-application

custom URL schemes. You can register your application to handle particular document types and any application that uses a document controller can hand off processing of these documents to your own application. For example my application Molecules..

Check iPhone iOS Version

http://stackoverflow.com/questions/3339722/check-iphone-ios-version

and UIDevice provide methods to check device capabilities if CLLocationManager headingAvailable Do something Apple uses systemVersion in their GLSprite sample code so my recommendation can't be absolute A system version of 3.1 or greater is..

Using the apple FFT and accelerate Framework

http://stackoverflow.com/questions/3398753/using-the-apple-fft-and-accelerate-framework

It's worth noting that if we set log2n to eg 8 you can throw these precalculated values into any fft function that uses resolution 2^8. So unless you want ultimate memory optimisation just create one set for the highest resolution you're going..

Build fat static library (device + simulator) using Xcode and SDK 4+

http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4

library device simulator using xcode and sdk 4 # # Version 2.7 # # Latest Change # Supports iPhone 5 iPod Touch 5 uses Apple's workaround to lipo bug # # Purpose # Automatically create a Universal static library for iPhone iPad iPhone Simulator..

Bold & Non-Bold Text In A Single UILabel?

http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel

text There is a couple of good introductory blog posts here from guys at invasivecode that explain with more examples uses of NSAttributedString look for Introduction to NSAttributedString for iOS 6 and Attributed strings for iOS using Interface..

Can I embed a custom font in an iPhone application?

http://stackoverflow.com/questions/360751/can-i-embed-a-custom-font-in-an-iphone-application

and put it on github here git github.com zynga FontLabel.git The important files are FontLabel.h and FontLabel.m. It uses some of the code from Genericrich's answer above. Browse the source here http github.com zynga FontLabel tree master share..

display image from URL retrieved from ALAsset in iPhone

http://stackoverflow.com/questions/3837115/display-image-from-url-retrieved-from-alasset-in-iphone

assetForURL asseturl resultBlock resultblock failureBlock failureblock A couple of things to note are that this uses blocks which were new to me before I started my iOS4 porting but you might like to look at http www.mikeash.com pyblog friday..

Difference between self.ivar and ivar?

http://stackoverflow.com/questions/4142177/difference-between-self-ivar-and-ivar

write my own setter for an ivar i.e. self.ivar ... iphone objective c ios share improve this question self.name uses the accessor and or mutator defined by you this is nonatomic and retain in your case . So when you call self.name foo it..

How to capture UIView to UIImage without loss of quality on retina display

http://stackoverflow.com/questions/4334233/how-to-capture-uiview-to-uiimage-without-loss-of-quality-on-retina-display

third argument and you'll get a context with a scale factor equal to that of the screen. UIGraphicsBeginImageContext uses a fixed scale factor of 1.0 so you're actually getting exactly the same image on an iPhone 4 as on the other iPhones. I'll..

Lock-down iPhone/iPod/iPad so it can only run one app

http://stackoverflow.com/questions/5011774/lock-down-iphone-ipod-ipad-so-it-can-only-run-one-app

using IPCU too but I have not tried this. This config file will not load in the iPhone Configuration Utility as it uses keys that IPCU doesn't know about. You can combine this with whatever other enterprise configuration profiles you have in..

iPhone/iOS JSON parsing tutorial [closed]

http://stackoverflow.com/questions/5813077/iphone-ios-json-parsing-tutorial

experience I want to make an iphone application that calls a webserver webservice retrieves a JSON response and uses that response to populate the rows of a UITableView assuming it converts the JSON into an NSArray first . Anyone know of..

iPhone UIView Animation Best Practice

http://stackoverflow.com/questions/630265/iphone-uiview-animation-best-practice

best practice for animating view transitions on the iPhone For example the ViewTransitions sample project from apple uses code like CATransition applicationLoadViewIn CATransition animation applicationLoadViewIn setDuration 1 applicationLoadViewIn..

SplitView like Facebook app on iPhone

http://stackoverflow.com/questions/7775195/splitview-like-facebook-app-on-iphone

like Facebook app on iPhone I want to create an iPhone app that uses a navigation scene similar to the one pictured in the link Please note I do not want this to only work for iPad I want it..

Dispelling the UIImage imageNamed: FUD

http://stackoverflow.com/questions/924740/dispelling-the-uiimage-imagenamed-fud

File Upload to HTTP server in iphone programming

http://stackoverflow.com/questions/936855/file-upload-to-http-server-in-iphone-programming

server using iphone APIs. Thanks in Advance BP iphone http file upload share improve this question The code below uses HTTP POST to post NSData to a webserver. You also need minor knowledge of PHP. NSString urlString @ http yourserver.com..

Translating iOS app to unsupported/non-standard languages

http://stackoverflow.com/questions/10259695/translating-ios-app-to-unsupported-non-standard-languages

For each targeted language lt lv et I put the strings files for that language into an en.lproj directory. Pros Uses a well known mechanism. The app just thinks it is running English. Cons Wreaks havoc on my localization tools. Its confusing.. app. Otherwise older installations would pick up the lproj dir even though I no longer bundle it with the app. Pros Uses properly named lproj directories. Integrates well with localization tools. Simple setup. Only requires one line in main.m..

How to post more parameters with image upload code in iOS?

http://stackoverflow.com/questions/10618056/how-to-post-more-parameters-with-image-upload-code-in-ios

NSDictionary dictionaryWithObjectsAndKeys @ Param1 @ Param1Name @ Param2 @ Param2Name @ Param3 @ Param3Name nil Uses default URL NetworkClient processFileUploadRequestWithURL nil andParams params fileData imageData fileName fileName..

@synthesize vs @dynamic, what are the differences?

http://stackoverflow.com/questions/1160498/synthesize-vs-dynamic-what-are-the-differences

are implemented not by the class itself but somewhere else like the superclass or will be provided at runtime . Uses for @dynamic are e.g. with subclasses of NSManagedObject CoreData or when you want to create an outlet for a property defined..

How to simplify in app Application Settings management?

http://stackoverflow.com/questions/1203266/how-to-simplify-in-app-application-settings-management

override UITableViewControllers each time iphone cocoa touch share improve this question Have you seen mySettings Uses almost the same plist file as you can use in the Settings app but displays it inside your app. Incidentally Apple recommends..

How can I upload a photo to a server with the iPhone?

http://stackoverflow.com/questions/125306/how-can-i-upload-a-photo-to-a-server-with-the-iphone

NSUTF8StringEncoding urlRequest setHTTPBody postData return urlRequest Uploader Private compress Uses zlib to compress the given data. Results The compressed data as a NSData object. Side effects None NSData compress..

how to generate crash report using code like crash report provided by Apple

http://stackoverflow.com/questions/15521494/how-to-generate-crash-report-using-code-like-crash-report-provided-by-apple

The articles linked above do analyze some of the available solutions. So here are some. Open Source PLCrashReporter Uses in thousands of apps since 2009. Safe reliably creates standard format crash reports that can be symbolicated. KSCrash Pretty.. actual symbolication. Disclaimer I am the developer of this Hosted Commercial Solutions Bugsense Free and paid plans. Uses PLCrashReporter under the hood. Rest of the SDK seems to be closed source. Server side symbolication. BugSnag Free and paid.. under the hood now use their own implementation. Server side symbolication. Crittercism Free and paid plans. Uses PLCrashReporter under the hood. Rest of the SDK seems to be closed source. Server side symbolication. HockeyApp Paid plans..

iphone: how to do Page turning

http://stackoverflow.com/questions/2760486/iphone-how-to-do-page-turning

leaves Simple effect using CAGradientLayers. All public API calls https github.com steventroughtonsmith PageCurlDemo Uses CAFilter The same method used in iBooks but this is a private API call and Apple WILL reject your app if you use it . What..

Any one know of an OpenGL ES example of an interactive globe/earth for the iPhone

http://stackoverflow.com/questions/322111/any-one-know-of-an-opengl-es-example-of-an-interactive-globe-earth-for-the-iphon

built specifically for this purpose. Runs on ios uses a combo of Objective C and C and is very Cocoa Touch friendly. Uses delegates for camera motion multithreaded all that good stuff. Oh and it's freely available under the Apache2 license. Details..

UITextView with Syntax Highlighting [duplicate]

http://stackoverflow.com/questions/3642540/uitextview-with-syntax-highlighting

plain text only no public way around. But editable . No chance to alter anything no chance to get geometry etc. Uses a web view internally. Each paragraph is a div which is altered by the editing engine. You could change the DOm in there..

uploading photo through programing in objective-c [duplicate]

http://stackoverflow.com/questions/5801049/uploading-photo-through-programing-in-objective-c

NSUTF8StringEncoding urlRequest setHTTPBody postData return urlRequest Uploader Private compress Uses zlib to compress the given data. Results The compressed data as a NSData object. Side effects None NSData compress..

What h.264 format loads on android AND IOS?

http://stackoverflow.com/questions/6364190/what-h-264-format-loads-on-android-and-ios

16000 r 13 ab 32000 aspect 3 2 # output_file Some of the important options affecting Android compatibility are coder 0 Uses CAVLAC rather than CABAC entropy encoding CABAC not supported on Android trellis 0 Should be shut off requires CABAC bf..