Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7908603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:01:18+00:00 2026-06-03T12:01:18+00:00

Everyone on this site has been very helpful on my schooling of iOS programming,

  • 0

Everyone on this site has been very helpful on my schooling of iOS programming, but I’ve run into a brick wall with a very simple feature. I’ve found Apples documentation on implementing the factory keyboard click sound upon a button touch, but what Im not getting is the “creating a sub lass of UIView” part. I have a very basic calculator that I’ve built, the buttons are made of standard Round Rect’s that I want to make the simple click sound. So Apple says:Adopting the UIInputViewAudioFeedback Protocol
Perform the following three steps to adopt the UIInputViewAudioFeedback protocol:

In your Xcode project, create a subclass of the UIView class. In the header file, indicate that the subclass conforms to the UIInputViewAudioFeedback protocol, as follows:
@interface KeyboardAccessoryView : UIView {
}

Now I am using the standard UIViewController tied to a xib with all my buttons. Am i to: Create New File, name it as a subclass of UIView, JUST so i can implement this sound? That doesn’t make sense to me, and if this is really amateur stuff I apologize, but I’m learning from many different places. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:01:21+00:00Added an answer on June 3, 2026 at 12:01 pm

    You have to set your custom input view as the inputView property of the object that is supposed to be the first responder (For example, a UITextField instance), and the inputView(your custom input view) must conform to the UIInputViewAudioFeedback protocol. And to actually play a click sound: [[UIDevice currentDevice] playinputClick].

    For example:

    @interface MyCalculatorDisplay : UIView
    // ...
    @end
    
    @interface MyCustomKeyboard : UIView <UIInputViewAudioFeedback>
    // ...
    @end
    
    // Then, somewhere in your controller:
    
    MyCustomKeyboard *keyboard = [MyCustomKeyboard new];
    
    MyCalculatorDisplay *display = [MyCalculatorDisplay new];
    
    display.inputView = keyboard;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been browsing this site for answers and I have obtained some but I
Preamble So, this question has already been answered, but as it was my first
Hey Everyone. I'm a first time poster, but I've browsed this site a number
I think everyone knows this site http://pinterest.com/ and I don't want to create site
This is my first question. Thanks to everyone who contributes to this site, it's
Hello everyone don't know why this code works on windows but not on linux
This question is famous but everyone always says go to see this Notepad Tutorial
First of all, thanks so much to everyone who has helped me on this
I know this has been covered in in various questions and all over the
This is my first post here, but I've using this site regularly to help

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.