随笔分类 -  ios

摘要:对象不释放是因为引用记数没有清零的原因导致的。而引用计数没有清零就是retain和release没有配对。现在介绍一种方案可以很直观地调查出这种问题:继承对象的retain & release接口,Debug查看retain 和 release的调用情况,check是否有retain却没有release的操作. 阅读全文
posted @ 2013-07-29 13:46 wsjisji 阅读(1573) 评论(0) 推荐(0)
摘要:最近做了一个项目,支持Android和ios两个平台。这个项目中会用到一些简单的Socket通信,所以就有机会接触到了Android和ios两个平台的Socket实现。现在将android和ios的Socekt做一些总结:Android://建立Socket连接public boolean connect() throws IOException { LogUtils.LOGI(TAG, "Conect to socket in "); // Close socket first. close(); if (null == mContro... 阅读全文
posted @ 2013-06-20 16:47 wsjisji 阅读(3829) 评论(0) 推荐(0)
摘要:typedef enum { UIViewContentModeScaleToFill, UIViewContentModeScaleAspectFit, // contents scaled to fit with fixed aspect. remainder is transparent UIViewContentModeScaleAspectFill, // contents scaled to fill with fixed aspect. some portion of content may be clipped. UIViewConten... 阅读全文
posted @ 2013-04-28 14:45 wsjisji 阅读(447) 评论(0) 推荐(0)
摘要:Overview: Social FeaturesThere are three ways you can share to social media sites:TheUIActivityViewControllerclass allows your app to provide several services in context, one of which would be posting content to social media sites.TheSLComposeViewControllerclass is targeted more to social media site 阅读全文
posted @ 2013-04-23 13:56 wsjisji 阅读(813) 评论(0) 推荐(0)
摘要:IOS 获取 Camera roll里的图片 or 视频。-(void)getImgs{ dispatch_async(dispatch_get_main_queue(), ^{ NSAutoreleasePool *pool = [[NSAutoreleasePoolalloc] init]; ALAssetsLibraryAccessFailureBlock failureblock = ^(NSError *myerror){ NSLog(@"相册访问失败 =%@", [myerror localizedDescription]);... 阅读全文
posted @ 2013-04-18 09:51 wsjisji 阅读(1215) 评论(0) 推荐(0)
摘要://初始化:UIActivityIndicatorView* indicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];//设置显示样式,见UIActivityIndicatorViewStyle的定义indicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;//设置显示位置[indicator setCenter:CGPointMake(self.frame.size.width / 阅读全文
posted @ 2013-04-09 09:37 wsjisji 阅读(9689) 评论(0) 推荐(0)
摘要:今天开始了集成Dropbox的任务。注册Dropbox 开发者帐号等在这里不冗术。在将Dropbox framework导入到项目工程的过程中,我遇到了如下dumplicate symbols defined 的问题,通过在项目中搜索重复的关键字,我发现原来我们项目中有和Dropbox使用相同的文件,另外我们项目中有一个库,库中也有这个文件Base64Transcoder.h。解决办法是将我们项目中Base64Transcoder.h & .m文件删除,将Dropbox中的DBBase64Transcoder.h & .m文件改名为Base64Transcoder.h & 阅读全文
posted @ 2013-02-25 19:42 wsjisji 阅读(2156) 评论(0) 推荐(0)