自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Code Heaven

Choose what we love, and love it!

  • 博客(269)
  • 资源 (19)
  • 收藏
  • 关注

原创 clion 常用快捷键

clion常用快捷键备忘。1. 查找CTRL+N 查找类 CTRL+SHIFT+N 查找文件 CTRL+SHIFT+ALT+N 查找类中的方法或变量 CIRL+B 找变量的来源 CTRL+ALT+B 找所有的子类 CTRL+SHIFT+B 找变量的 类 CTRL+G 定位行 CTRL+F 在当前窗口查找文本 CTRL+SHIFT+F 在指定窗口查找文本 CTRL+R 在当前窗口替换文本 CTRL+SH

2021-05-19 11:26:09 1032

原创 Xcode Test Navigator一直显示"Loading Tests..." 解决办法

做 Unit Test时,有时工程比较大时,testCase中集成的单元测试用例会比较多,如果新增、修改、写unit test每次有变动时都全部运行所有的测试用例,效旅是非常低的。幸运的是,Xcode 工具有一个Test navigator 视图,利用 Xcode 工具 Test navigator 视图可以单独跑一个测试用例。1. 问题:可是,最近发现我的xcode test...

2019-12-20 15:59:25 594

原创 Mac 下如保查看二进制文件,比如.heic文件

如题,介绍下如何在mac下查看二进制文件,以.heic heif文件举例。1. heif 文件格式判断+ (SDImageFormat)sd_imageFormatForImageData:(nullable NSData *)data { if (!data) { return SDImageFormatUndefined; } ...

2019-10-25 21:02:49 3141

原创 Mac iOS Simulator录制Gif图

1. QuickTime Player打开QuickTime–>文件–>新建屏幕录制QuickTime Player 弹出界面提示点击录制,选择录制区域点击右上角菜单栏功能按钮,结束录制2. GifBreweryGifBrewery 点击Create GIF生成Gif图....

2019-03-28 19:26:02 445 2

原创 关于svn merge出现Missing ranges问题的解决方法

问题描述:分支:branches/BusinessFlow/iPhone_Qzone_8.2.5_IPv6主干:trunk/src分支一直rebase保持和主干同步,分支和主干本地都up到最新后,在主干上merge 分支,出现如下错误:解决办法:尝试了stackoverflow上的方法,在分支上 “svn merge -r 650:693。。。”,但是merge不到东西;也尝试了...

2019-01-10 17:05:27 3495

转载 在xCode运行时,socketfilterfw进程吃130-160%CPU问题

在最新的xCode中,系统地通过 socketfilterfw 进程显着减慢速度。 这需要我的macbook几乎以超过100%的CPU使用率飞行它只能通过杀死这个进程来停止xCode有什么问题?转自:https://www.koubeiblog.com/inteqa/7f2f631a9a4d5b95659bd088d37849eb.html...

2018-12-19 21:35:42 553

原创 一键切换bundle为framework

因为历史原因,工程中有此子工程虽然是.framework后缀,但其实是bundle:改造方法,如第一张图。

2018-06-28 21:39:06 242

原创 静态库里面写的category被外部使用没有-force_load会导致找不到该方法

*.a静态库里面,写的category扩充的方法,在外面被第三方使用时有可能会crash,原因是没有load。如下图:解决方法:force-load 这个 *.a 

2018-05-28 20:08:38 623

原创 svn错误:a peg revision is not allowed here解决方法

refer: https://stackoverflow.com/questions/757435/how-to-escape-characters-in-subversion-managed-file-names

2018-05-04 17:09:39 3282

转载 解决XCode一直indexing的方法

解决XCode一直indexing的方法XCode有时会一直卡在index的阶段,导致项目无法编译,严重阻碍了日常工作,有时这有可能是你的代码导致的《XCode 8 Stuck At Indexing》,但大部分情况是由于XCode的工程索引损坏。如果~/Library/Caches/com.apple.dt.Xcode/ 下的缓存或Xcode自己出了问题,就会卡在indexing或者编译的某个阶...

2018-05-03 15:24:08 12945

原创 iOS之人工智能理解

【硅谷问道】对于 iOS 开发,人工智能意味着什么?http://www.cocoachina.com/ios/20170911/20526.html

2017-09-12 18:35:29 2582

原创 UIView周边加阴影,并且同时圆角

在给view加阴影并且同时加圆角的时候,会遇到经典的masksToBounds问题,masksToBounds为YES或NO时,仅阴影或圆角生效,不能同时生效。为解决此问题,解决办法是加一层layer来实现。要点:1. shadow加到单独的layer上面,layer和view.layer同frame,并且是路经阴影额?,然后加到view的底层;2. 在view的layer上面加cornerRad

2017-06-05 21:50:43 18894 2

转载 如何关闭iOS系统自动更新提示?

几个应对方案:1. 设置 - 通用 - 用量 - 管理存储空间 - 找到更新包(ios9.3),点击,删除2. 设置 - iTunes&App Stores, 找到Updates,关闭。如果以上两个方案还不管用,直接:在手机上打开safari,地址栏输入: https://oldcat.me/web/NOOTA9.mobileconfig然后回车按照要求安装此provision文件即可,然后重启。

2017-04-08 17:33:02 32662

原创 居中裁剪 image 为正方形

/* 以原图最短边为边长,居中裁剪 image 为正方形 */+ (UIImage *)centerClipImage:(UIImage *)image;/* 以原图最短边为边长,居中裁剪 image 为正方形 */+ (UIImage *)centerClipImage:(UIImage *)image{ if (!image) { return nil;

2017-03-23 17:16:18 5923

原创 UIButton水平居中、垂直居中按钮 image 和 title

//// UIButton+CenterAlignment.h// QZone//// Created by Jones Duan on 14-7-30.// Copyright (c) 2014年 tencent. All rights reserved.//#import @interface UIButton (CenterAlignment)/** *

2017-03-03 19:50:12 9371

原创 Mac OS X上面的Homebrew[备忘]

Mac OS X上面的Homebrewhttps://brew.sh/

2017-02-28 16:29:06 3747

原创 MagSafe 适配器给MacBook Pro充电,LED指示灯不亮,使用 Apple Hardware Test检测硬件

如题:MagSafe 适配器给MacBook Pro充电,LED指示灯不亮,使用 Apple Hardware Test检测硬件苹果官方技术支持:一、 2013 年 6 月及以后出的Mac,使用 Apple Diagnostics  https://support.apple.com/zh-cn/HT202731二、 2013 年 6 月之前出的Mac,使用 Apple Hardware Test

2017-01-18 17:26:45 19740

原创 iOS Exception Code 之 Magic Number

https://en.wikipedia.org/wiki/Hexspeak  iOS Exception Code 之 Magic Number 备忘。

2016-07-20 23:01:37 6072

原创 iOS objc_msgSend 野指针Crash 从 Log 提取 Crash 时 selector 的地址和名字并打印

从 crash stack log 里面,提取 objc_msgSend 关键字,定位是否是野指针问题导致的crash,如果是则打印 crash 时的 objc_msgSend 调用的第二个参数,即 selector 的地址和名字String,方便定位和 fix 此类型的 crash。具体提取方法:1. 提取字符串地址:32bit 机器,读取 crash 时 log 里面 r1: 0x 后面的 8

2016-06-14 18:41:38 7052

原创 audio session config

#pragma mark -#pragma mark - audio session config- (void)setAudioSessionConfig{ NSError *error; AVAudioSession *session = [AVAudioSession sharedInstance]; _originalAudioSessionCategory

2016-04-21 14:36:15 6169 1

原创 UILabel 调整行间距

/* 调整行间距 */+ (void)adjustLineSpacingOfLabel:(UILabel *)label to:(CGFloat)lineSpacing{ NSString *textStr = label.text; if (textStr.length <= 0) { return; } NSMutableAtt

2016-01-29 17:21:45 6135

原创 lldb po [$view recursiveDescription]; 打印视图层次

备忘:lldb 打印视图层次: 对某一个view,比如operationBgViewpo [operationBgView recursiveDescription];

2016-01-15 13:04:46 9700

原创 How Do I Declare A Block in Objective-C? [备忘]

How Do I Declare A Block in Objective-C?As a local variable:returnType (^blockName)(parameterTypes) = ^returnType(parameters) {...};As a property:@property (nonatomic, copy) returnType (^blockName)(pa

2015-12-01 20:46:07 5379

原创 十六进制字符串转化为十进制值strtoul函数

eg:NSString *strtest =@"7fffffff"; NSUInteger val = strtoul([[strtest substringWithRange:NSMakeRange(0, 8)] UTF8String], 0, 16); NSLog(@"val = %d", val);打印结果:2015-09-28 17:26:51.420 iOSTest[28

2015-09-28 17:32:29 8661 1

原创 关于[[NSNotificationCenter defaultCenter] addObserver不remove后续又收到通知crash问题

今天试了一个小demo,测出一个现象,同步出来:object 作为 observer 监听了通知 A,然后 object 中途被释放执行了dealloc,随后app发出这个通知 A:iOS 6、iOS 7、iOS 8: 必挂iOS 9:不会挂真机测试。iOS 9.0 Documentation, 最新文档:- addObserver:selector:name:object: 是说要添加remov

2015-09-23 19:12:20 8745

原创 No Team Selected:A team must be selected to run 'ProjectName' on iPhoneName

1. 现象:发布在 app store 的 qzone,app bundle identifier:com.tencent.qzone证书支持com.tencent.*然后自已写的测试demo,bundle identifier:com.tencent.iOSTest拿了一堆将机器identifier添加进device list里了的机器,来真机运行这个demo,结果发现有的机器可以运行,有的机器

2015-09-23 18:33:31 14229

原创 打开Voice Over时,CATextLayer的string对象兼容NSString和NSAttributedString导致的Crash(二解决思路3)

续前一篇: 打开Voice Over时,CATextLayer的string对象兼容NSString和NSAttributedString导致的Crash(二解决思路2)ok,到这里已经能够锁定范围了,看看po $r0的打印结果:再看看qzone的当前界面:即而局第一条feeds的昵称时挂掉了。经过追查昵称布局,发现同事写的一个class有些问题,废话不多说看代码:@interface QZShi

2015-09-19 21:59:19 6876

原创 打开Voice Over时,CATextLayer的string对象兼容NSString和NSAttributedString导致的Crash(二解决思路2)

接上一篇:打开Voice Over时,CATextLayer的string对象兼容NSString和NSAttributedString导致的Crash(二解决思路1)有了以上背景,可知objc_msgSend第一个参数是obj,第二个selector,第三个即selector的第一个参数。打印下看看:因为向r0(NSString)发送attributesAtIndex:effectiveRang

2015-09-19 21:38:22 8101

原创 打开Voice Over时,CATextLayer的string对象兼容NSString和NSAttributedString导致的Crash(二解决思路1)

二、解决思路:利用Xcode符号断点。crash堆栈里面有一个很明显的信息,即-[NSObject(NSObject) doesNotRecognizeSelector:],所以然后开着voice over,编译真机运行Qzone,然后程序走到这里停了:=============================================================这里插入一点Runtim

2015-09-19 21:20:17 8744

原创 打开Voice Over时,CATextLayer的string对象兼容NSString和NSAttributedString导致的Crash(一现象)

一、现象:iPhone真机打开Voice Over的情况下,iPhone QQ空间工程,Xcode 真机编译启动必Crash,main函数里面 NSSetUncaughtExceptionHandler 捕获到Exception:捕获异常函数:static void UncaughtExceptionHandler(NSException* exp){ QZLOG_ERROR(@"QZo

2015-09-19 21:05:02 17802

原创 打开Voice Over时,CATextLayer的string对象兼容NSString和NSAttributedString导致的Crash

一、现象:iPhone真机打开Voice Over的情况下,iPhone QQ空间工程,Xcode 真机编译启动必Crash,main函数里面 NSSetUncaughtExceptionHandler 捕获到Exception:捕获异常函数:static void UncaughtExceptionHandler(NSException* exp){ QZLOG_ERROR(@"QZo

2015-09-19 20:59:34 3649

原创 NSDictionary writeToFile:atomically: 时失败

一、现象:如下图,当NSDictionary调用 writeToFile:atomically: 时,如果容器里面包含的对象(即通过 objectForKey: 拿到的对象),为非property list objects 对象,则写入会失败。如果容器里面包含的对象也是容器,则递归考察是不是property list objects ,不是则写入失败。苹果官方文档:二、解决方案:dic调用 set

2015-09-18 21:45:29 11097

原创 Not saving crash log because we have reached the limit for logs to store on disk.解决办法

一、问题简述:Xcode, window》Devices》DEVICES选中自已的设备,打开控制台:提示日志存量已达限制,这个是系统抛出的log。"Not saving crash log because we have reached the limit for logs to store on disk. Sync or otherwise clear logs from /var/mobil

2015-09-18 21:18:55 5384

原创 iOS开发之*.a静态库注意事项

以*.a静态库的形式引入工程的(比如:libUploadLib.a),*.a里面的class有category形式实现时,除了在工程Target的 Build Phases里面的 Link Binary With Libraries里面添加依赖外,还需要在Target的 Build Settings的 Linking -> Other Linker Flags (Debug or Release)里面添加:-force_load

2015-07-27 20:46:53 3696

原创 关于weak

#define DECLARE_WEAK_SELF __typeof(&*self) __weak weakSelf = self#define DECLARE_STRONG_SELF __typeof(&*self) __strong strongSelf = weakSelf

2015-07-24 09:44:52 1773

原创 返回present的根

//返回四大tab页面+ (void)gobackToTabarController{ UINavigationController* selectedTabNavController = (UINavigationController *)[QZoneUIAppDelegate shareInstance].qqTabbarController.selectedViewControl

2015-07-23 11:04:14 1704

原创 通过一个color创建一个image

使用的地方:[_addButton setBackgroundImage:[UIImage imageWithColor:[[UIColor whiteColor] colorWithAlphaComponent:0.f]] forState:UIControlStateDisabled];UIImage+Theme.m==============================+ (UIImag

2015-07-21 10:45:34 1582

原创 UILabel设定行间距方法

NSString *textStr = @"iPhone规定:任何应用想访问麦克风,必须被授权麦克风服务。请进入“设置”->“隐私”->“麦克风”中打开QQ空间的麦克风服务。"; UIFont *textFont = [UIFont systemFontOfSize:14]; CGSize textSize = [textStr sizeWithFont:textF

2015-07-09 22:09:29 36211

原创 Mac下hosts文件配置

工作中总会因为莫名其妙的原因,比如Mac下面打不开某网站,但是在windows 7下面却可以,此时只需两步即可完成在Mac下面上网。在Windows下面Win+R,输入cmd,进入命令行,将在windows下面能打开,但是在Mac下面不能打开的网址,贴到命令行ping一下,然后把ip对应的填到mac下的hosts文件当中去即可。1. windows 命令行下面ping在Mac下面打不开但是在win

2015-07-03 10:53:23 8084

原创 Download all Apple open source OS X files at once

While it is well known that Mac OS X contains open source code, how to access and download that source code is perhaps less well known. Apple publishes all its open source code on their Apple Open Sou

2015-06-23 14:39:48 2159

IMG_2900.HEIC.zip

heif文件

2019-10-25

Procedure Call Standard for the ARM 64-bit Architecture (AArch64)

Procedure Call Standard for the ARM 64-bit Architecture (AArch64)

2015-09-19

Procedure Call Standard for the ARM® Architecture

Procedure Call Standard for the ARM® Architecture

2015-09-19

scriptDownloadAppleOpenSourceCode

AppleOpenSource Download shell 脚本

2015-06-23

XZ Utils 5.0.3

Mac OS X、Linux下面*.tar.xz文档解压缩命令行工具~!

2013-08-27

Xib设计UITableViewCell然后动态加载

Xib设计UITableViewCell然后动态加载例子,对应博客贴子地址: http://blog.csdn.net/duanyipeng/article/details/7259108

2012-02-14

android-2.3-src.zip

android-2.3-src.zip对应导入到Eclipse中的android.jar的源码

2011-10-28

android-2.3.3-gingerbread-src.zip

android-2.3.3-gingerbread-src.zip

2011-10-28

android-2.3.1-gingerbread-src.zip

android-2.3.1-gingerbread-src.zip

2011-10-28

android-2.2-src.zip

android-2.2-src.zip对应导入Eclipse的andorid.jar源码

2011-10-28

android-2.2-froyo-src.zip

android-2.2-froyo-src.zip

2011-10-28

android-2.1-src.zip

android-2.1-src.zip 对应导入到Eclipse的android.jar的源码。

2011-10-28

android-2.1_r2-sources.jar

android-2.1_r2-sources.jar

2011-10-28

android-1.6_r1-donut-src.zip

android-1.6_r1-donut-src.zip

2011-10-28

android-1.5-cupcake-src.zip

android-1.5-cupcake-src.zip用于导入到Eclipse中的对应android.jar的java源码。

2011-10-28

iPhone开发秘籍(第2版) 英文原版

Contents at a Glance Preface xix 1 Introducing the iPhone SDK 1 2 Building Your First Project 37 3 Objective-C Boot Camp 91 4 Designing Interfaces 143 5 Working with View Controllers 187 6 Assembling Views and Animations 211 7 Working with Images 257 8 Gestures and Touches 301 9 Building and Using Controls 341 10 Alerting Users 391 11 Creating and Managing Table Views 423 12 Making Connections with GameKit and Bonjour 495 13 Networking 545

2011-10-21

腾讯2011求职大礼包

腾讯2011求职大礼包.pdf 腾讯2011年各部门面试题相关!

2010-12-12

联发科技2011求职大礼包-应届生求职网

联发科技2011求职大礼包-应届生求职网.pdf

2010-12-12

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除