摘要: 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 阅读(439) 评论(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 阅读(794) 评论(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 阅读(1188) 评论(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 阅读(9683) 评论(0) 推荐(0) 编辑
摘要: def main(): arr= (5,2,1,83,491,3,45,21,56,235,61,36,13,4,643,123,64) list = [] for node in arr: end = len(list) start = 0 medium = end // 2 if 0 != end: while True: if node > list[medium]: start = medium + 1; ... 阅读全文
posted @ 2013-03-26 19:45 wsjisji 阅读(912) 评论(0) 推荐(0) 编辑
摘要: 同时使用AND和OR运算符的SQL语句Sample如下:SELECT * FROM Persons WHERE (FirstName='Thomas' OR FirstName='William')AND LastName='Carter'; 阅读全文
posted @ 2013-03-14 15:33 wsjisji 阅读(350) 评论(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 阅读(2151) 评论(0) 推荐(0) 编辑
摘要: 通知MediaStore扫描某个文件: private void scanSingleFile(String filePath) { if (filePath == null) { return; }// broadcast to scan file boolean bmnt = Environment.getExternalStorageDirectory().getPath() .startsWith("/mnt"); bmnt = mDownloadDestination ... 阅读全文
posted @ 2012-10-24 18:04 wsjisji 阅读(5662) 评论(0) 推荐(0) 编辑
摘要: 转自:http://fonter.iteye.com/blog/474526Canvas 作为绘制文本时,使用FontMetrics对象,计算位置的坐标。它的思路和java.awt.FontMetrics的基本相同。FontMetrics对象它以四个基本坐标为基准,分别为:・FontMetrics.top・FontMetrics.ascent・FontMetrics.descent・FontMetrics.bottom该图片将如下Java代码PainttextPaint=newPaint(Paint.ANTI_ALIAS_FLAG);textPaint.setTextSize(35);text 阅读全文
posted @ 2012-06-17 20:16 wsjisji 阅读(246) 评论(0) 推荐(0) 编辑
摘要: @Override protected void onDraw(Canvas canvas) { Paint paint = new Paint(); paint.setTextSize(50); paint.setAntiAlias(true); paint.setColor(Color.WHITE); Path path = new Path(); path.addCircle(200, 200, 100, Direction.CCW); canvas.drawTextOnPath("d... 阅读全文
posted @ 2012-06-13 16:37 wsjisji 阅读(321) 评论(0) 推荐(0) 编辑