摘要: // 设置音量- (void)setVolume:(float)newVolume{ [[MPMusicPlayerController applicationMusicPlayer] setVolume:newVolume];}// 获取音量- (float)volume{ return [[... 阅读全文
posted @ 2015-04-30 18:03 pocket_live 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 错误类型: error: linker command failed with exit code 1 (use -v to see invocation)这种问题,通常出现在添加第三方库文件或者多人开发时。这种问题一般是找不到文件而导致的链接错误。1.如果是多人开发,你同步完成后发现出现如下的错误... 阅读全文
posted @ 2015-04-29 18:21 pocket_live 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 一、 添加两个框架 :MediaPlayer.framework和AudioToolbox.framework添加两个头文件#import #import 添加通知一般在程序刚刚启动的时候添加:- (BOOL)application:(UIApplication *)application didF... 阅读全文
posted @ 2015-04-29 18:20 pocket_live 阅读(214) 评论(0) 推荐(0) 编辑
摘要: NSLocalizedString(@"Foo %@",nil);这句话实际上是在多语言文件中寻找一个key为“Foo %@”的文字,千万不要把这个和[NSString stringWithFormat:@"%@",@“hehe”];弄混了。特别的有一种很特殊的情况,发生在Appirater这个开源... 阅读全文
posted @ 2015-04-28 18:06 pocket_live 阅读(2027) 评论(0) 推荐(0) 编辑
摘要: 自定义状态栏:第一步:AppDelegate *_delegate;//获得程序代理,以便对设备StatusBar进行控制 _delegate = (AppDelegate *)[UIApplication sharedApplication].delegate; //获得设备Statu... 阅读全文
posted @ 2015-04-27 18:12 pocket_live 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 手势学习:除了用touchesBegan / touchesMoved / touchesEnded这组方法来控制使用者的手指触控外,也可以用UIGestureRecognizer的衍生类別来进行判断。一、UIGestureRecognizerUITapGestureRecognizer //点一... 阅读全文
posted @ 2015-04-27 18:11 pocket_live 阅读(194) 评论(0) 推荐(0) 编辑
摘要: plist处理: NSArray *apps = @[ @{@"name":@"敌法师", @"icon":@"http://dotadb.uuu9.com/UploadFiles/Dota/Hero/dfss.jpg"}, @{@"name":@"火枪", @"icon":@"http://dot... 阅读全文
posted @ 2015-04-27 00:29 pocket_live 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 一、NSCoding : 使用NSCoding需要遵守保存:/*** 将某个对象写入文件时会调用* 在这个方法中说清楚哪些属性需要存储*/MJStudent.m- (void)encodeWithCoder:(NSCoder *)encoder{ [encoder encodeObject:sel... 阅读全文
posted @ 2015-04-27 00:26 pocket_live 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1.initWithFrame方法是什么?initWithFrame方法用来初始化并返回一个新的视图对象,根据指定的CGRect(尺寸)2.什么时候用initWithFrame方法?简单的说,我们用编程方式申明,创建UIView对象时,使用initWithFrame方法。1.使用 Interface... 阅读全文
posted @ 2015-04-25 15:56 pocket_live 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 关于控制器跳转需要注意的问题:一般三种方式进行跳转: push,modal,custom一般跳转相应实现方法和注意点:1.[self.navigationController pushViewController:jump animated:YES];2.[self presentModalView... 阅读全文
posted @ 2015-04-25 15:54 pocket_live 阅读(354) 评论(0) 推荐(0) 编辑