¡@

Home 

2014/10/15 ¤U¤È 10:14:46

iphone Programming Glossary: target_os_iphone

How do I do inline assembly on the IPhone?

http://stackoverflow.com/questions/238010/how-do-i-do-inline-assembly-on-the-iphone

Which conditional compile to use to switch between Mac and iPhone specific code?

http://stackoverflow.com/questions/3181321/which-conditional-compile-to-use-to-switch-between-mac-and-iphone-specific-code

use conditional compile switches to exclude Mac specific code from the iPhone project and vice versa I've noticed that TARGET_OS_IPHONE and TARGET_OS_MAC are both 1 and so they are both always true. Is there another switch I can use that will only return true.. 3.2 and earlier and Mac OS 10.5 and earlier than it does for iOS 4 and Mac OS 10.6. The conditional I'm using is #if TARGET_OS_IPHONE __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_3_2 TARGET_OS_MAC MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_5 This seems.. will be 1 when building a Mac or iPhone application. You're right it's quite useless for this sort of thing. However TARGET_OS_IPHONE is 0 when building a Mac application. I use TARGET_OS_IPHONE in my headers all the time for this purpose. Like this #if..

When to use NSInteger vs int?

http://stackoverflow.com/questions/4445173/when-to-use-nsinteger-vs-int

are defined as dynamic typedef s to one of these types and they are defined like this #if __LP64__ TARGET_OS_EMBEDDED TARGET_OS_IPHONE TARGET_OS_WIN32 NS_BUILD_32_LIKE_64 typedef long NSInteger typedef unsigned long NSUInteger #else typedef int NSInteger..

iPhone - Code of system sounds

http://stackoverflow.com/questions/5273402/iphone-code-of-system-sounds

Use this constant with the play sound APIs to flash the screen Desktop systems only enum #if TARGET_OS_IPHONE kSystemSoundID_Vibrate 0x00000FFF #else kSystemSoundID_UserPreferredAlert 0x00001000 kSystemSoundID_FlashScreen 0x00000FFE..

Shuffling an array in objective-c [duplicate]

http://stackoverflow.com/questions/5659718/shuffling-an-array-in-objective-c

nsmutablearray nsarray share improve this question Add a category to NSMutableArray NSMutableArray_Shuffling.h #if TARGET_OS_IPHONE #import UIKit UIKit.h #else #include Cocoa Cocoa.h #endif This category enhances NSMutableArray by providing methods to..

How to target a specific iPhone version?

http://stackoverflow.com/questions/820142/how-to-target-a-specific-iphone-version

to target just 3.0 and ignore 2.2.1 etc. There is an ifdef statement but it just seems to cover the entire iPhone #if TARGET_OS_IPHONE Any help is appreciated. iphone share improve this question You can use this #define to change what you build for each..