随笔分类 - ~~ios开发~~
摘要:参考http://www.toolsandapplications.com/guided-access-how-to-disable-the-home-button-on-ipad/
        阅读全文
                
摘要:根据http://www.merowing.info/2012/04/drawing-smooth-lines-with-cocos2d-ios-inspired-by-paper/用cocos2d画线时出现闪烁问题原有的画线部分放在CCLayer的draw函数里面-(void)draw{ [renderTexture begin]; 画线部分 [renderTexture end];}由于draw每帧时都执行,故draw频繁调用,出现闪烁,解决方法是利用update,[self schedule:@selector(update:) interval:1.0/60];-(v...
        阅读全文
                
摘要:[xxx timeIntervalSinceNow]出现EXC_BAD_ACCESS错误的主要原因是之前的[NSDate date]返回一个autoreleased的NSdata,其被释放掉解决方法第一种方法是将该文件变成ARC的,让系统自动管理内存第二种方法是增加引用计数,让其不被释放,[[NSDate date]retain] 但最后要记得手动释放
        阅读全文
                
摘要:(1)出现"std::__1::basic_ostream >::flush()"之类的错误Undefined symbols for architecture i386: "std::__1::basic_ostream >::flush()", referenced from: cv::gpu::error(char const*, char const*, int, char const*) in opencv2(gpumat.o) "std::__1::basic_ostream >::sentry::sentry(s
        阅读全文
                
摘要:第一种解决方法是去github上下载最新的CCBReader第二种解决方法是把other替换成self.inner建议用新版本的
        阅读全文
                
摘要:首先导入libxml2.dylib,具体怎么导入跟导入frameworks一样然后在Build Setting中的Header Search Paths to: 添加${SDK_DIR}/usr/include/libxml2
        阅读全文
                
摘要:今天在利用AFNetworking做网络请求时总是能看到添加的CCSprite精灵总是延迟一会才显示,google了半天没有找到答案,考虑到CCSprite要被渲染才能显示,于是直接在场景中的CCLayer的draw函数上添加了一个断点,查看什么时候CCLayer才被渲染,发现每次执行下面语句时CCLayer的draw函数就不会执行,倒是CCSprite不能渲染,故执行下面函数时阻塞了draw函数的执行NSTime *_time;//开始轮询-(void)startUpdateQuery{ _timer = [NSTimer scheduledTimerWithTimeInterval:...
        阅读全文
                
摘要:当向下面使用时会出现错误#import "AFNetworking.h"#import "AFURLSessionManager.h"AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];主要原因是NSURLSession模块仅支持ios7,打开AFURLSessionManager.h会看到一个宏#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) &&
        阅读全文
                
摘要:NSString *myClassName = @"MainScene";Class myClass = NSSClassFromString(myClassName);
        阅读全文
                
摘要:使用AFNetworking 2.0 请求数据时出现错误 Request failed: unacceptable content-type: text/html 解决方法添加一行manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];即可整个代码为: AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; manager.responseSerial
        阅读全文
                
摘要:当将AFNetworking添加到工程后编译时出现Undefined symbols for architecture i386: "_SecCertificateCopyData", referenced from: _AFCertificateTrustChainForServerTrust in AFSecurityPolicy.o "_SecCertificateCreateWithData", referenced from: _AFPublicKeyForCertificate in AFSecurityPolicy.o "_Sec
        阅读全文
                
摘要:myView.clipsToBounds = YES;
        阅读全文
                
摘要:CGImageRef imgRef = [image CGImage]; 通过此种方式的得到的CGImageRef不能利用CGImageRelease释放,因为你不拥有它所以不用释放在ios中特定形状剪裁图片的实现(注意要释放内存,不然即使用ARC也会出现内存泄露)- (UIImage*) maskImage:(UIImage *)image withMask:(UIImage *)mask{ CGImageRef imgRef = [image CGImage]; CGImageRef maskRef = [mask CGImage]; CGImageRef actual...
        阅读全文
                
                    
    ios 开发中出现的 pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug
    
                
                
摘要:主要原因是某部分内存释放的太频繁,解决方法是检查函数的中[xxx release]; 将其注释掉 就行了
        阅读全文
                

 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号