![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Objective-c
leonpengweicn
这个作者很懒,什么都没留下…
展开
-
[翻译]Transitioning to ARC Release Notes中文版
http://transideology.com/2015/09/%E7%BF%BB%E8%AF%91transitioning-to-arc-release-notes/模式下运行。鉴于 @autoreleasepool 比 NSAutoreleasePool 快如此之多,一些老的性能优化小技巧可以被简单的替换成 @autoreleasepool方式了。转换器可以处理转载 2015-12-14 10:09:09 · 456 阅读 · 0 评论 -
objective-c block 讲解
BlockApple 在C, Objective-C, C++加上Block這個延申用法。目前只有Mac 10.6 和iOS 4有支援。Block是由一堆可執行的程式組成,也可以稱做沒有名字的Function (Anonymous function)。如果是Mac 10.6 或 iOS 4.0 之前的平台可以利用 http://code.google.com/p/plblocks/转载 2012-12-21 15:14:06 · 460 阅读 · 0 评论 -
IOS 线程锁的例子
A:资源锁#import @interface WPGlobalTest : GHTestCase{ int _count; NSLock *_lock;}@end-(void)test3{ if (_lock == nil) { _lock = [[NSLock alloc] init]; }原创 2012-12-11 13:24:21 · 751 阅读 · 0 评论 -
iPhone开发如何捕获提交异常日志
http://tech.it168.com/a2012/0321/1327/000001327714.shtml【IT168技术】近几个月在公司安排和我个人的要求下,接触了iPhone方面的开发,主要都是应用方面的,参与了两个iPhone项目的开发,并且已经比较至AppStore了,终于可以休息一段时间了。 项目开发中,经常遇到一个问题。每次辛苦的发布版本给测试人员测试后,收转载 2012-12-11 10:27:15 · 699 阅读 · 0 评论 -
NSMakeCollectable
This function is a wrapper for CFMakeCollectable, but its return type is id—avoiding the need for casting when using Cocoa objects.This function may be useful when returning Core Foundation object转载 2012-12-11 09:57:00 · 1759 阅读 · 0 评论 -
NSThread exit 方法
+ (void)exitTerminates the current thread.DiscussionThis method uses the currentThread class method to access the current thread. Before exiting the thread, this method posts the NSThr原创 2012-12-22 16:14:54 · 2227 阅读 · 0 评论 -
Using the UIAutomation Private Framework
http://blog.thepete.net/blog/2012/07/11/using-the-uiautomation-private-framework/I’ve recently spent a few hours investigating how feasible it would be to use Apple’s private UIAutomation framew转载 2012-11-22 13:07:51 · 893 阅读 · 0 评论 -
Beginning Jailbroken iOS Development - Your First Tweak
http://brandontreb.com/beginning-jailbroken-ios-development-your-first-tweak/¶This is the 3rd installment of my jailbroken iOS development series. If you haven't already, make sure you rea转载 2012-11-22 13:00:04 · 1032 阅读 · 0 评论 -
Beginning Jailbroken iOS Development - Getting The Tools
http://brandontreb.com/beginning-jailbroken-ios-development-getting-the-tools/Developing for jailbroken is actually quite similar to regular iOS development with one addition. More Power! oh转载 2012-11-22 12:57:40 · 851 阅读 · 0 评论 -
获取设备当前连接的WIFI信息(No Private API)
#import #import @implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; CFArrayRef arrayRef = CNCopySupportedInterfaces(); NSArray *inter原创 2012-11-22 09:47:50 · 2163 阅读 · 0 评论 -
Block的生命周期
今天在写代码的时候,遇到了Block一直EXC_BAD_ACCESS的问题,之前一直觉得Block应该像int一样直接assign就可以,不会存在内存的问题,今天查了资料才知道block是继承自NSObject的,一样有内存问题,特此记录一下。Block内存管理的规则:1,Block指针会在方法或函数结束后release掉,此时内存是储存在Stack里。2,如果要在保存Block指针,原创 2012-12-21 15:43:50 · 1480 阅读 · 0 评论 -
解决iPhone网络软件在睡眠情况断线问题
http://www.cnblogs.com/zhwl/archive/2013/01/09/2852795.html如果你希望使用iPhone的网络功能并保持长连接,并使用Wifi的话,你可能会发现一个问题,那就是在iPhone处于睡眠状态时,Wifi会中断,这样程序就无法保持连接。(iPhone非官方SDK)下面的代码可能会帮你解决这个问题。 以下代码摘自M转载 2013-01-15 10:30:56 · 703 阅读 · 0 评论 -
Cannot use respondsToSelector using ARC on Mac
http://stackoverflow.com/questions/7941051/cannot-use-respondstoselector-using-arc-on-macWhen I call respondsToSelector in an ARC environment, I get the following error message Automat转载 2014-03-07 11:57:38 · 876 阅读 · 0 评论 -
IOS atomic与nonatomic,assign,copy与retain的定义和区别
http://blog.csdn.net/mars2639/article/details/7352540atomic和nonatomic用来决定编译器生成的getter和setter是否为原子操作。 atomic 设置成员变量的@property属性时,默认为atomic,提供多线程安全。转载 2014-02-18 14:58:34 · 580 阅读 · 0 评论 -
Variable property attributes or Modifiers in iOS
http://rdcworld-iphone.blogspot.in/2012/12/variable-property-attributes-or.htmlVariable property attributes or ModifiersProperty Attributes Indicate Data Accessibility and Storage Consid转载 2014-02-18 15:09:18 · 746 阅读 · 0 评论 -
Cocoapods Error "Pull is not possible because you have unmerged files." #1268
rm -rf ~/.cocoapods/转载 2014-02-13 16:19:27 · 793 阅读 · 0 评论 -
Understanding Automatic Reference Counting in Objective-C
http://longweekendmobile.com/2011/09/07/objc-automatic-reference-counting-in-xcode-explained/Automatic Reference Counting (ARC) largely removes the burden of manual memory management, not to转载 2014-01-28 11:48:22 · 1005 阅读 · 0 评论 -
Audio Player
#define kNumAQBufs 1#define kAudioBufferSeconds 3void audioQueueOutputCallback(void *inClientData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer){ BaseSecurity转载 2013-11-03 22:33:48 · 1328 阅读 · 0 评论 -
ios 6 and xcode 4.5 linker problems
http://answers.opencv.org/question/2868/ios-6-and-xcode-45-linker-problems/st*, unsigned long)", referenced from: cv::BmpDecoder::BmpDecoder() in opencv2(grfmt_bmp.o) cv::BmpEnco转载 2013-09-16 15:39:12 · 982 阅读 · 0 评论 -
Simple XML to NSDictionary Converter
http://ios.biomsoft.com/2011/09/11/simple-xml-to-nsdictionary-converter/For the past year or so, I’ve been very lucky. All the data I’ve had to deal with has been packaged in JSON, not XML.转载 2013-03-10 21:14:10 · 1112 阅读 · 0 评论 -
iOS 的keyChain
http://www.cnblogs.com/v2m_/archive/2012/01/18/2325782.htmliOS 的keyChain2012-01-18 17:16 by v2m, 1662 阅读, 0 评论, 收藏, 编辑说明:每一个keyChain的组成如图,整体是一个字典结构.1.kSecClass key 定义属于那一种类型的keyCha转载 2013-03-04 12:23:42 · 734 阅读 · 0 评论 -
IOS Use Private Framework
https://github.com/nst/iOS-Runtime-HeadersPrivate Framework 有两种情况, 1,Framework 已经加载,只是未导出头文件,这种情况只需要把头文件加入到工程即可直接调用。 如下面代码中的_MFSocket 2, Framework未加载,则需要把Framework和头文件一起原创 2012-11-22 14:49:45 · 2181 阅读 · 0 评论 -
关于NSRunloop的个人理解
http://blog.csdn.net/dongdongdongjl/article/details/7794050今天看到了NSRunloop,其实之前也有看了关于NSRunloop的内容,在这里想简单的就个人的理解总结一下。其实自己在开发的过程当中,还没有更多的涉及到NSRunloop的功能。总的来说,NSRunloop就是类似于windows的消息机制。他的存在是给线程增加事件转载 2012-12-05 12:03:49 · 461 阅读 · 0 评论 -
Run Loops(翻译)
Run loops是线程相关的的基础框架的一部分。一个run loop就是一个事件处理的循环,用来不停的调度工作以及处理输入事件。使用run loop的目的是让你的线程在有工作的时候忙于工作,而没工作的时候处于休眠状态。Run loop的管理并不完全自动的。你仍然需要设计你的线程代码在合适的时候启动run loop并正确响应输入事件。Cocoa和Core Fundation都提供了run转载 2012-12-05 12:28:13 · 614 阅读 · 0 评论 -
Iphone开发之音频101 (part 3):程序实现播放音频
http://article.ityran.com/archives/841本文由 大侠自来也(泰然翻译组)翻译,校对:Iven,yuezang原文链接地址:http://www.raywenderlich.com/259/audio-101-for-iphone-developers-playing-audio-programmatically转载 2012-11-29 16:26:19 · 534 阅读 · 0 评论 -
Xcode环境变量,Build Settings参数
http://www.devdiv.com/Xcode环境变量,Build_Settings参数-weblog-211903-13137.html一、xcode4中的环境变量$(BUILT_PRODUCTS_DIR)build成功后的,最终产品路径--可以在Build Settings参数的Per-configuration Build Products Path转载 2012-11-29 17:50:00 · 1628 阅读 · 0 评论 -
iPhone开发之音频101(Part 2):转换和录音
http://article.ityran.com/archives/372翻译:大侠自来也 校对:Benna,yuezang,Iven原文链接地址:http://www.raywenderlich.com/233/audio-101-for-iphone-developers-converting-and-recording这篇文章是这个系列(涵盖iPhone开发者感转载 2012-11-29 16:24:57 · 671 阅读 · 0 评论 -
iOS 的keyChain
http://www.cnblogs.com/v2m_/archive/2012/01/18/2325782.html说明:每一个keyChain的组成如图,整体是一个字典结构.1.kSecClass key 定义属于那一种类型的keyChain2.不同的类型包含不同的Attributes,这些attributes定义了这个item的具体信息3.每个转载 2012-11-29 16:04:18 · 487 阅读 · 0 评论 -
NSURLConnection(NSNetwork) 和 CFHTTPMessageCreateRequest(CFNetwork) 的区别
经我实验证明,NSURLConnection(NSNetwork) 会自动调用操作系统设置的代理, 而CFHTTPMessageCreateRequest(CFNetwork) 则不会。原创 2012-11-29 14:14:43 · 2024 阅读 · 2 评论 -
Simple iPhone Keychain Access
http://useyourloaf.com/blog/2010/03/29/simple-iphone-keychain-access.htmlThe keychain is about the only place that an iPhone application can safely store data that will be preserved across a re-转载 2012-11-28 09:25:42 · 734 阅读 · 0 评论 -
UIAlertView (ProgressHUD)
//// UIAlertView+ProgressHUD.h// WPUIKit//// Created by Peng Leon on 12/11/26.// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.//#import @interface UIAlertView (ProgressHUD)原创 2012-11-26 18:05:22 · 666 阅读 · 0 评论 -
Objective-C – 关联引用
http://www.ycoder.com/2011/09/objective-c-associative-references关联引用/关联引用你可以使用关联引用模拟在已存在的类上添加对象参数,这个功能只在Mac OS X v10.6和以上版本支持在类外添加存储使用关联引用,你可以对一个对象添加数据而不需要修改这个类定义,这在你没有这个类的转载 2012-11-26 17:19:54 · 697 阅读 · 0 评论 -
Adding Properties to an Objective-C Category – Revisted
http://www.davidhamrick.com/2012/05/28/Adding-Properties-to-an-Objective-C-Category-Revisted.htmlIn my last post I wrote about adding properties to a category in objective-c. I have ended up usi转载 2012-11-26 18:07:33 · 726 阅读 · 0 评论 -
Iphone开发之音频101 (第一部分): 文件和数据类型
http://article.ityran.com/archives/253本翻译由泰然翻译组出品,转载请注明出处,并通知泰然!!翻译:大侠自来也 校对:子龙山人,Iven在做iphone开发之前,我(ray)对声音格式了解的相当少。我知道一些“wav”和“mp3”声音格式的差异,但是我肯定不能准确地告诉你“AAC”、“CAF”是什么格式的声转载 2012-11-29 16:16:48 · 540 阅读 · 0 评论 -
openAL sound on the iPhone
http://benbritten.com/2008/11/06/openal-sound-on-the-iphone/Hey all,Now that the NDA is lifted, and we can start talking about the iPhone code out in the open, i thought it might be nice t转载 2012-11-29 16:36:52 · 1000 阅读 · 0 评论 -
Run Loop
https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html#//apple_ref/doc/uid/10000057i-CH16-SW3A), Run Loops1, Run Lo转载 2012-12-05 12:01:30 · 502 阅读 · 0 评论 -
CFRunLoop学习
from CFRunLoop ReferenceCFRunLoop monitors sources of input to a task and dispatches control when they become ready for processing.Examples of input source might include user input devices,network转载 2012-12-05 11:40:17 · 629 阅读 · 0 评论 -
Defining a Custom Input Source
https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html#//apple_ref/doc/uid/10000057i-CH16-SW3The following sections s转载 2012-12-05 11:36:55 · 850 阅读 · 0 评论 -
Beginning Jailbroken iOS Development - Building And Deployment
http://brandontreb.com/beginning-jailbroken-ios-development-building-and-deployment/Welcome to the next installment of my jailbroken iOS development series. If you haven't already done so, read转载 2012-11-22 12:58:15 · 934 阅读 · 0 评论 -
IPAddress.c
http://www.chrisandtennille.com/code/IPAddress.h/* * IPAddress.h * PersonalProxy * * Created by Chris Whiteford on 2009-02-20. * Copyright 2009 __MyCompanyName__. All rights reserved. * *转载 2012-11-22 10:49:00 · 723 阅读 · 0 评论