如何使声音保持按键 [英] HOw To Keep Sounds To BUttons

查看:54
本文介绍了如何使声音保持按键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iphone应用程序开发平台的iam初学者jagadeesh请帮助我成为一名优秀的iPhone开发人员让我知道一些有用的Blogs&iPhone应用程序开发论坛我需要对两件事进行小幅澄清

HI Guys, This is jagadeesh, iam beginner of This i Phone Application development Platform please do help me to b a good iphone Developer let me know some useful Blogs & forums for iPhone application Development i need small clarification Regarding 2 things

1 --- >>如何保持按钮的声音(我的意思是,如果我想在Calculator应用程序中按一个按钮,我们会有许多Buttons,每当我按所需的Button时,它将发出特定的声音)2 --- >>.如何减小图标的尺寸(我的意思是如果我的图标尺寸为57 x 58并且我想将其转换为48 x 49尺寸的图标),请给我建议-显示引用文字-

1--->> How to Keep a sounds to Buttons( i mean if i want to press a buttons in the Calculator application we have many Buttons , whenever i press the required Button it will give particular sound) 2--->>.How to reduce the size of the Icon ( I mean if my icon size is 57 x 58 & i want to convert it into 48 x 49 size Icon) please give me suggestions to do this - Show quoted text -

推荐答案

  1. 将以下方法添加到按钮的一项操作中:

  1. Add the following method to one of your button's actions:

-(IBAction)按钮按下:(id)发送者{

-(IBAction) buttonPress:(id)sender {

if (!self.tickSound)
    self.tickSound = [[SoundEffect alloc] initWithContentsOfFile: @"/System/Library/Audio/UISounds/Tock.caf"];
}
[self.tickSound play];

}

您是否需要在应用程序内部或在Mac上更改图标大小,以将其包含在应用程序中?顺便说一句,iPhone应用程序图标必须为57x57,如果您使用的是该图标.

Do you need to change the icon size from within your app, or on the Mac to include it in your app? BTW, iPhone app icons have to be 57x57, if that is what you are using this icon for.

这篇关于如何使声音保持按键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆