摘要: 出处:http://www.cnblogs.com/qingche/1.关于音效 音效又称短音频,是一个声音文件,在应用程序中起到点缀效果,用于提升应用程序的整体用户体验。我们手机里常见的APP几乎都少不了音效的点缀。显示实现音效并不复杂,但对我们App很重要!2.音效播放 2.1.首先实现我们需要导入框架AudioToolbox.framework 2.2.为了优化效播放,减少每次重复加载音效播放,我们将加载音效... 阅读全文
posted @ 2014-03-24 13:39 limengdev 阅读(328) 评论(0) 推荐(0) 编辑
摘要: // UILabel+LM.h//// UILabel+LM.h// Test//// Created by 李蒙 on 14-3-21.// Copyright (c) 2014年 datangcloud. All rights reserved.//#import @interface UILabel (LM)- (CGSize)contentSize;@end// UILabel+LM.m//// UILabel+LM.m// Test//// Created by 李蒙 on 14-3-21.// Copyright (c) 2014年 datangcloud. A... 阅读全文
posted @ 2014-03-21 15:52 limengdev 阅读(425) 评论(0) 推荐(0) 编辑
摘要: // 使用AudioToolbox framework// IOS简单播放声音的方法#import #pragma mark 播放声音- (void)playSound{ static SystemSoundID shake_sound_male_id = 0; NSString *path = [[NSBundle mainBundle] pathForResource:@"noWeak01" ofType:@"mp3"]; if (path) { //注册声音到系统 AudioServicesCreateSystemSoundID((C... 阅读全文
posted @ 2014-03-14 13:03 limengdev 阅读(704) 评论(0) 推荐(0) 编辑
摘要: // 执行通知一定要退出应用或挂起应用(进入后台)才能收到通知。// 创建本地通知UILocalNotification *notification = [[UILocalNotification alloc] init];// 通知触发时间// 5秒钟之后触发notification.fireDate = [NSDate dateWithTimeIntervalSinceNow:5];// 通知时区// 使用本地时区notification.timeZone = [NSTimeZone defaultTimeZone];// 通知提示内容notification.alertBody = @& 阅读全文
posted @ 2014-02-08 11:00 limengdev 阅读(1103) 评论(0) 推荐(2) 编辑
摘要: //初始化textfield并设置位置及大小UITextField *text = [[UITextField alloc] initWithFrame:CGRectMake(20, 20, 130, 30)];//设置边框样式,只有设置了才会显示边框样式typedef enum { UITextBorderStyleNone, UITextBorderStyleLine, UITextBorderStyleBezel, UITextBorderStyleRoundedRect } UITextBorderStyle;text.borderStyle = UITextBorderSt... 阅读全文
posted @ 2014-01-24 13:28 limengdev 阅读(738) 评论(0) 推荐(1) 编辑
点击右上角即可分享
微信分享提示