随笔分类 - iPhone/iPad
摘要:1 -(void)startTime{ 2 __block int timeout=30; //倒计时时间 3 dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0...
阅读全文
摘要:http://www.xiaojiayi.com/2013/08/25/ios-%E5%BC%80%E5%8F%91%E8%80%85%E5%BF%85%E7%9F%A5%E7%9A%84-75-%E4%B8%AA%E5%B7%A5%E5%85%B7%EF%BC%88%E8%AF%91%E6%96%87%EF%BC%89/
阅读全文
摘要:插件编写xcode的插件不算多,找遍了网络也就大猫小猫而三只.不过虽然不多,但是大部分的插件都非常有用.以下5歀插件是我几台机器上都安装了并且经常使用的.1. MiniXcodeMiniXcode的作用主要是在Xcode隐藏了Toolbar过后显示Schema选择菜单,并且可以显示编译进度的一个插件。这个插件可以说是我最喜欢的一个插件了,虽说作者开发这款插件的意图是让小屏幕更好的使用Xcode,但是我觉得不管是大屏幕还是小屏幕都是非常适合使用这款插件的,我的iMac + 24寸双显示器 和Macbook Pro下都使用着。主要是我非常不喜欢Xcode的toolbar,觉得太影响美观了,所以一直
阅读全文
摘要:[UIDevice currentDevice] uniqueIdentifier];UUID苹果己经禁用//新的UUID生成,随机生成,用于唯一标识,需要保存-(NSString*) uuid { CFUUIDRefpuuid =CFUUIDCreate(kCFAllocatorSystemDefault); CFStringRefuuidString =CFUUIDCreateString(nil, puuid ); NSString* result = (NSString*)CFStringCreateCopy(NULL, uuidString); CFRelease(puuid); C
阅读全文
摘要:在iOS4.0推出了Blocks這個語言特性後到現在iOS都已經出到5.0了所以我想Blocks應該可以被廣泛應用了但現在iOS環境是從MRC(Manual Reference Counting) 走到ARC (Automatic Reference Counting)在Reference Counting的環境中Runtime是無法自動解除Retain cycle的而Blocks有很多隱性的retain的動作很容易不小心的造成retain cycle。而本篇的重點是點出三種會造成Retain Cycle的Anti-patterns再來講一下怎麼解決。在討論之前還是先大概重述一些概念block
阅读全文
摘要:Downloadhttp://www.cocoawithlove.com/2010/09/zoomingviewcontroller-to-animate-uiview.html
阅读全文
摘要:需要获得目录的内容列表,使用enumeratorAtPath:方法或者directoryC ontentsAtPath:方法,可以完成枚举过程。如果使用第一种enumeratorAtPath:方法,一次可以枚举指定目录中的每个文件。默认情况下,如果其中一个文件为目录,那么也会递归枚举它的内容。在这个过程中,通过向枚举对象发送一条skipDescendants消息,可以动态地阻止递归过程,从而不再枚举目录中的内容。对于directoryContentsAtPath:方法,使用这个方法,可以枚举指定目录的内容,并在一个数组中返回文件列表。如果这个目录中的任何文件本身是个目录,这个方法并不递归枚举它
阅读全文
摘要:Read the asset from the Library and get decompresIn the above post the size of the asset file is too big so here is another way to decompress the fileThis is also taken from the stack over flow,http://stackoverflow.com/questions/5687341/iphoneprogrammatically-compressing-recorded-video-to-share- (vo
阅读全文
摘要:在项目中经常遇到隐藏tabBar,实力很多种方法,可以解决不同情况下问题1://隐藏tabBarWebViewController *webVc = [[WebViewController alloc] init];webVc.hidesBottomBarWhenPushed= YES;[self.navigationController pushViewController:webVc animated:YES];webVc.hidesBottomBarWhenPushed= NO;[webVc release];2.系统方法 self.hidesBottomBarWhenPushed= Y
阅读全文

浙公网安备 33010602011771号