¡@

Home 

2014/10/15 ¤U¤È 10:03:35

iphone Programming Glossary: although

IOS 6 force device orientation to landscape

http://stackoverflow.com/questions/12640870/ios-6-force-device-orientation-to-landscape

Another problem after rotating the device back to portrait the orientation goes to portrait although I have specified in supportedInterfaceOrientations only UIInterfaceOrientationMaskLandscape . Why it..

AES Encryption for an NSString on the iPhone

http://stackoverflow.com/questions/1400246/aes-encryption-for-an-nsstring-on-the-iphone

is part of the Core OS on the iPhone. Both 10.4 and 10.5 have usr include CommonCrypto although 10.5 has a man page for CCCryptor.3cc and 10.4 doesn't so YMMV. EDIT See this follow up question on..

Adding Core Data to existing iPhone project

http://stackoverflow.com/questions/2032818/adding-core-data-to-existing-iphone-project

NSPersistentStoreCoordinator undeclared but also with Expected ' ' before NSManagedObjectContext although it seems like the parenthesis are correct ... #pragma mark #pragma mark Core Data stack Returns the.. to generate a crash log and terminate. You should not use this function in a shipping application although it may be useful during development. If it is not possible to recover from the error display an alert..

Notification of or detecting screenshot being taken?

http://stackoverflow.com/questions/2121970/notification-of-or-detecting-screenshot-being-taken

screenshot detection notifications share improve this question Here's a way which might work although it will totally go against user interface guidelines I'm sure. If you force the user to have their finger..

JSON and Core Data on the iPhone

http://stackoverflow.com/questions/2362323/json-and-core-data-on-the-iphone

like TouchJSON but several others out there are quite nice as well. The complicated part although not very hard is to convert your managed objects into suitable structures for the conversion. I wrote..

iPad Web App: Detect Virtual Keyboard Using JavaScript in Safari?

http://stackoverflow.com/questions/2593139/ipad-web-app-detect-virtual-keyboard-using-javascript-in-safari

iphone ipad safari web applications share improve this question I found a solution which works although it is a bit ugly. It also won't work in every situation but it works for me. Since I'm adapting the..

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

. RECENT CHANGES Info on how to use this script with a project embedded in another project although I highly recommend NOT doing that ever Apple has a couple of show stopper bugs in Xcode if you embed.. iphonesimulator SDK_VERSION fi echo XCode has selected SDK PLATFORM_NAME with version SDK_VERSION although back targetting IPHONEOS_DEPLOYMENT_TARGET echo ...therefore OTHER_SDK_TO_BUILD OTHER_SDK_TO_BUILD #..

Proper way to exit iPhone application?

http://stackoverflow.com/questions/355168/proper-way-to-exit-iphone-application

How to filter NSFetchedResultsController (CoreData) with UISearchDisplayController/UISearchBar

http://stackoverflow.com/questions/4471289/how-to-filter-nsfetchedresultscontroller-coredata-with-uisearchdisplaycontroll

to generate a crash log and terminate. You should not use this function in a shipping application although it may be useful during development. If it is not possible to recover from the error display an alert..

Instance variables with underscore in Objective-C 2.0 and renaming with @synthetize leads to optimization warnings by the 'Analyze' tool of Xcode 4 [duplicate]

http://stackoverflow.com/questions/6124109/instance-variables-with-underscore-in-objective-c-2-0-and-renaming-with-synthet

4.0.2 Instance variable 'bar' in class 'Foo' is never used by the methods in its @implementation although it may be used by category methods Perhaps I should use self.bar aBar But for the readonly properties..

Dispelling the UIImage imageNamed: FUD

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

it. However if you do have a large image that you need to redraw often then there are alternatives although the one I would recommend primarily is to avoid redrawing that large image . With respect to the general..

Faster alternative to glReadPixels in iPhone OpenGL ES 2.0

http://stackoverflow.com/questions/9550297/faster-alternative-to-glreadpixels-in-iphone-opengl-es-2-0

It also experiences a significant speedup in practice when compared to using glReadPixels although less than I see with the pixel buffer pool I use with AVAssetWriter. It's a shame that none of this..

IOS 6 force device orientation to landscape

http://stackoverflow.com/questions/12640870/ios-6-force-device-orientation-to-landscape

the user will have to rotate the device to see the data correctly. Another problem after rotating the device back to portrait the orientation goes to portrait although I have specified in supportedInterfaceOrientations only UIInterfaceOrientationMaskLandscape . Why it happens Also NONE of above 3 methods are getting called. Some..

AES Encryption for an NSString on the iPhone

http://stackoverflow.com/questions/1400246/aes-encryption-for-an-nsstring-on-the-iphone

definitely works on Snow Leopard and @Boz reports that CommonCrypto is part of the Core OS on the iPhone. Both 10.4 and 10.5 have usr include CommonCrypto although 10.5 has a man page for CCCryptor.3cc and 10.4 doesn't so YMMV. EDIT See this follow up question on using Base64 encoding for representing encrypted data bytes..

Adding Core Data to existing iPhone project

http://stackoverflow.com/questions/2032818/adding-core-data-to-existing-iphone-project

full with compile error like managedObjectContext undeclared NSPersistentStoreCoordinator undeclared but also with Expected ' ' before NSManagedObjectContext although it seems like the parenthesis are correct ... #pragma mark #pragma mark Core Data stack Returns the managed object context for the application. If the context doesn't.. handle the error appropriately. abort causes the application to generate a crash log and terminate. You should not use this function in a shipping application although it may be useful during development. If it is not possible to recover from the error display an alert panel that instructs the user to quit the application by pressing..

Notification of or detecting screenshot being taken?

http://stackoverflow.com/questions/2121970/notification-of-or-detecting-screenshot-being-taken

the screenshot was taken that would allay his fears. iphone screenshot detection notifications share improve this question Here's a way which might work although it will totally go against user interface guidelines I'm sure. If you force the user to have their finger on the screen for the image to show then I don't think..

JSON and Core Data on the iPhone

http://stackoverflow.com/questions/2362323/json-and-core-data-on-the-iphone

improve this question First pick a JSON library to use I personally like TouchJSON but several others out there are quite nice as well. The complicated part although not very hard is to convert your managed objects into suitable structures for the conversion. I wrote this real quick so it may have an error or two The methods..

iPad Web App: Detect Virtual Keyboard Using JavaScript in Safari?

http://stackoverflow.com/questions/2593139/ipad-web-app-detect-virtual-keyboard-using-javascript-in-safari

which indicate whether the keyboard is visible. javascript iphone ipad safari web applications share improve this question I found a solution which works although it is a bit ugly. It also won't work in every situation but it works for me. Since I'm adapting the size of the user interface to the iPad's window size the user..

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

nicer long term solution it converts your library into a Framework . RECENT CHANGES Info on how to use this script with a project embedded in another project although I highly recommend NOT doing that ever Apple has a couple of show stopper bugs in Xcode if you embed projects inside each other from Xcode 3.x through to Xcode.. iphoneos SDK_VERSION else OTHER_SDK_TO_BUILD iphonesimulator SDK_VERSION fi echo XCode has selected SDK PLATFORM_NAME with version SDK_VERSION although back targetting IPHONEOS_DEPLOYMENT_TARGET echo ...therefore OTHER_SDK_TO_BUILD OTHER_SDK_TO_BUILD # ##################### end of part 1 ################## #####################..

Proper way to exit iPhone application?

http://stackoverflow.com/questions/355168/proper-way-to-exit-iphone-application

How to filter NSFetchedResultsController (CoreData) with UISearchDisplayController/UISearchBar

http://stackoverflow.com/questions/4471289/how-to-filter-nsfetchedresultscontroller-coredata-with-uisearchdisplaycontroll

handle the error appropriately. abort causes the application to generate a crash log and terminate. You should not use this function in a shipping application although it may be useful during development. If it is not possible to recover from the error display an alert panel that instructs the user to quit the application by pressing..

Instance variables with underscore in Objective-C 2.0 and renaming with @synthetize leads to optimization warnings by the 'Analyze' tool of Xcode 4 [duplicate]

http://stackoverflow.com/questions/6124109/instance-variables-with-underscore-in-objective-c-2-0-and-renaming-with-synthet

introduced by Xcode 4 gives me this warning I'm using version 4.0.2 Instance variable 'bar' in class 'Foo' is never used by the methods in its @implementation although it may be used by category methods Perhaps I should use self.bar aBar But for the readonly properties that can't work and beside that I'm not sure if using the..

Dispelling the UIImage imageNamed: FUD

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

image hanging around and likely for longer than you need it. However if you do have a large image that you need to redraw often then there are alternatives although the one I would recommend primarily is to avoid redrawing that large image . With respect to the general behavior of the cache it does cache based on filename so..

Faster alternative to glReadPixels in iPhone OpenGL ES 2.0

http://stackoverflow.com/questions/9550297/faster-alternative-to-glreadpixels-in-iphone-opengl-es-2-0

some code in this answer that I've used for raw pixel extraction. It also experiences a significant speedup in practice when compared to using glReadPixels although less than I see with the pixel buffer pool I use with AVAssetWriter. It's a shame that none of this is documented anywhere because it provides a huge boost to video..

IOS 6 force device orientation to landscape

http://stackoverflow.com/questions/12640870/ios-6-force-device-orientation-to-landscape

to see the data correctly. Another problem after rotating the device back to portrait the orientation goes to portrait although I have specified in supportedInterfaceOrientations only UIInterfaceOrientationMaskLandscape . Why it happens Also NONE of..

AES Encryption for an NSString on the iPhone

http://stackoverflow.com/questions/1400246/aes-encryption-for-an-nsstring-on-the-iphone

@Boz reports that CommonCrypto is part of the Core OS on the iPhone. Both 10.4 and 10.5 have usr include CommonCrypto although 10.5 has a man page for CCCryptor.3cc and 10.4 doesn't so YMMV. EDIT See this follow up question on using Base64 encoding..

Adding Core Data to existing iPhone project

http://stackoverflow.com/questions/2032818/adding-core-data-to-existing-iphone-project

undeclared NSPersistentStoreCoordinator undeclared but also with Expected ' ' before NSManagedObjectContext although it seems like the parenthesis are correct ... #pragma mark #pragma mark Core Data stack Returns the managed object context.. the application to generate a crash log and terminate. You should not use this function in a shipping application although it may be useful during development. If it is not possible to recover from the error display an alert panel that instructs..

Notification of or detecting screenshot being taken?

http://stackoverflow.com/questions/2121970/notification-of-or-detecting-screenshot-being-taken

his fears. iphone screenshot detection notifications share improve this question Here's a way which might work although it will totally go against user interface guidelines I'm sure. If you force the user to have their finger on the screen..

JSON and Core Data on the iPhone

http://stackoverflow.com/questions/2362323/json-and-core-data-on-the-iphone

library to use I personally like TouchJSON but several others out there are quite nice as well. The complicated part although not very hard is to convert your managed objects into suitable structures for the conversion. I wrote this real quick so..

UITableView issue when using separate delegate/dataSource

http://stackoverflow.com/questions/254354/uitableview-issue-when-using-separate-delegate-datasource

I am usually seeing the 3rd option above no error but no visible table view . I added some NSLog calls and found that although numberOfSectionsInTableView and numberOfRowsInSection are both getting called cellForRowAtIndexPath is not. I am convinced..

iPad Web App: Detect Virtual Keyboard Using JavaScript in Safari?

http://stackoverflow.com/questions/2593139/ipad-web-app-detect-virtual-keyboard-using-javascript-in-safari

javascript iphone ipad safari web applications share improve this question I found a solution which works although it is a bit ugly. It also won't work in every situation but it works for me. Since I'm adapting the size of the user interface..

Can the iPhone SDK obtain the Wi-Fi SSID currently connected to?

http://stackoverflow.com/questions/339089/can-the-iphone-sdk-obtain-the-wi-fi-ssid-currently-connected-to

how it's done in the iPhone SDK docs. A private or unpublish method would be acceptable just as a proof of concept although I know that likely wouldn't make it to the AppStore . iphone ios wifi share improve this question This is now possible..

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 into a Framework . RECENT CHANGES Info on how to use this script with a project embedded in another project although I highly recommend NOT doing that ever Apple has a couple of show stopper bugs in Xcode if you embed projects inside each.. OTHER_SDK_TO_BUILD iphonesimulator SDK_VERSION fi echo XCode has selected SDK PLATFORM_NAME with version SDK_VERSION although back targetting IPHONEOS_DEPLOYMENT_TARGET echo ...therefore OTHER_SDK_TO_BUILD OTHER_SDK_TO_BUILD # #####################..

Proper way to exit iPhone application?

http://stackoverflow.com/questions/355168/proper-way-to-exit-iphone-application

Getting displacement from accelerometer data with Core Motion

http://stackoverflow.com/questions/4449565/getting-displacement-from-accelerometer-data-with-core-motion

or virtual forces . This is some strategy to react on several bad situations triggering the object to drift away although the device remains fixed no native speaker I mean without moving in your hands. The most troubling one is a velocity greater..

How to filter NSFetchedResultsController (CoreData) with UISearchDisplayController/UISearchBar

http://stackoverflow.com/questions/4471289/how-to-filter-nsfetchedresultscontroller-coredata-with-uisearchdisplaycontroll

the application to generate a crash log and terminate. You should not use this function in a shipping application although it may be useful during development. If it is not possible to recover from the error display an alert panel that instructs..

Sort an NSMutableDictionary

http://stackoverflow.com/questions/4558639/sort-an-nsmutabledictionary

an NSMutableDictionary I have an NSMutableDictionary that maps NSString to NSString although the values are NSStrings they are really just integers . For example consider the following mappings dog 4 cat 3 turtle..

Animation in OpenGL ES view freezes when UIScrollView is dragged on iPhone

http://stackoverflow.com/questions/4876488/animation-in-opengl-es-view-freezes-when-uiscrollview-is-dragged-on-iphone

to some very poor control responsiveness so you need to be careful. It'd be to diverge from the topic massively but although OpenGL is modal and therefore not particularly threading friendly you can use an EAGLSharegroup to do rendering on a separate..

Instance variables with underscore in Objective-C 2.0 and renaming with @synthetize leads to optimization warnings by the 'Analyze' tool of Xcode 4 [duplicate]

http://stackoverflow.com/questions/6124109/instance-variables-with-underscore-in-objective-c-2-0-and-renaming-with-synthet

I'm using version 4.0.2 Instance variable 'bar' in class 'Foo' is never used by the methods in its @implementation although it may be used by category methods Perhaps I should use self.bar aBar But for the readonly properties that can't work and..

Where would you place your SQLite database file in an iPhone app?

http://stackoverflow.com/questions/717108/where-would-you-place-your-sqlite-database-file-in-an-iphone-app

database manually adding the database file to the project where I'm currently reading the whole SQLite documentation although that's not much iPhone related. iphone sqlite share improve this question You need to add the SQLite file to your Xcode..

Dispelling the UIImage imageNamed: FUD

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

than you need it. However if you do have a large image that you need to redraw often then there are alternatives although the one I would recommend primarily is to avoid redrawing that large image . With respect to the general behavior of the..

Faster alternative to glReadPixels in iPhone OpenGL ES 2.0

http://stackoverflow.com/questions/9550297/faster-alternative-to-glreadpixels-in-iphone-opengl-es-2-0

for raw pixel extraction. It also experiences a significant speedup in practice when compared to using glReadPixels although less than I see with the pixel buffer pool I use with AVAssetWriter. It's a shame that none of this is documented anywhere..

iPhone board game: OpenGL ES or CoreGraphics? [closed]

http://stackoverflow.com/questions/1082511/iphone-board-game-opengl-es-or-coregraphics

iOS 6 Facebook posting procedure ends up with “remote_app_id does not match stored id” error

http://stackoverflow.com/questions/12644229/ios-6-facebook-posting-procedure-ends-up-with-remote-app-id-does-not-match-stor

up with &ldquo remote_app_id does not match stored id&rdquo error this is my third question about posting on Facebook Although this may be a duplicate of Mac OS X Facebook login failed no stored remote_app_id for app but I decided to post separate..

iOS 6 Facebook posting procedure ends up with “remote_app_id does not match stored id”

http://stackoverflow.com/questions/12671420/ios-6-facebook-posting-procedure-ends-up-with-remote-app-id-does-not-match-stor

ends up with &ldquo remote_app_id does not match stored id&rdquo this is my third question about posting on Facebook Although this may be a duplicate of Mac OS X Facebook login failed no stored remote_app_id for app but I decided to post separate..

Getting Image from URL/server

http://stackoverflow.com/questions/1286096/getting-image-from-url-server

not return the expected image although I can see in debugger that NSData for the Image object has some value in bytes Although a very similar function for getting text from server works and I get expected values. NSString jsonFromURLString NSString..

Custom Delete button On Editing in UITableView Cell

http://stackoverflow.com/questions/1615469/custom-delete-button-on-editing-in-uitableview-cell

it at the red button that Apple provides. Why change it Its globally recognizable as the standard for delete buttons. Although if you want something like Tweetie where you completely change the behavior of swiping you could use something like ABTableViewCell..

iPhone Dev: UIWebView baseUrl to resources in Documents folder not App bundle

http://stackoverflow.com/questions/1926117/iphone-dev-uiwebview-baseurl-to-resources-in-documents-folder-not-app-bundle

problem. The trick is with the formatting of the string path when creating an NSURL object for baseURL of a UIWebView. Although usually I use the typical Users ..... dir file in most cases loading using UIWebView's loadHTMLString baseURL needs a different.. @ imagePath Do take note of the replacing of the strings and also the NSString stringWithFormat @ file @ imagePath Although the example code above is retrieving the path to the mainBundle of the application it can also work in other folders ie..

Accessing & Using the MobileWiFi.framework

http://stackoverflow.com/questions/2018110/accessing-using-the-mobilewifi-framework

share improve this question For anybody who stumbles upon this question here's my library to access 802.11 networks. Although Apple claims to deny any applications that use private frameworks there are several closed sourced WiFi applications on..

Detect retina screen/iPhone 4 in iPhone SDK

http://stackoverflow.com/questions/3272752/detect-retina-screen-iphone-4-in-iphone-sdk

issues has been discussed in length there. The best way to me seems to be the use of the scale property of UIScreen . Although it is only available in iOS 4 and later it will tell you everything you need to know and will most likely play an even more..

What happens to an iPhone app when iPhone goes into stand-by mode?

http://stackoverflow.com/questions/411436/what-happens-to-an-iphone-app-when-iphone-goes-into-stand-by-mode

to third party apps when the iPhone is the stand by mode iphone cocoa touch monotouch share improve this question Although it's not evident here I believe the original poster did find an answer to his question by starting a thread available here..

Do you need to create an NSAutoreleasePool within a block in GCD?

http://stackoverflow.com/questions/4141123/do-you-need-to-create-an-nsautoreleasepool-within-a-block-in-gcd

want to enclose parts of your block ™s code in an @autorelease block to handle the memory management for those objects. Although GCD dispatch queues have their own autorelease pools they make no guarantees as to when those pools are drained. If your..

Use Key Value Observing to get a KVO callback on a UIView's frame

http://stackoverflow.com/questions/4874288/use-key-value-observing-to-get-a-kvo-callback-on-a-uiviews-frame

of the UIKit framework are generally not observable as with any other system framework. From the documentation Note Although the classes of the UIKit framework generally do not support KVO you can still implement it in the custom objects of your..

Suspend the application

http://stackoverflow.com/questions/5360846/suspend-the-application

reason for this is explained earlier in that document People not applications should initiate and control actions. Although an application can suggest a course of action or warn about dangerous consequences it ™s usually a mistake for the app to..

iPhone/iPad App Code Obfuscation - Is it Possible? Worth it?

http://stackoverflow.com/questions/5556849/iphone-ipad-app-code-obfuscation-is-it-possible-worth-it

want the business competitors to be able to decompile it. The copy protection is already been taken care of on iOS. Although through jailbreaking a normal app can be copied and run I'd say the actual number of users who do this is fairly low at..

What do I have to learn to get done with a 3D racing game for the iPhone? What Tools do I need?

http://stackoverflow.com/questions/581784/what-do-i-have-to-learn-to-get-done-with-a-3d-racing-game-for-the-iphone-what-t

about Photoshop. I know how to use TurboCAD 10 Professional so I do have some experience in 3D object modelling. Although not much. What do I have to learn step by step to come to 3D game Development for iPhone What Tools do I need Which Books..

Can you reference Xib files from static libraries on the iPhone?

http://stackoverflow.com/questions/707429/can-you-reference-xib-files-from-static-libraries-on-the-iphone

linked together by the library creator. It does not contain other files it is essentially a database of compiled code. Although it would be possible to put the data for the xibs in there Xcode would have no way of knowing that it was in there as it..

SFHFKeychainUtils. iOS keychain. ARC compatible

http://stackoverflow.com/questions/7663443/sfhfkeychainutils-ios-keychain-arc-compatible

ARC to passing x parameter to y parameter discards qualifiers . Obviously the first snip of code gives an error too. Although I get no errors when building app crashes with EXC_BAD_ACCESS when reaching this part of code. The link for the full SFHFKeychainUtils..

Has anyone implemented the PayPal API through a native iPhone app?

http://stackoverflow.com/questions/779423/has-anyone-implemented-the-paypal-api-through-a-native-iphone-app

this question Re Update As answered below this code may still be useful for the purchase of physical goods Update Although this code works App Store terms won't allow you to use this code within an app. Original Answer I figured this out after..

iCloud basics and code sample [closed]

http://stackoverflow.com/questions/7795629/icloud-basics-and-code-sample

by the iCloud daemon. Even though the file is no longer in your sandbox your app still has full access to it. Although a copy of the file remains local to the current device the file is also sent to iCloud so that it can be distributed to..

UIWebView - How to identify the “last” webViewDidFinishLoad message?

http://stackoverflow.com/questions/908367/uiwebview-how-to-identify-the-last-webviewdidfinishload-message

objective c uiwebview share improve this question Interesting I wouldn't have thought it would work like that. Although I'm sure there are other ways to do it is there a way to extract the URL from the webViewDidFinishLoad message so that you..