随笔分类 -  笔记

摘要:方法1.go to the Product menu and find the Edit Scheme menu there.While in Edit Scheme window, select the "Run" option on the left hand side of the scree... 阅读全文
posted @ 2014-06-11 11:20 高笑228 阅读(3361) 评论(0) 推荐(0)
摘要:(1).'libxml/tree.h' file not found解决办法:1. 导入libxml2.dylib2.设置Header Search Paths 为 /usr/include/libxml2 阅读全文
posted @ 2013-11-22 11:14 高笑228 阅读(165) 评论(0) 推荐(0)
摘要:示例1:基本赋值取值@interface Book : NSObject { NString *name;}@end#import "Book.h"@implementation Book@end这个Book类太简单了,只有一个实例变量name。而且,按照以前掌握的技术,没有办法给这个变量赋值了。下面KVC登场:Book *book=[[Book alloc] init];[book setValue:@"《Objective-C入门》" forKey:@"name"];NSString *name=[book valueForKey 阅读全文
posted @ 2013-09-04 15:32 高笑228 阅读(353) 评论(0) 推荐(0)
摘要:现象:在xcode中调试程序的时候,无论是鼠标指在变量上,还是在gdb中po命令都看不到内存中变量的值。解决办法:在Project的Build中把 Optimization Level 设置成 None 即可。转自http://blog.csdn.net/ajrm0925/article/details/8646956 阅读全文
posted @ 2013-09-04 15:21 高笑228 阅读(545) 评论(0) 推荐(0)
摘要:焦点在UITextField或UITextView中的时候,键盘会出现,想点一下背景就让键盘消失。这是在手持设备上服合用户的操作习惯。当然方法有很多,在这儿我说一个比较实用的方法。因为UIView默认是不能关联方法调用的,而UIControl则不一样,它可以关联很多方法。而UIControl是UIView的子类,它有UIView的所有特性,于是我们可以把我们的UIView修改为UIControl类,这样再给它关联一个事件,一般就是up in side,这样在这个关联的事件里我们dismiss所有的UITextField或UITextView.这儿有一个递归找view上所有的UiTextFiel 阅读全文
posted @ 2013-05-09 17:55 高笑228 阅读(243) 评论(0) 推荐(0)
摘要:1.Difference between shallow copy and deep copy?
浅复制和深复制的区别?
答案:浅层复制:只复制指向对象的指针,而不复制引用对象本身。
深层复制:复制引用对象本身。
意思就是说我有个A对象,复制一份后得到A_copy对象后,对于浅复制来说,A和A_copy指向的是同一个内存资源,复制的只不过是是一个指针,对象本身资源
还是只有一份,那如果我们对A_copy执行了修改操作,那么发现A引用的对象同样被修改,这其实违背了我们复制拷贝的一个思想。深复制就好理解了,内存中存在了
两份独立对象本身。
用网上一哥们通俗的话将就是:
浅复制好比你和你的影子,你完 阅读全文
posted @ 2013-05-06 23:44 高笑228 阅读(229) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/TankXiao/archive/2013/04/17/3026707.html 阅读全文
posted @ 2013-05-03 11:25 高笑228 阅读(218) 评论(0) 推荐(0)
摘要:1.断开设备,删除在设备调试的APP2.强行退出XCode(Quit xcode),不要只是关闭,直接强行退出3.删除系统生成的文件(~/Library/Developer/Xcode/DerivedData/),使用终端命令进入到相应目录,然后执行:rm -rf DerivedData/,等一会就可以了4.重启XCode,连接完设备测试就可以了 阅读全文
posted @ 2013-05-02 18:22 高笑228 阅读(569) 评论(0) 推荐(0)
摘要:cd 文件目录svn add *.asvn vi -m "" 阅读全文
posted @ 2013-05-02 17:00 高笑228 阅读(225) 评论(0) 推荐(0)
摘要:在iOS 5下画面的旋转都是shouldAutorotateToInterfaceOrientation来控制的,但是这个函数在ios6下不起作用。在iOS 6下使用supportedInterfaceOrientations、shouldAutorotate来控制。如果单一的控制画面那么只需要加在上面两个函数。如下:123456789- (BOOL)shouldAutorotate { return YES;}- (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskAll;}如果是含有.. 阅读全文
posted @ 2013-04-17 11:35 高笑228 阅读(220) 评论(0) 推荐(0)
摘要:选择一个CategoryAVAudioSessionCategoryAmbient或kAudioSessionCategory_AmbientSound——用于非以语音为主的应用,使用这个category的应用会随着静音键和屏幕关闭而静音。并且不会中止其它应用播放声音,可以和其它自带应用如iPod,safari等同时播放声音。AVAudioSessionCategorySoloAmbient或kAudioSessionCategory_SoloAmbientSound ——类似于AVAudioSessionCategoryAmbient不同之处在于它会中止其它应用播放声音。 这个categor 阅读全文
posted @ 2013-03-15 14:33 高笑228 阅读(15858) 评论(0) 推荐(0)
摘要:可以达到文字描一圈白边的效果继承UILabel以后重载drawTextInRect- (void)drawTextInRect:(CGRect)rect {CGSize shadowOffset = self.shadowOffset;UIColor *textColor = self.textColor;CGContextRef c = UIGraphicsGetCurrentContext();CGContextSetLineWidth(c, 1);CGContextSetLineJoin(c, kCGLineJoinRound);CGContextSetTextDrawingMode(c 阅读全文
posted @ 2013-03-11 10:22 高笑228 阅读(231) 评论(0) 推荐(0)
摘要:- (void) setUpAndAddAudioAtPath:(NSURL*)assetURL toComposition:(AVMutableComposition *)composition start:(CMTime)start dura:(CMTime)dura offset:(CMTime)offset{ AVURLAsset *songAsset = [AVURLAsset URLAssetWithURL:assetURL options:nil]; AVMutableCompositionTrack *track = [composition addMutableTrack.. 阅读全文
posted @ 2013-03-04 15:39 高笑228 阅读(4139) 评论(0) 推荐(0)
摘要:CAKeyframeAnimation *Animation = [CAKeyframeAnimation animationWithKeyPath:@"position"]; Animation.duration = 2; Animation.path = thePath.CGPath; Animation.calculationMode = kCAAnimationPaced; Animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaT... 阅读全文
posted @ 2013-01-29 15:15 高笑228 阅读(340) 评论(0) 推荐(0)
摘要:http://www.cocoachina.com/special/iap.html 阅读全文
posted @ 2012-12-03 10:37 高笑228 阅读(88) 评论(0) 推荐(0)
摘要:本文转载自http://www.cocoachina.com/bbs/read.php?tid=31300一:确认网络环境3G/WIFI mm IOgl jUj3 'e.p 1. 添加源文件和framework "K*iGP Yf ?mEZm 开发Web等网络应用程序的时候,需要确认网络环境,连接情况等信息。如果没有处理它们,是不会通过Apple的审查的。 hS(<R!1,i Apple 的 例程 Reachability 中介绍了取得/检测网络状态的方法。要在应用程序程序中使用Reachability,首先要完成如下两部: 8IvI|$[t 阅读全文
posted @ 2012-11-29 11:38 高笑228 阅读(293) 评论(0) 推荐(0)
摘要:本文转载自 http://www.cnblogs.com/linyawen/archive/2012/06/09/2542784.htmlPresent ViewController Modally一、主要用途 弹出模态ViewController是IOS变成中很有用的一个技术,UIKit提供的一些专门用于模态显示的ViewController,如UIImagePickerController等。弹出模态ViewController主要使用于一下这几种情形: 1、收集用户输入信息 2、临时呈现一些内容 3、临时改变工作模式 4、相应设备方向变化(用于针对不同方向分别是想两个ViewC... 阅读全文
posted @ 2012-11-29 11:28 高笑228 阅读(215) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/11199421/xcode-lldb-watchpoints 阅读全文
posted @ 2012-11-17 16:47 高笑228 阅读(158) 评论(0) 推荐(0)
摘要:http://285746555.blog.51cto.com/2966432/658383 阅读全文
posted @ 2012-08-04 16:18 高笑228 阅读(137) 评论(0) 推荐(0)
摘要:NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; NSDate *date =[[[NSDate alloc]initWithTimeIntervalSince1970:[cobj.time doubleValue]]autorelease]; // NSLog(@"%@", date); NSString *strDate = [dateFormatter strin 阅读全文
posted @ 2012-07-29 21:32 高笑228 阅读(131) 评论(0) 推荐(0)