¡@

Home 

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

iphone Programming Glossary: setup

How to programmatically send SMS on the iPhone?

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

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..

How to make a UITextField move up when keyboard is present

http://stackoverflow.com/questions/1126726/how-to-make-a-uitextfield-move-up-when-keyboard-is-present

to be implemented in order to automatically scroll to the active text field Ideally as much of the setup of the components as possible will be done in Interface Builder. I'd like to only write code for what..

How to retrieve user's current city name?

http://stackoverflow.com/questions/1382900/how-to-retrieve-users-current-city-name

city name iphone objective c core location share improve this question What you have to do is setup a CLLocationManager that will find your current coordinates. With the current coordinates you need to..

Expand/collapse section in UITableView

http://stackoverflow.com/questions/1938921/expand-collapse-section-in-uitableview

out of them the way they work now. You could easily set up a cell to LOOK like a header and setup the tableView didSelectRowAtIndexPath to expand or collapse the section it is within manually. If I.. indexSetWithIndex indexPath.section withRowAnimation UITableViewRowAnimationFade You'd then setup your number numberOfRowsInSection to check the mybooleans value and return either 1 if the section isn't..

Using the apple FFT and accelerate Framework

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

the comments don't actually make life any easier. Basically at the heart of it is vDSP_fft_zrip setupReal A stride log2n FFT_FORWARD vDSP_fft_zrip setupReal A stride log2n FFT_INVERSE FFT on n real floats.. Basically at the heart of it is vDSP_fft_zrip setupReal A stride log2n FFT_FORWARD vDSP_fft_zrip setupReal A stride log2n FFT_INVERSE FFT on n real floats and then reverse to get back to where we started... So we would pack A with 1024 floats from the mic set log2n 10 2^10 1024 precalculate some bobbins setupReal and vDSP_fft_zrip setupReal A stride log2n FFT_FORWARD Now A will contain n 2 complex numbers. These..

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

change see below Karl's library http stackoverflow.com a 5721978 153422 takes much more effort to setup but much nicer long term solution it converts your library into a Framework . RECENT CHANGES Info on..

iPhone App Minus App Store?

http://stackoverflow.com/questions/37464/iphone-app-minus-app-store

just need to be relaunched. To make life easier for yourself during development you can setup SSH key authentication and add these extra steps as a custom build step in your project. Note that if..

How do you beta test an iphone app?

http://stackoverflow.com/questions/40154/how-do-you-beta-test-an-iphone-app

a general provisioning profile that will work with multiple apps and added a beta tester. My setup Xcode 3.2.1 iPhone SDK 3.1.3 Before you get started make sure that.. You can run the app on your own..

iOS SDK - Programmatically generate a PDF file

http://stackoverflow.com/questions/4362734/ios-sdk-programmatically-generate-a-pdf-file

was a little tricky getting libHaru to build with my project initially but once I got my project setup properly it worked fine for my needs. Second depending on the format layout of your PDF you might consider..

Inner shadow effect on UIView layer?

http://stackoverflow.com/questions/4431292/inner-shadow-effect-on-uiview-layer

as the clipping path to the context CGContextAddPath context visiblePath CGContextClip context Now setup the shadow properties on the context aColor UIColor colorWithRed 0.0f green 0.0f blue 0.0f alpha 0.5f.. as the clipping path on the context so that you don't draw anything outside it to the screen. Then setup up the shadow on the context which includes the offset blur and color. Then fill the big shape with..

Gesture recognizer and button actions

http://stackoverflow.com/questions/4825199/gesture-recognizer-and-button-actions

am i missing Here's some related code #pragma mark #pragma mark View lifecycle Gesture recognizer setup void viewDidLoad super viewDidLoad double tap gesture recognizer UITapGestureRecognizer dtapGestureRecognize..

How do I size a UITextView to its content?

http://stackoverflow.com/questions/50467/how-do-i-size-a-uitextview-to-its-content

sizeThatShouldFitTheContent.height heightConstraint is a layout constraint that you typically setup via a IBOutlet by linking the property to the height constraint created in a storyboard. share improve..

Learning OpenGL ES 1.x

http://stackoverflow.com/questions/72288/learning-opengl-es-1-x

pretty simple devices. What you have is a way to draw geometry vertex buffers manage textures and setup some fixed function state lighting texture combiners . That's pretty much all there is to it. share..

View Controllers: How to switch between views programmatically?

http://stackoverflow.com/questions/910994/view-controllers-how-to-switch-between-views-programmatically

So in the implementation of myRootController I do this Implement viewDidLoad to do additional setup after loading the view typically from a nib. void viewDidLoad super viewDidLoad ViewControllerA vcA..

How to programmatically send SMS on the iPhone?

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

for automated or even partially automated SMS and 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..

How to make a UITextField move up when keyboard is present

http://stackoverflow.com/questions/1126726/how-to-make-a-uitextfield-move-up-when-keyboard-is-present

to the frame size of the UIView . Then what needs to be implemented in order to automatically scroll to the active text field Ideally as much of the setup of the components as possible will be done in Interface Builder. I'd like to only write code for what needs it. Note the UIView or UIScrollView that I'm working..

How to retrieve user's current city name?

http://stackoverflow.com/questions/1382900/how-to-retrieve-users-current-city-name

current city name How do you retrieve the user's current city name iphone objective c core location share improve this question What you have to do is setup a CLLocationManager that will find your current coordinates. With the current coordinates you need to use MKReverseGeoCoder to find your location. void viewDidLoad..

Expand/collapse section in UITableView

http://stackoverflow.com/questions/1938921/expand-collapse-section-in-uitableview

be a huge pain and I'm not sure you can easily get actions out of them the way they work now. You could easily set up a cell to LOOK like a header and setup the tableView didSelectRowAtIndexPath to expand or collapse the section it is within manually. If I were you I'd store an array of booleans corresponding the the.. reload this section self.tableView reloadSections NSIndexSet indexSetWithIndex indexPath.section withRowAnimation UITableViewRowAnimationFade You'd then setup your number numberOfRowsInSection to check the mybooleans value and return either 1 if the section isn't expanded or 1 the number of items in the section if it..

Using the apple FFT and accelerate Framework

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

code is really stupidly obscure it is generously commented but the comments don't actually make life any easier. Basically at the heart of it is vDSP_fft_zrip setupReal A stride log2n FFT_FORWARD vDSP_fft_zrip setupReal A stride log2n FFT_INVERSE FFT on n real floats and then reverse to get back to where we started. ip stands.. but the comments don't actually make life any easier. Basically at the heart of it is vDSP_fft_zrip setupReal A stride log2n FFT_FORWARD vDSP_fft_zrip setupReal A stride log2n FFT_INVERSE FFT on n real floats and then reverse to get back to where we started. ip stands for in place which means A gets overwritten That's.. is whatever the time duration of 1024 samples is ie 1 44 s. So we would pack A with 1024 floats from the mic set log2n 10 2^10 1024 precalculate some bobbins setupReal and vDSP_fft_zrip setupReal A stride log2n FFT_FORWARD Now A will contain n 2 complex numbers. These represent n 2 frequency bins bin 1 .idealFreq 44Hz ie 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

copy paste of latest version but install instructions may change see below Karl's library http stackoverflow.com a 5721978 153422 takes much more effort to setup but much 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..

iPhone App Minus App Store?

http://stackoverflow.com/questions/37464/iphone-app-minus-app-store

to be done when you add or remove applications. Updated applications just need to be relaunched. To make life easier for yourself during development you can setup SSH key authentication and add these extra steps as a custom build step in your project. Note that if you wish to remove the application later you cannot do so..

How do you beta test an iphone app?

http://stackoverflow.com/questions/40154/how-do-you-beta-test-an-iphone-app

that Apple provides are here but here is how I created a general provisioning profile that will work with multiple apps and added a beta tester. My setup Xcode 3.2.1 iPhone SDK 3.1.3 Before you get started make sure that.. You can run the app on your own iPhone through Xcode. Step A Add devices to the Provisioning..

iOS SDK - Programmatically generate a PDF file

http://stackoverflow.com/questions/4362734/ios-sdk-programmatically-generate-a-pdf-file

iPhone as a replacement for CoreGraphics PDF generation. It was a little tricky getting libHaru to build with my project initially but once I got my project setup properly it worked fine for my needs. Second depending on the format layout of your PDF you might consider using Interface Builder to create a view that serves..

Inner shadow effect on UIView layer?

http://stackoverflow.com/questions/4431292/inner-shadow-effect-on-uiview-layer

visiblePath CGPathCloseSubpath path Add the visible paths as the clipping path to the context CGContextAddPath context visiblePath CGContextClip context Now setup the shadow properties on the context aColor UIColor colorWithRed 0.0f green 0.0f blue 0.0f alpha 0.5f CGContextSaveGState context CGContextSetShadowWithColor context.. anti clockwise. Then you need to set your visible path as the clipping path on the context so that you don't draw anything outside it to the screen. Then setup up the shadow on the context which includes the offset blur and color. Then fill the big shape with the hole in it. The color doesn't matter because if you've done..

Gesture recognizer and button actions

http://stackoverflow.com/questions/4825199/gesture-recognizer-and-button-actions

will be given preference and it WILL get triggered What am i missing Here's some related code #pragma mark #pragma mark View lifecycle Gesture recognizer setup void viewDidLoad super viewDidLoad double tap gesture recognizer UITapGestureRecognizer dtapGestureRecognize UITapGestureRecognizer alloc initWithTarget self action..

How do I size a UITextView to its content?

http://stackoverflow.com/questions/50467/how-do-i-size-a-uitextview-to-its-content

Learning OpenGL ES 1.x

http://stackoverflow.com/questions/72288/learning-opengl-es-1-x

View Controllers: How to switch between views programmatically?

http://stackoverflow.com/questions/910994/view-controllers-how-to-switch-between-views-programmatically

has a black background. Just to see which one is active. So in the implementation of myRootController I do this Implement viewDidLoad to do additional setup after loading the view typically from a nib. void viewDidLoad super viewDidLoad ViewControllerA vcA ViewControllerA alloc initWithNib self.contentView addSubview..

How to programmatically send SMS on the iPhone?

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

SMS and 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..

How to make a UITextField move up when keyboard is present

http://stackoverflow.com/questions/1126726/how-to-make-a-uitextfield-move-up-when-keyboard-is-present

. Then what needs to be implemented in order to automatically scroll to the active text field Ideally as much of the setup of the components as possible will be done in Interface Builder. I'd like to only write code for what needs it. Note the..

How to retrieve user's current city name?

http://stackoverflow.com/questions/1382900/how-to-retrieve-users-current-city-name

the user's current city name iphone objective c core location share improve this question What you have to do is setup a CLLocationManager that will find your current coordinates. With the current coordinates you need to use MKReverseGeoCoder..

Expand/collapse section in UITableView

http://stackoverflow.com/questions/1938921/expand-collapse-section-in-uitableview

you can easily get actions out of them the way they work now. You could easily set up a cell to LOOK like a header and setup the tableView didSelectRowAtIndexPath to expand or collapse the section it is within manually. If I were you I'd store an.. reloadSections NSIndexSet indexSetWithIndex indexPath.section withRowAnimation UITableViewRowAnimationFade You'd then setup your number numberOfRowsInSection to check the mybooleans value and return either 1 if the section isn't expanded or 1 the..

How to display multiple columns in a UITableView?

http://stackoverflow.com/questions/2855857/how-to-display-multiple-columns-in-a-uitableview

NSBundle mainBundle loadNibNamed @ DetailCell owner self options nil cell UITableViewCell cellObjects objectAtIndex 0 setup your cell when you define the cell in IB give each label a tag so when you need to put a text there you can retrieve it..

Using the apple FFT and accelerate Framework

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

commented but the comments don't actually make life any easier. Basically at the heart of it is vDSP_fft_zrip setupReal A stride log2n FFT_FORWARD vDSP_fft_zrip setupReal A stride log2n FFT_INVERSE FFT on n real floats and then reverse.. make life any easier. Basically at the heart of it is vDSP_fft_zrip setupReal A stride log2n FFT_FORWARD vDSP_fft_zrip setupReal A stride log2n FFT_INVERSE FFT on n real floats and then reverse to get back to where we started. ip stands for in place.. is ie 1 44 s. So we would pack A with 1024 floats from the mic set log2n 10 2^10 1024 precalculate some bobbins setupReal and vDSP_fft_zrip setupReal A stride log2n FFT_FORWARD Now A will contain n 2 complex numbers. These represent n 2 frequency..

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

instructions may change see below Karl's library http stackoverflow.com a 5721978 153422 takes much more effort to setup but much nicer long term solution it converts your library into a Framework . RECENT CHANGES Info on how to use this script..

iPhone App Minus App Store?

http://stackoverflow.com/questions/37464/iphone-app-minus-app-store

Updated applications just need to be relaunched. To make life easier for yourself during development you can setup SSH key authentication and add these extra steps as a custom build step in your project. Note that if you wish to remove..

How do you beta test an iphone app?

http://stackoverflow.com/questions/40154/how-do-you-beta-test-an-iphone-app

but here is how I created a general provisioning profile that will work with multiple apps and added a beta tester. My setup Xcode 3.2.1 iPhone SDK 3.1.3 Before you get started make sure that.. You can run the app on your own iPhone through Xcode...

iOS SDK - Programmatically generate a PDF file

http://stackoverflow.com/questions/4362734/ios-sdk-programmatically-generate-a-pdf-file

PDF generation. It was a little tricky getting libHaru to build with my project initially but once I got my project setup properly it worked fine for my needs. Second depending on the format layout of your PDF you might consider using Interface..

Inner shadow effect on UIView layer?

http://stackoverflow.com/questions/4431292/inner-shadow-effect-on-uiview-layer

the visible paths as the clipping path to the context CGContextAddPath context visiblePath CGContextClip context Now setup the shadow properties on the context aColor UIColor colorWithRed 0.0f green 0.0f blue 0.0f alpha 0.5f CGContextSaveGState.. your visible path as the clipping path on the context so that you don't draw anything outside it to the screen. Then setup up the shadow on the context which includes the offset blur and color. Then fill the big shape with the hole in it. The..

Gesture recognizer and button actions

http://stackoverflow.com/questions/4825199/gesture-recognizer-and-button-actions

get triggered What am i missing Here's some related code #pragma mark #pragma mark View lifecycle Gesture recognizer setup void viewDidLoad super viewDidLoad double tap gesture recognizer UITapGestureRecognizer dtapGestureRecognize UITapGestureRecognizer..

How do I size a UITextView to its content?

http://stackoverflow.com/questions/50467/how-do-i-size-a-uitextview-to-its-content

Why am I having to manually set my view's frame in viewDidLoad?

http://stackoverflow.com/questions/6757018/why-am-i-having-to-manually-set-my-views-frame-in-viewdidload

am I having to manually set my view's frame in viewDidLoad I have a pretty basic setup with a UINavigationController inside a UITabBarController. I'm wanting to programmatically layout the view of the rootViewController..

Learning OpenGL ES 1.x

http://stackoverflow.com/questions/72288/learning-opengl-es-1-x

GL ES 1.x is for pretty simple devices. What you have is a way to draw geometry vertex buffers manage textures and setup some fixed function state lighting texture combiners . That's pretty much all there is to it. share improve this answer..

View Controllers: How to switch between views programmatically?

http://stackoverflow.com/questions/910994/view-controllers-how-to-switch-between-views-programmatically

see which one is active. So in the implementation of myRootController I do this Implement viewDidLoad to do additional setup after loading the view typically from a nib. void viewDidLoad super viewDidLoad ViewControllerA vcA ViewControllerA alloc..

Uploading Video with iPhone

http://stackoverflow.com/questions/1065628/uploading-video-with-iphone

postData self generatePostDataForData fileData NSString postLength NSString stringWithFormat @ d postData length Setup the request NSMutableURLRequest uploadRequest NSMutableURLRequest alloc initWithURL NSURL URLWithString @ http www.example.com..

How do I synthesize sounds with CoreAudio on iPhone/Mac

http://stackoverflow.com/questions/1361148/how-do-i-synthesize-sounds-with-coreaudio-on-iphone-mac

to run in a new thread as such #define BUFFER_SIZE 16384 #define BUFFER_COUNT 3 static AudioQueueRef audioQueue void SetupAudioQueue OSStatus err noErr Setup the audio device. AudioStreamBasicDescription deviceFormat deviceFormat.mSampleRate 44100.. BUFFER_SIZE 16384 #define BUFFER_COUNT 3 static AudioQueueRef audioQueue void SetupAudioQueue OSStatus err noErr Setup the audio device. AudioStreamBasicDescription deviceFormat deviceFormat.mSampleRate 44100 deviceFormat.mFormatID kAudioFormatLinearPCM..

How to search MKMapView with UISearchBar?

http://stackoverflow.com/questions/2281798/how-to-search-mkmapview-with-uisearchbar

@ withString @ Create NSURL string from a formate URL string. NSURL url NSURL URLWithString urlString Setup and start an async download. Note that we should test for reachability . NSURLRequest request NSURLRequest alloc initWithURL..

Show iPhone soft keyboard even though a hardware keyboard is connected

http://stackoverflow.com/questions/3326189/show-iphone-soft-keyboard-even-though-a-hardware-keyboard-is-connected

we added this notification observer so we would get an event anytime a text field began editing Setup the textFieldNotifications NSNotificationCenter defaultCenter addObserver self selector @selector textFieldBegan name UITextFieldTextDidBeginEditingNotification..

iPhone SDK 4 AVFoundation - How to use captureStillImageAsynchronouslyFromConnection correctly?

http://stackoverflow.com/questions/3847140/iphone-sdk-4-avfoundation-how-to-use-capturestillimageasynchronouslyfromconnec

480.0 320.0 self.prevLayer.videoGravity AVLayerVideoGravityResizeAspectFill self.view.layer addSublayer self.prevLayer Setup the default file outputs AVCaptureStillImageOutput _stillImageOutput AVCaptureStillImageOutput alloc init autorelease NSDictionary..

This code to write video+audio through AVAssetWriter and AVAssetWriterInputs is not working. Why?

http://stackoverflow.com/questions/4149963/this-code-to-write-videoaudio-through-avassetwriter-and-avassetwriterinputs-is

reproduced. Here is part of my code Setting up AVCaptureVideoDataOutput and AVCaptureAudioDataOutput NSError error nil Setup the video input AVCaptureDevice videoDevice AVCaptureDevice defaultDeviceWithMediaType AVMediaTypeVideo Create a device.. it to the session. AVCaptureDeviceInput videoInput AVCaptureDeviceInput deviceInputWithDevice videoDevice error error Setup the video output _videoOutput AVCaptureVideoDataOutput alloc init _videoOutput.alwaysDiscardsLateVideoFrames NO _videoOutput.videoSettings.. dictionaryWithObject NSNumber numberWithInt kCVPixelFormatType_32BGRA forKey id kCVPixelBufferPixelFormatTypeKey Setup the audio input AVCaptureDevice audioDevice AVCaptureDevice defaultDeviceWithMediaType AVMediaTypeAudio AVCaptureDeviceInput..

How to run and debug unit tests for an iPhone application

http://stackoverflow.com/questions/4989668/how-to-run-and-debug-unit-tests-for-an-iphone-application

the main steps presented in Sean's tutorial providing some for dummies outline which took me some time to figure out Setup a target that contains the unit tests but DOES NOT run them Setup the otest executable to run the tests Setup the otest.. outline which took me some time to figure out Setup a target that contains the unit tests but DOES NOT run them Setup the otest executable to run the tests Setup the otest environment variables so that otest can find your unit tests The following.. out Setup a target that contains the unit tests but DOES NOT run them Setup the otest executable to run the tests Setup the otest environment variables so that otest can find your unit tests The following was performed with XCode 3.2.5 Note..

Problem setting exif data for an image

http://stackoverflow.com/questions/5125323/problem-setting-exif-data-for-an-image

us to use EXIFDictionary NSMutableDictionary dictionary if GPSDictionary GPSDictionary NSMutableDictionary dictionary Setup GPS dict GPSDictionary setValue NSNumber numberWithFloat _lat forKey NSString kCGImagePropertyGPSLatitude GPSDictionary..

UIWebView without Copy/Paste and selection rectangle when showing documents

http://stackoverflow.com/questions/5515522/uiwebview-without-copy-paste-and-selection-rectangle-when-showing-documents

to the list of disabled selectors EDIT Ok as you what to display a PDF rather then a html page you can try this. Setup Put the webView in a scrollView Set the ScrollView's delegate to self min zoom to 1.0 and max zoom to whatever you want..

What's the best approach to draw lines between views?

http://stackoverflow.com/questions/5847876/whats-the-best-approach-to-draw-lines-between-views

all your propositions are similar. All of them would lead to the following steps some of them done invisibly by UIKit Setup a bitmap context in memory. Use Core Graphics to draw the line into the bitmap. Copy this bitmap to a GPU buffer a texture..

How to record sound produced by mixer unit output (iOS Core Audio & Audio Graph)

http://stackoverflow.com/questions/7118429/how-to-record-sound-produced-by-mixer-unit-output-ios-core-audio-audio-graph

wrong but I can not find the error. Here is the code below. This is done just after the Multichannel Mixer unit Setup UInt32 flag 1 Enable IO for playback result AudioUnitSetProperty iOUnit kAudioOutputUnitProperty_EnableIO kAudioUnitScope_Output..

Setting a background image for a tabbar

http://stackoverflow.com/questions/8909379/setting-a-background-image-for-a-tabbar

UIImage imageNamed @ settingsSelected.png self.settingsButton UIButton buttonWithType UIButtonTypeCustom Setup the button settingsButton.frame CGRectMake 10 426 100 54 Set the frame size and position of the button settingsButton setBackgroundImage.. to the view self.view addSubview settingsButton self.view addSubview infoButton self.view addSubview aboutUsButton Setup event handlers so that the buttonClicked method will respond to the touch up inside event. settingsButton addTarget self..