iphone Programming Glossary: numberwithfloat
How do I record audio on iPhone with AVAudioRecorder? http://stackoverflow.com/questions/1010343/how-do-i-record-audio-on-iphone-with-avaudiorecorder NSNumber numberWithInt kAudioFormatLinearPCM forKey AVFormatIDKey recordSetting setValue NSNumber numberWithFloat 44100.0 forKey AVSampleRateKey recordSetting setValue NSNumber numberWithInt 2 forKey AVNumberOfChannelsKey..
How can I animate the movement of a view or image along a curved path? http://stackoverflow.com/questions/1142727/how-can-i-animate-the-movement-of-a-view-or-image-along-a-curved-path CABasicAnimation animationWithKeyPath @ opacity fadeOutAnimation setToValue NSNumber numberWithFloat 0.3 fadeOutAnimation.fillMode kCAFillModeForwards fadeOutAnimation.removedOnCompletion NO Set up scaling..
Problem setting exif data for an image http://stackoverflow.com/questions/5125323/problem-setting-exif-data-for-an-image iref NULL add back exif NSDictionary props NSDictionary dictionaryWithObjectsAndKeys NSNumber numberWithFloat .1 kCGImageDestinationLossyCompressionQuality metadataDict kCGImagePropertyExifDictionary the exif.. GPSDictionary NSMutableDictionary dictionary Setup GPS dict GPSDictionary setValue NSNumber numberWithFloat _lat forKey NSString kCGImagePropertyGPSLatitude GPSDictionary setValue NSNumber numberWithFloat _lon.. numberWithFloat _lat forKey NSString kCGImagePropertyGPSLatitude GPSDictionary setValue NSNumber numberWithFloat _lon forKey NSString kCGImagePropertyGPSLongitude GPSDictionary setValue lat_ref forKey NSString kCGImagePropertyGPSLatitudeRef..
Can I use CGAffineTransformMakeRotation to rotate a view more than 360 degrees? http://stackoverflow.com/questions/542739/can-i-use-cgaffinetransformmakerotation-to-rotate-a-view-more-than-360-degrees CABasicAnimation animationWithKeyPath @ transform.rotation.z rotationAnimation.toValue NSNumber numberWithFloat M_PI 2.0 full rotation rotations duration rotationAnimation.duration duration rotationAnimation.cumulative..
Make movie file with picture Array and song file, using AVAsset http://stackoverflow.com/questions/6061092/make-movie-file-with-picture-array-and-song-file-using-avasset NSNumber numberWithInt kAudioFormatMPEG4AAC AVFormatIDKey NSNumber numberWithFloat 44100.0 AVSampleRateKey NSNumber numberWithInt 1 AVNumberOfChannelsKey NSNumber numberWithInt 192000..
How do I record audio on iPhone with AVAudioRecorder? http://stackoverflow.com/questions/1010343/how-do-i-record-audio-on-iphone-with-avaudiorecorder NSMutableDictionary alloc init recordSetting setValue NSNumber numberWithInt kAudioFormatLinearPCM forKey AVFormatIDKey recordSetting setValue NSNumber numberWithFloat 44100.0 forKey AVSampleRateKey recordSetting setValue NSNumber numberWithInt 2 forKey AVNumberOfChannelsKey recordSetting setValue NSNumber numberWithInt 16 forKey..
How can I animate the movement of a view or image along a curved path? http://stackoverflow.com/questions/1142727/how-can-i-animate-the-movement-of-a-view-or-image-along-a-curved-path Set up fade out effect CABasicAnimation fadeOutAnimation CABasicAnimation animationWithKeyPath @ opacity fadeOutAnimation setToValue NSNumber numberWithFloat 0.3 fadeOutAnimation.fillMode kCAFillModeForwards fadeOutAnimation.removedOnCompletion NO Set up scaling CABasicAnimation resizeAnimation CABasicAnimation animationWithKeyPath..
Problem setting exif data for an image http://stackoverflow.com/questions/5125323/problem-setting-exif-data-for-an-image saved options. CGImageDestinationAddImage myImageDest iref NULL add back exif NSDictionary props NSDictionary dictionaryWithObjectsAndKeys NSNumber numberWithFloat .1 kCGImageDestinationLossyCompressionQuality metadataDict kCGImagePropertyExifDictionary the exif metadata nil kCGImagePropertyExifAuxDictionary CGImageDestinationSetProperties.. EXIFDictionary NSMutableDictionary dictionary if GPSDictionary GPSDictionary NSMutableDictionary dictionary Setup GPS dict GPSDictionary setValue NSNumber numberWithFloat _lat forKey NSString kCGImagePropertyGPSLatitude GPSDictionary setValue NSNumber numberWithFloat _lon forKey NSString kCGImagePropertyGPSLongitude GPSDictionary.. dictionary Setup GPS dict GPSDictionary setValue NSNumber numberWithFloat _lat forKey NSString kCGImagePropertyGPSLatitude GPSDictionary setValue NSNumber numberWithFloat _lon forKey NSString kCGImagePropertyGPSLongitude GPSDictionary setValue lat_ref forKey NSString kCGImagePropertyGPSLatitudeRef GPSDictionary setValue lon_ref forKey..
Can I use CGAffineTransformMakeRotation to rotate a view more than 360 degrees? http://stackoverflow.com/questions/542739/can-i-use-cgaffinetransformmakerotation-to-rotate-a-view-more-than-360-degrees duration CABasicAnimation rotationAnimation rotationAnimation CABasicAnimation animationWithKeyPath @ transform.rotation.z rotationAnimation.toValue NSNumber numberWithFloat M_PI 2.0 full rotation rotations duration rotationAnimation.duration duration rotationAnimation.cumulative YES rotationAnimation.repeatCount 1.0 rotationAnimation.timingFunction..
Make movie file with picture Array and song file, using AVAsset http://stackoverflow.com/questions/6061092/make-movie-file-with-picture-array-and-song-file-using-avasset NSDictionary audioSettings NSDictionary dictionaryWithObjectsAndKeys NSNumber numberWithInt kAudioFormatMPEG4AAC AVFormatIDKey NSNumber numberWithFloat 44100.0 AVSampleRateKey NSNumber numberWithInt 1 AVNumberOfChannelsKey NSNumber numberWithInt 192000 AVEncoderBitRateKey NSData dataWithBytes channelLayout..
How do I record audio on iPhone with AVAudioRecorder? http://stackoverflow.com/questions/1010343/how-do-i-record-audio-on-iphone-with-avaudiorecorder setValue NSNumber numberWithInt kAudioFormatLinearPCM forKey AVFormatIDKey recordSetting setValue NSNumber numberWithFloat 44100.0 forKey AVSampleRateKey recordSetting setValue NSNumber numberWithInt 2 forKey AVNumberOfChannelsKey recordSetting..
How can I animate the movement of a view or image along a curved path? http://stackoverflow.com/questions/1142727/how-can-i-animate-the-movement-of-a-view-or-image-along-a-curved-path CABasicAnimation fadeOutAnimation CABasicAnimation animationWithKeyPath @ opacity fadeOutAnimation setToValue NSNumber numberWithFloat 0.3 fadeOutAnimation.fillMode kCAFillModeForwards fadeOutAnimation.removedOnCompletion NO Set up scaling CABasicAnimation..
Is there a way to pause a CABasicAnimation? http://stackoverflow.com/questions/2306870/is-there-a-way-to-pause-a-cabasicanimation rotationAnimation CABasicAnimation animationWithKeyPath @ transform.rotation.z rotationAnimation.toValue NSNumber numberWithFloat M_PI 2 rotationAnimation.duration 100 rotationAnimation.cumulative YES rotationAnimation.repeatCount HUGE_VALF rotationAnimation.removedOnCompletion..
Saving Geotag info with photo on iOS4.1 http://stackoverflow.com/questions/3884060/saving-geotag-info-with-photo-on-ios4-1 else gps setObject @ N forKey NSString kCGImagePropertyGPSLatitudeRef gps setObject NSNumber numberWithFloat latitude forKey NSString kCGImagePropertyGPSLatitude Longitude CGFloat longitude location.coordinate.longitude if longitude.. else gps setObject @ E forKey NSString kCGImagePropertyGPSLongitudeRef gps setObject NSNumber numberWithFloat longitude forKey NSString kCGImagePropertyGPSLongitude Altitude CGFloat altitude location.altitude if isnan altitude if.. else gps setObject @ 0 forKey NSString kCGImagePropertyGPSAltitudeRef gps setObject NSNumber numberWithFloat altitude forKey NSString kCGImagePropertyGPSAltitude Speed must be converted from m s to km h if location.speed 0 gps setObject..
Method for animating images (like a movie) on iPhone without using MPMoviePlayer http://stackoverflow.com/questions/442076/method-for-animating-images-like-a-movie-on-iphone-without-using-mpmovieplayer with method call in a CATransaction like the following CATransaction begin CATransaction setValue NSNumber numberWithFloat 0.25f 1 4th of a second per frame forKey kCATransactionAnimationDuration mainLayer replaceSublayer imageLayers objectAtIndex..
Round double value to 2 decimal places http://stackoverflow.com/questions/4985791/round-double-value-to-2-decimal-places 25.00 NSNumberFormatter fmt NSNumberFormatter alloc init fmt setFormat @ 0.## NSLog @ @ fmt stringFromNumber NSNumber numberWithFloat 25.342 NSLog @ @ fmt stringFromNumber NSNumber numberWithFloat 25.3 NSLog @ @ fmt stringFromNumber NSNumber numberWithFloat.. @ 0.## NSLog @ @ fmt stringFromNumber NSNumber numberWithFloat 25.342 NSLog @ @ fmt stringFromNumber NSNumber numberWithFloat 25.3 NSLog @ @ fmt stringFromNumber NSNumber numberWithFloat 25.0 2010 08 22 15 04 10.614 a.out 6954 903 25.34 2010 08.. 25.342 NSLog @ @ fmt stringFromNumber NSNumber numberWithFloat 25.3 NSLog @ @ fmt stringFromNumber NSNumber numberWithFloat 25.0 2010 08 22 15 04 10.614 a.out 6954 903 25.34 2010 08 22 15 04 10.616 a.out 6954 903 25.3 2010 08 22 15 04 10.617 a.out..
Problem setting exif data for an image http://stackoverflow.com/questions/5125323/problem-setting-exif-data-for-an-image myImageDest iref NULL add back exif NSDictionary props NSDictionary dictionaryWithObjectsAndKeys NSNumber numberWithFloat .1 kCGImageDestinationLossyCompressionQuality metadataDict kCGImagePropertyExifDictionary the exif metadata nil kCGImagePropertyExifAuxDictionary.. if GPSDictionary GPSDictionary NSMutableDictionary dictionary Setup GPS dict GPSDictionary setValue NSNumber numberWithFloat _lat forKey NSString kCGImagePropertyGPSLatitude GPSDictionary setValue NSNumber numberWithFloat _lon forKey NSString kCGImagePropertyGPSLongitude.. setValue NSNumber numberWithFloat _lat forKey NSString kCGImagePropertyGPSLatitude GPSDictionary setValue NSNumber numberWithFloat _lon forKey NSString kCGImagePropertyGPSLongitude GPSDictionary setValue lat_ref forKey NSString kCGImagePropertyGPSLatitudeRef..
How to create custom easing function with Core Animation? http://stackoverflow.com/questions/5161465/how-to-create-custom-easing-function-with-core-animation function ^double double time return 1.0 pow 1.0 time 2.0 if layer CATransaction begin CATransaction setValue NSNumber numberWithFloat 2.5 forKey kCATransactionAnimationDuration make an animation CAAnimation drop CAKeyframeAnimation animationWithKeyPath @..
Can I use CGAffineTransformMakeRotation to rotate a view more than 360 degrees? http://stackoverflow.com/questions/542739/can-i-use-cgaffinetransformmakerotation-to-rotate-a-view-more-than-360-degrees rotationAnimation CABasicAnimation animationWithKeyPath @ transform.rotation.z rotationAnimation.toValue NSNumber numberWithFloat M_PI 2.0 full rotation rotations duration rotationAnimation.duration duration rotationAnimation.cumulative YES rotationAnimation.repeatCount..
Make movie file with picture Array and song file, using AVAsset http://stackoverflow.com/questions/6061092/make-movie-file-with-picture-array-and-song-file-using-avasset NSDictionary dictionaryWithObjectsAndKeys NSNumber numberWithInt kAudioFormatMPEG4AAC AVFormatIDKey NSNumber numberWithFloat 44100.0 AVSampleRateKey NSNumber numberWithInt 1 AVNumberOfChannelsKey NSNumber numberWithInt 192000 AVEncoderBitRateKey..
iPhone Core Animation - Drawing a Circle http://stackoverflow.com/questions/7991086/iphone-core-animation-drawing-a-circle Animate from no part of the stroke being drawn to the entire stroke being drawn drawAnimation.fromValue NSNumber numberWithFloat 0.0f drawAnimation.toValue NSNumber numberWithFloat 1.0f Experiment with timing to get the appearence to look the way you.. to the entire stroke being drawn drawAnimation.fromValue NSNumber numberWithFloat 0.0f drawAnimation.toValue NSNumber numberWithFloat 1.0f Experiment with timing to get the appearence to look the way you want drawAnimation.timingFunction CAMediaTimingFunction..
|