iphone Programming Glossary: unit
iPhone Keyboard Covers UITextField http://stackoverflow.com/questions/1247113/iphone-keyboard-covers-uitextfield need to put the text field and some of the other items into another view and slide the view as a unit. I call these things plates as in tectonic plates but that's just me . But here is the general idea..
Where to place the “Core Data Stack” in a Cocoa/Cocoa Touch application http://stackoverflow.com/questions/1267520/where-to-place-the-core-data-stack-in-a-cocoa-cocoa-touch-application you might want to use a different context to perform a discrete set of actions. The appropriate unit of currency for a view controller is therefore usually a managed object context otherwise a managed..
How to get the RGB values for a pixel on an image on the iphone http://stackoverflow.com/questions/144250/how-to-get-the-rgb-values-for-a-pixel-on-an-image-on-the-iphone CGDataProviderCopyData CGImageGetDataProvider self CGImage Create a buffer to store bitmap data unitialized memory as long as the data self setPixelBitData malloc CFDataGetLength bitmapData Copy image.. pixelByteData Essentially what we're doing is making a second pointer that divides the byteData's units differently instead of dividing each unit as 1 byte we will divide each unit as 3 bytes 1 pixel . pixelData.. is making a second pointer that divides the byteData's units differently instead of dividing each unit as 1 byte we will divide each unit as 3 bytes 1 pixel . pixelData RGBPixel pixelByteData Now you can..
How to set Local Notification repeat interval to custom time interval? http://stackoverflow.com/questions/4363847/how-to-set-local-notification-repeat-interval-to-custom-time-interval Local Notifications. In local notifications there is repeatInterval property where we can put the unit repeat intervals for mintute hour day week year etc. I want that repeat interval should be 4 hours...
Rendering to non-power-of-two texture on iPhone http://stackoverflow.com/questions/4760174/rendering-to-non-power-of-two-texture-on-iphone that is not NEAREST or LINEAR is considered incomplete. If such a texture is bound to a texture unit it is as if texture mapping were disabled for that texture unit. You can use the following code to determine.. a texture is bound to a texture unit it is as if texture mapping were disabled for that texture unit. You can use the following code to determine if this extension is supported on your device drawn from..
iPhone - strange error when testing on simulator http://stackoverflow.com/questions/788277/iphone-strange-error-when-testing-on-simulator I try to run the app. What should I do to be able to run the app on my simulator again iphone unit testing ios simulator share improve this question Try quitting and restarting the simulator If worse..
iPhone Keyboard Covers UITextField http://stackoverflow.com/questions/1247113/iphone-keyboard-covers-uitextfield an animation and then back down when you are done. You may need to put the text field and some of the other items into another view and slide the view as a unit. I call these things plates as in tectonic plates but that's just me . But here is the general idea if you don't need to get fancy. void textFieldDidBeginEditing..
Where to place the “Core Data Stack” in a Cocoa/Cocoa Touch application http://stackoverflow.com/questions/1267520/where-to-place-the-core-data-stack-in-a-cocoa-cocoa-touch-application Moreover in some situations as described in the documentation you might want to use a different context to perform a discrete set of actions. The appropriate unit of currency for a view controller is therefore usually a managed object context otherwise a managed object. Using and passing a singleton object that manages a..
How to get the RGB values for a pixel on an image on the iphone http://stackoverflow.com/questions/144250/how-to-get-the-rgb-values-for-a-pixel-on-an-image-on-the-iphone the receiver's CGImage see UIImage docs self setBitmapData CGDataProviderCopyData CGImageGetDataProvider self CGImage Create a buffer to store bitmap data unitialized memory as long as the data self setPixelBitData malloc CFDataGetLength bitmapData Copy image data into allocated buffer CFDataGetBytes bitmapData CFRangeMake.. pixelByteData Cast a pointer to the first element of pixelByteData Essentially what we're doing is making a second pointer that divides the byteData's units differently instead of dividing each unit as 1 byte we will divide each unit as 3 bytes 1 pixel . pixelData RGBPixel pixelByteData Now you can access pixels by.. first element of pixelByteData Essentially what we're doing is making a second pointer that divides the byteData's units differently instead of dividing each unit as 1 byte we will divide each unit as 3 bytes 1 pixel . pixelData RGBPixel pixelByteData Now you can access pixels by index pixelData index NSLog @ Pixel data one..
How to set Local Notification repeat interval to custom time interval? http://stackoverflow.com/questions/4363847/how-to-set-local-notification-repeat-interval-to-custom-time-interval I am making an iPhone app which has a requirement of Local Notifications. In local notifications there is repeatInterval property where we can put the unit repeat intervals for mintute hour day week year etc. I want that repeat interval should be 4 hours. So every 4 hours the local notification comes. I dont want the..
Rendering to non-power-of-two texture on iPhone http://stackoverflow.com/questions/4760174/rendering-to-non-power-of-two-texture-on-iphone with a wrap mode that is not CLAMP_TO_EDGE or a minfilter that is not NEAREST or LINEAR is considered incomplete. If such a texture is bound to a texture unit it is as if texture mapping were disabled for that texture unit. You can use the following code to determine if this extension is supported on your device drawn.. is not NEAREST or LINEAR is considered incomplete. If such a texture is bound to a texture unit it is as if texture mapping were disabled for that texture unit. You can use the following code to determine if this extension is supported on your device drawn from Philip Rideout's excellent iPhone 3D Programming book const..
iPhone - strange error when testing on simulator http://stackoverflow.com/questions/788277/iphone-strange-error-when-testing-on-simulator simulator doing a clean build but I still get this error when I try to run the app. What should I do to be able to run the app on my simulator again iphone unit testing ios simulator share improve this question Try quitting and restarting the simulator If worse comes to worst you can always try restarting in my experience..
iPhone Keyboard Covers UITextField http://stackoverflow.com/questions/1247113/iphone-keyboard-covers-uitextfield you are done. You may need to put the text field and some of the other items into another view and slide the view as a unit. I call these things plates as in tectonic plates but that's just me . But here is the general idea if you don't need to..
Where to place the “Core Data Stack” in a Cocoa/Cocoa Touch application http://stackoverflow.com/questions/1267520/where-to-place-the-core-data-stack-in-a-cocoa-cocoa-touch-application in the documentation you might want to use a different context to perform a discrete set of actions. The appropriate unit of currency for a view controller is therefore usually a managed object context otherwise a managed object. Using and passing..
What's the point of NSAssert, actually? http://stackoverflow.com/questions/1375786/whats-the-point-of-nsassert-actually
How to get the RGB values for a pixel on an image on the iphone http://stackoverflow.com/questions/144250/how-to-get-the-rgb-values-for-a-pixel-on-an-image-on-the-iphone self setBitmapData CGDataProviderCopyData CGImageGetDataProvider self CGImage Create a buffer to store bitmap data unitialized memory as long as the data self setPixelBitData malloc CFDataGetLength bitmapData Copy image data into allocated.. the first element of pixelByteData Essentially what we're doing is making a second pointer that divides the byteData's units differently instead of dividing each unit as 1 byte we will divide each unit as 3 bytes 1 pixel . pixelData RGBPixel pixelByteData.. what we're doing is making a second pointer that divides the byteData's units differently instead of dividing each unit as 1 byte we will divide each unit as 3 bytes 1 pixel . pixelData RGBPixel pixelByteData Now you can access pixels by index..
Double vs float on the iPhone http://stackoverflow.com/questions/1622729/double-vs-float-on-the-iphone data in the caches. On the Cortex A8 iPhone3GS iPhone4 and iPad single precision arithmetic is done on the NEON unit instead of VFP and is substantially faster. Make sure to turn off thumb mode in your compile settings for armv6 if you are..
Implementing Unit Testing with the iPhone SDK http://stackoverflow.com/questions/2002330/implementing-unit-testing-with-the-iphone-sdk Unit Testing with the iPhone SDK So I've followed this tutorial to setup unit testing on my app when I got a little stuck. At bullet point 8 in that tutorial it shows this image which is what I should.. I get when I build. I get this error message Command bin sh failed with exit code 1 as well as the error message the unit test has created. Then when I expand on the first error I get this PhaseScriptExecution Run Script build 3D Pool.build Debug.. This one is from an older version 3.1.4 . The project for both was unchanged . Edit Image URLS updated. iphone xcode unit testing share improve this question Double click 'Run script' under 'Targets' 'Your script target name' then type #..
iPhone - get number of days between two dates http://stackoverflow.com/questions/3075356/iphone-get-number-of-days-between-two-dates number of days between the two days. What am I doing wrong here EDIT I wrote another method. I haven't done extensive unit tests but so far it seems to work NSInteger daysFromDate NSDate fromDate inTimeZone NSTimeZone fromTimeZone untilDate NSDate.. untilDate NSDate toDate inTimeZone NSTimeZone toTimeZone NSCalendar calendar NSCalendar currentCalendar unsigned unitFlags NSYearCalendarUnit NSMonthCalendarUnit NSDayCalendarUnit NSHourCalendarUnit NSMinuteCalendarUnit NSSecondCalendarUnit.. NSSecondCalendarUnit calendar setTimeZone fromTimeZone NSDateComponents fromDateComponents calendar components unitFlags fromDate fromDate calendar setTimeZone toTimeZone NSDateComponents toDateComponents calendar components unitFlags fromDate..
how to programmatically fake a touch event to a UIButton? http://stackoverflow.com/questions/4028734/how-to-programmatically-fake-a-touch-event-to-a-uibutton to programmatically fake a touch event to a UIButton I'm writing some unit tests and because of the nature of this particular app it's important that I get as high up the UI chain as possible. So..
How to set Local Notification repeat interval to custom time interval? http://stackoverflow.com/questions/4363847/how-to-set-local-notification-repeat-interval-to-custom-time-interval has a requirement of Local Notifications. In local notifications there is repeatInterval property where we can put the unit repeat intervals for mintute hour day week year etc. I want that repeat interval should be 4 hours. So every 4 hours the..
Rendering to non-power-of-two texture on iPhone http://stackoverflow.com/questions/4760174/rendering-to-non-power-of-two-texture-on-iphone or a minfilter that is not NEAREST or LINEAR is considered incomplete. If such a texture is bound to a texture unit it is as if texture mapping were disabled for that texture unit. You can use the following code to determine if this extension.. incomplete. If such a texture is bound to a texture unit it is as if texture mapping were disabled for that texture unit. You can use the following code to determine if this extension is supported on your device drawn from Philip Rideout's excellent..
Setting up a plist to store application data (not settings) for an iPhone game http://stackoverflow.com/questions/4911688/setting-up-a-plist-to-store-application-data-not-settings-for-an-iphone-game is config.plist Get the path for the resource file. Though be careful of NSBundle mainBundle as it will not return the unit test bundle in a unit test. NSString plistPath NSBundle mainBundle pathForResource @ config ofType @ plist Your root object.. path for the resource file. Though be careful of NSBundle mainBundle as it will not return the unit test bundle in a unit test. NSString plistPath NSBundle mainBundle pathForResource @ config ofType @ plist Your root object is an array of levels...
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 code separated into a static library to make it easier to set up the xcode project targets for the actual app and for unit tests for my code. The problem with this is that i want to put most of my xib files in the static library as well but it..
iPhone - strange error when testing on simulator http://stackoverflow.com/questions/788277/iphone-strange-error-when-testing-on-simulator get this error when I try to run the app. What should I do to be able to run the app on my simulator again iphone unit testing ios simulator share improve this question Try quitting and restarting the simulator If worse comes to worst..
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 file is empty any body have idea about what shall i do the output audio file is empty this is intializing the audio unit void initializaeOutputUnit OSStatus status Describe audio component AudioComponentDescription desc desc.componentType kAudioUnitType_Output.. kAudioUnitManufacturer_Apple Get component AudioComponent inputComponent AudioComponentFindNext NULL desc Get audio units status AudioComponentInstanceNew inputComponent audioUnit Enable IO for recording UInt32 flag 1 status AudioUnitSetProperty.. Recording void stopRecord AudioOutputUnitStop audioUnit AudioUnitUninitialize audioUnit iphone ios5 core audio audiounit share improve this question In initializaeOutputUnit you only created your audio file OSStatus setupErr ExtAudioFileCreateWithURL..
Test Driven Design for iPhone Native apps http://stackoverflow.com/questions/195820/test-driven-design-for-iphone-native-apps Expecting # expected.chr at offset # data.length unless expected nil end end class TestMyModel Test Unit TestCase include OSX include MyTestExtensions def this_files_dir return parent_directory __FILE__ end def setup @expectedReq..
Implementing Unit Testing with the iPhone SDK http://stackoverflow.com/questions/2002330/implementing-unit-testing-with-the-iphone-sdk Unit Testing with the iPhone SDK So I've followed this tutorial to setup unit testing on my app when I got a little stuck. At.. 3D Pool.build Debug iphonesimulator LogicTests.build Script 1A6BA6AE10F28F40008AC2A8.sh Developer Tools RunPlatformUnitTests.include 412 note Started tests for architectures 'i386' Developer Tools RunPlatformUnitTests.include 419 note Running.. Tools RunPlatformUnitTests.include 412 note Started tests for architectures 'i386' Developer Tools RunPlatformUnitTests.include 419 note Running tests for architecture 'i386' GC OFF objc 12589 GC forcing GC OFF because OBJC_DISABLE_GC..
where to start with audio synthesis on iPhone http://stackoverflow.com/questions/2067267/where-to-start-with-audio-synthesis-on-iphone to use custom audio units for the iPhone. At first glance this sounds promising since there's lots and lots of Audio Unit programming resources available. However using custom audio units on the iPhone seems a bit tricky see http lists.apple.com..
SenTestCase in Xcode 3.2 and XCBuildLogCommandInvocationSection Errors http://stackoverflow.com/questions/3516745/sentestcase-in-xcode-3-2-and-xcbuildlogcommandinvocationsection-errors from ' Developer Library Frameworks' and just created by target by 'Targets Add New Target Cocoa Touch Unit Test Bundle'. Any ideas Thanks iphone objective c cocoa touch share improve this question It seems to be a regression.. that I found somewhere on Google is to change the Run Script stage of the target. Change SYSTEM_DEVELOPER_DIR Tools RunUnitTests to SYSTEM_DEVELOPER_DIR Tools RunUnitTests 1 tmp RunUnitTests.out It ™s working round the issue rather than solving.. the Run Script stage of the target. Change SYSTEM_DEVELOPER_DIR Tools RunUnitTests to SYSTEM_DEVELOPER_DIR Tools RunUnitTests 1 tmp RunUnitTests.out It ™s working round the issue rather than solving it but does work. share improve this answer..
Record and play audio Simultaneously http://stackoverflow.com/questions/4215180/record-and-play-audio-simultaneously this question You can play and record simultaneously on iOS devices except the 1st gen Touch using either the Audio Unit RemoteIO or the Audio Queue API. These are lower level APIs where you have to handle the incoming buffers of outgoing and..
How to set Local Notification repeat interval to custom time interval? http://stackoverflow.com/questions/4363847/how-to-set-local-notification-repeat-interval-to-custom-time-interval Got the answer It is as straight as it gets. You cannot create custom repeat intervals. You have to use on NSCalendarUnit's in built Unit Time Intervals . I tried all the above solutions and even tried other stuffs but neither of them worked... It is as straight as it gets. You cannot create custom repeat intervals. You have to use on NSCalendarUnit's in built Unit Time Intervals . I tried all the above solutions and even tried other stuffs but neither of them worked. I have invested..
Unit testing in XCode 4 http://stackoverflow.com/questions/4388370/unit-testing-in-xcode-4 testing in XCode 4 I've managed to set up unit tests for my library in Xcode 4. I've performed builds with tests that I.. share improve this question I realise it doesn't directly answer your question but forget SenTestingKit and use GHUnit. It'll take you about 10 minutes to figure out much more straightforward than OCUnit and will save you a lot of headaches... forget SenTestingKit and use GHUnit. It'll take you about 10 minutes to figure out much more straightforward than OCUnit and will save you a lot of headaches. IMHO Apple should be shipping it with Xcode instead of OCUnit. GHUnit can run your..
MIDI player/synthesizer library for the iPhone http://stackoverflow.com/questions/449057/midi-player-synthesizer-library-for-the-iphone
how to implement application tests in xcode4? http://stackoverflow.com/questions/5637272/how-to-implement-application-tests-in-xcode4 worked for me was as follows Assuming you have an application target called MyApp Add a new target of type other Cocoa Unit Testing Bundle to the project e.g MyAppTesting . Here all Unit test files are located. Go to MyAppTesting Build Phases and.. called MyApp Add a new target of type other Cocoa Unit Testing Bundle to the project e.g MyAppTesting . Here all Unit test files are located. Go to MyAppTesting Build Phases and add MyApp as Target Dependency. This assures that MyApp is build..
Unit Test can't find Core Data model file http://stackoverflow.com/questions/5662947/unit-test-cant-find-core-data-model-file Test can't find Core Data model file I've created a project with a Core Data model in it. The application looks for the.. this question Unfortunately a unit test target does not use the application's main bundle but it creates a special UnitTest bundle. So if you need to use bundled resources like a Core Data model within your tests you need to work around that..
Strange behavior of select/dropdown's onchange() JS event when using 'Next' on Mobile Safari Dropdown list item select box http://stackoverflow.com/questions/5960731/strange-behavior-of-select-dropdowns-onchange-js-event-when-using-next-on-m value Please wait ... option select br Street select id ddlStreet option value Select Area or Town option select br Unit select id ddlUnit option value No Street Selected option select script type text javascript var ddlArea ddlTown ddlStreet.. ... option select br Street select id ddlStreet option value Select Area or Town option select br Unit select id ddlUnit option value No Street Selected option select script type text javascript var ddlArea ddlTown ddlStreet ddlUnit function.. id ddlUnit option value No Street Selected option select script type text javascript var ddlArea ddlTown ddlStreet ddlUnit function AppStart ddlArea document.getElementById ddlArea ddlTown document.getElementById ddlTown ddlStreet document.getElementById..
Write Audio To Disk From IO Unit http://stackoverflow.com/questions/6930609/write-audio-to-disk-from-io-unit Audio To Disk From IO Unit Rewriting this question to be a little more succient. My problem is that I cant successfully write an audio file to disk.. to be a little more succient. My problem is that I cant successfully write an audio file to disk from a remote IO Unit. The steps I took were to Open an mp3 file and extract its audio to buffers. I set up an asbd to use with my graph based.. seem to clear up on my own. setup stereo stream format void setupStereoStreamFormat size_t bytesPerSample sizeof AudioUnitSampleType stereoStreamFormat.mFormatID kAudioFormatLinearPCM stereoStreamFormat.mFormatFlags kAudioFormatFlagsAudioUnitCanonical..
iOS Stream Audio from one iOS Device to Another http://stackoverflow.com/questions/8357514/ios-stream-audio-from-one-ios-device-to-another on until you either stop the queue or there's no more data to playback. The two main lower level APIs in iOS are Audio Unit and Audio Queue. By lower level I mean an API that is a bit more nitty gritty than saying just play back this mp3 or whatever... API that is a bit more nitty gritty than saying just play back this mp3 or whatever. My experience has been that Audio Unit is lower latency but that Audio Queue is more suited to streaming audio. So I think for you the latter is a better option...
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 anybody help me in recording iPhone output sound through Audio Unit this is my code i use this code to record the iPhone output audio by using Audio Unit then saving the output in output.caf.. output sound through Audio Unit this is my code i use this code to record the iPhone output audio by using Audio Unit then saving the output in output.caf but the output.caf file is empty any body have idea about what shall i do the output.. idea about what shall i do the output audio file is empty this is intializing the audio unit void initializaeOutputUnit OSStatus status Describe audio component AudioComponentDescription desc desc.componentType kAudioUnitType_Output desc.componentSubType..
|