Showing the microphone in iOS5 - iphone

I am developing for the new iOS 5 and am wondering whether it is possible to automatically turn on the microphone in response to an event like a tap. I know there is a button on the keyboard (at least for the iphone4S) which displays it and allows to switch it on/off. My input will be added to a textfield. So far I can display the keyboard by calling the method becomeFirstResponder on my textfield object but I want to go a step further and directly turn on the microphone. Is it possible? Thanks in advance for your help.
Regards,
Luis

Related

Access iPhone power button in app

I just have a simple question regarding the button on the upper right corner of the iPhone (power button). Is there anyway you can receive notification from it when it´s being pushed?
Thank you
The –applicationWillResignActive: and -applicationDidBecomeActive: application delegate methods are the closest you can get, although they can be triggered for other events such as an incoming call. What exactly are you trying to achieve here?
You can not directly access the hold button, that is reserved to Apple and must always behave the same independent of app. Because of this you are not allowed to use it to do other things.
However, as Mike had said, you can get information about when the app is going to go to sleep or become active, which can be triggered by pressing the hold button

how to disable action method on a button click programmatically

I am developing a simple quiz game in which if a button is clicked then the player can have two chances to give answer. If first choice is right, then buttonClicked action will performed. If it is wrong then player can have second chance to give the answer. if it is correct, buttonClicked will performed otherwise game over.
please guide me how to perform this .. Any help will be highly appreciated..
UIControll has property enabled.
If the enabled state is NO, the control ignores touch events ...

how to activate the thumb of slider to work as a button?

I want to make the thumb of my slider to work as the button so that when a user done selecting the value and pull his finger up it should do something i want.
Is there any way to do this.
Thanks,
Hi,
Create this function
- (IBAction)mySliderUserFinshed:(UISlider *)theSlider
Make sure you add it to the header of you file.
The in interface builder, right click on the slider you want to act as a button.
You will need to wire up the Sent Event
Touch Up Inside to the function that you created. If you dont know how to use interface builder watch a few quick videos on youtube or in Xcode 4 there is a short guide on some of the new and awesome features of xCode 4 with very very cool videos (takes about 10mins to watch and will save you hours of coding).
Good Luck, John.

IPhone SDK Home Button

Is it possible to override the default behavior (close app) of the Home Button? And if how do you do that?
well, there's a reasonable alt to the need to detect if the Home button was tapped. i'm currently working on just such a scenario.
my app allows user input (into UITextViews). a customer has asked for an "autosave" feature where, should they (accidentally) tap the Home button during data entry, could i still capture the data entered and save it.
my testing of the sequence of viewWillDisappear in the view that is collecting the data and applicationWillTerminate show viewWillDisappear getting called before applicationWillTerminate. now i fully appreciate that this is the architected sequence Apple intended, BUT this sequence also precludes setting a simple Boolean in applicationWillTerminate to let the particular viewWillDisappear know that it is disappearing specifically due to applicationWillTerminate.
so the issue still stands. how can a UIView detect that it is disappearing specifically as a result of the app terminating?
Even if it is possible, your app will probably not be approved by Apple.
Are you planning this feature for your own private App or do you want to distribute it later on?
The home button is probably the most critical button on the device on not a good idea to change

UISlider with sound effect and vibration

I need to do a lot of things with UISlider. First of all I want to know what are all the things are possible and what are not. Please give me ideas for the doable ones.
I need to add a slider control in my iPhone application (that should resemble the one which is displayed in the iphone when the phone is getting charged).
Can the round button of the UISlider be changed to any other shape. Can any image be added on top of that round button?
When the UISlider is being moved, we need ad a sound effect(for example car stating sound) and when the sliding ends the sound should be stopped. is this possible? if yes, please gimme ideas to do this. 3. vibration should also happen while sliding (possible?)
Thanks in advance!!!
All of these can be done via the public API. Read the docs :-)
The button is called the "thumb image"; there's a property to replace the image.
Assign a delegate and set the 'continuous' property on the slider.
See the Application Programming Guide for more on delegates.
As far as question number 2, just write up the methods to accomplish playing a sound and vibrating and then have them fire when the value changes on the slider.