上一页 1 2 3 4 5 6 7 ··· 17 下一页
摘要: 开发iPad应用程序与iPhone有一点小差别,就是iPad支持弹出框。这个示例展示如何在UIPopoverController上显示一个UIPickerView,当然你可以显示任何的UIView到UIPopover上面。原理就是构建一个UIViewController,然后将这个UIViewController加在UIPopoverController上,最近显示UIPopoverController,即显示出我们的UIViewController的内容。首先,要我们的controller支持UIPickerViewDelegate,UIPopoverControllerDelegate协议 阅读全文
posted @ 2013-05-08 18:16 高笑228 阅读(217) 评论(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 阅读(228) 评论(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 阅读(567) 评论(0) 推荐(0)
摘要: cd 文件目录svn add *.asvn vi -m "" 阅读全文
posted @ 2013-05-02 17:00 高笑228 阅读(224) 评论(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 阅读(219) 评论(0) 推荐(0)
摘要: 选择一个CategoryAVAudioSessionCategoryAmbient或kAudioSessionCategory_AmbientSound——用于非以语音为主的应用,使用这个category的应用会随着静音键和屏幕关闭而静音。并且不会中止其它应用播放声音,可以和其它自带应用如iPod,safari等同时播放声音。AVAudioSessionCategorySoloAmbient或kAudioSessionCategory_SoloAmbientSound ——类似于AVAudioSessionCategoryAmbient不同之处在于它会中止其它应用播放声音。 这个categor 阅读全文
posted @ 2013-03-15 14:33 高笑228 阅读(15851) 评论(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 阅读(230) 评论(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 阅读(4138) 评论(0) 推荐(0)
摘要: objective-c文件、文件夹操作123456789//如果"/Documents/Theme"路径不存在,则创建。 if(![[NSFileManagerdefaultManager]fileExistsAtPath:themePath]) { [[NSFileManagerdefaultManager]createDirectoryAtPath:themePathattributes:nil]; } //删除已存在的同名文件夹 if([[NSFileManagerdefaultManager]fileExistsAtPath:savePath]){ [[NSFile 阅读全文
posted @ 2013-02-21 17:56 高笑228 阅读(299) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 17 下一页