- 博客(25)
- 资源 (1)
- 收藏
- 关注
原创 dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from: /private/var/mobile/Conta
dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from: /private/var/mobile/Containers/Bundle/Application/3A8F980D-F647-4D6D-B95A-88EC600BCA6B/RR.app/RR Reason: image not found
2015-06-30 10:15:39 5162
原创 iOS 检查手机是否安装了某一APP
NSURL *instagramURL = [NSURL URLWithString:@"instagram://location?id=1"];BOOL hasInstagram = [[UIApplication sharedApplication] canOpenURL:instagramURL];
2015-06-26 10:26:53 1090
原创 "vtable for __cxxabiv1::__class_type_info", referenced from:
合百度地图sdk的时候,运行工程报错,错误原因是framework里面需要和C++混编的,把工程里面的任何一个.m结尾 的文件showInFinder一下,把后缀名改为.mm就可以了。
2015-06-24 17:56:52 1708
原创 iOS 系统地图实现及定位
1:添加库CoreLocation.framework,MApKit.framework;2:@property (nonatomic, strong) CLLocationManager *locationManager;@property (nonatomic, strong) MKMapView *mapView;@property (nonatomic, strong) CLL
2015-06-24 17:11:11 897
原创 NSClassFromString isKindOfClass
1:NSClassFromString运行时特性: 这个方法判断类是否存在,如果存在就动态加载的,不存为就返回一个空对象;优点: 不需要使用#import,因为类是动态加载的,只要存在就可以加载。因此如果你的toolchain中没有某个类的头文件定义,而你确信这个类是可以用的,那么也可以用这种方法。2:isKindOfClass我们也可以使用isKindO
2015-06-24 10:46:13 996
转载 手把手教你使用CocoaPods管理你的iOS第三方开源类库
1、什么是CocoaPods?首先你要知道 “第三方类库” 这个名词。第三方类库,用最通俗易懂的语言讲就是:别人写好的代码,然后你可以直接拿来用。用最少的时间实现自己需要的功能。这就是第三方类库。这也程序员伟大的地方————开源精神。好,现在你已经大概对第三方类库有了大致的概念了。那么,如果你的项目中有很多这样的第三方类库(这对商业App来说简直是必然的),要怎么管理呢?比如一些类库要升级
2015-06-19 14:03:21 777
原创 iOS va_list,va_start,va_end
- (id)initWithTitle:(NSString *)title message:(NSString *)message completionBlock:(void (^)(NSUInteger buttonIndex, EMAlertView *alertView))block cancelButtonTitle:(NSString *)can
2015-06-18 10:14:43 1130
原创 -pie can only be used when targeting iOS 4.2 or later
网上下载的demo,运行报错-pie can only be used when targeting iOS 4.2 or later解决办法:选择target==》修改development Target改为8.1即可
2015-06-12 17:25:20 787
原创 iOS coreData
static int row=0;static const NSString *kStoryboardName = @"LRCoreDataViewController";static const NSString *kIdentifier = @"LRCoreDataViewController";@interface LRCoreDataViewControllerCellIn
2015-06-12 15:44:47 892
原创 The file “xxx” couldn’t be opened because you don’t have permission to view it.
Xcode升级之后,工程打不开,弹出The file “CoreData” couldn’t be opened because you don’t have permission to view it.解决办法:找到Project---Build Setting中 修改这一项,变成Default Compiler(Apple LLVM 6.0)
2015-06-12 14:46:01 1633
原创 auto property synthesis will not synthesize proterty ;it will be implementedby its superclass, use @
Auto property synthesis will not synthesize property 'title'; it will be implemented by its superclass, use @dynamic to acknowledge intention 这是说编译器自动给属性title合成getter和setter的时候将会在它的父类上实现,也就是说坑爹的x
2015-06-12 09:25:43 1323
原创 CoreData____.sqlite options:(null) ... returned error Error Domain=NSCocoaErrorDomain Code=134100 "T
使用coreData存储数据的时候,运行app就报错CoreData____.sqlite options:(null) ... returned error Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)"。解决办法:把模拟器里面的原
2015-06-11 14:10:25 1620
原创 xcodeproj cannot be opened because the project file cannot be parsed.
解决方法: 1.对.xcodeproj文件右键,显示包内容 2.双击打开 project.pbxproj 文件 3.找到以上类似的冲突信息(可以用commad + f搜索) 4.删除>>>>>这些行,这个就是冲突的地方,删除就可以打开文件了 5.保存,退出 6.重新打开.xcodeproj文件即可
2015-06-10 13:10:49 1652
原创 libc++abi.dylib: terminate_handler unexpectedly threw an exception
在运行一个界面的时候,就是一直libc++abi.dylib: terminate_handler unexpectedly threw an exception,也没有指明是哪里错误,后来经检查发现是数组越界- (CellInfo_t *)getCellInfo:(NSIndexPath *)indexPath{ NSInteger row=[self getCellInfoFro
2015-06-09 11:12:33 1923
原创 Mac 安装brew
damiage:test damingwuage$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"It appears Homebrew is already installed. If your intent is to reinstall youshoul
2015-06-08 15:52:33 810
原创 GCD下载图片
cell.myimage.layer.masksToBounds=YES; cell.myimage.layer.cornerRadius=cell.myimage.frame.size.width/2; //dispatch_async会向kBgQueue队列中添加新的任务去执行,这里kBgQueue队列使用dispatch_get_global_queue(DISPATCH
2015-06-08 12:49:09 999
原创 iOS 四种延时的方法
- (void)initBlock{ //延时的方法 //1:GCD延时 此方式在可以在参数中选择执行的线程。是一种非阻塞的执行方式,没有找到取消执行的方法。 double delay1=2.0;//设置延时时间 dispatch_time_t popTime=dispatch_time(DISPATCH_TIME_NOW, delay1 * NSEC_PE
2015-06-08 12:20:47 996
原创 iOS 标准单例的写法
- (single *)getSingle{ static single *s=nil; static dispatch_once_t t; dispatch_once(&t, ^{ s=[[single alloc]init]; }); return s;}
2015-06-08 11:20:51 1524
原创 iOS GCD下载图片
cell.myimage.layer.masksToBounds=YES; cell.myimage.layer.cornerRadius=cell.myimage.frame.size.width/2; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
2015-06-08 10:55:46 1149
原创 iOS Block使用
Block实体形式如下:^(传入参数列){行为主体};1:Block可以访问局部变量,但是不能修改。int multiplier = 7; int (^myBlock)(int) = ^(int num) { multiplier ++;//编译报错 return num * multip
2015-06-08 09:40:44 678
原创 workspace at in use or cannot be created,choose a different one
出现这种情况一般是workspace的配置文件中出现了.lock文件(workspace/.metadata/.lock),锁定了workspace。把.lock文件删除即可。如果该文件不能删除,可能是因为javaw.exe进程未结束,结束该进程及eclipse.exe进程即可删除。正常情况下,如果你打开了一个workspace,在想打开另一个workspace也会出现上面的提
2015-06-05 17:50:53 1080
转载 iOS 堆和栈的区别
一、预备知识—程序的内存分配 一个由C/C++编译的程序占用的内存分为以下几个部分 1、栈区(stack)— 由编译器自动分配释放 ,存放函数的参数值,局部变量的值等。其 操作方式类似于数据结构中的栈。 2、堆区(heap) — 一般由程序员分配释放, 若程序员不释放,程序结束时可能由OS回 收 。注意它与数据结构中的堆是两
2015-06-05 13:44:41 1147
原创 iOS面试题
1.写一个标准宏,这个宏输入两个参数并返回较小的一个#define MIN(A,B) ((A) 这个测试是为下面的目的而设的:1). 标识#define在宏中应用的基本知识。这是很重要的,因为直到嵌入(inline)操作符变为标准C的一部分,宏是方便产生嵌入代码的唯一方法,对于嵌入式系统来说,为了能达到要求的性能,嵌入代码经常是必须的方法。2). 三目运算符的知识。这个
2015-06-05 12:46:17 961
原创 Could not read from remote repository.
今天换新电脑,忘了配置git环境,就去git服务器上取代码,然后一直报错,后来就重新配置了git环境。过程如下damingwuage:Desktop damingwuage$ ssh-keygen -t rsa -C "1011076472@qq.com"Generating public/private rsa key pair.Enter file in which to sa
2015-06-05 11:27:15 2519
原创 Android动态添加控件约束位置
用LayoutParams: RelativeLayout insertLayout = (RelativeLayout)view1.findViewById(R.id.screen);//screen是一个RelativeLayout 布局的idImageView imgApple2 = new ImageView(MainActivity.this); imgA
2015-06-04 09:39:45 2182
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人