- 博客(25)
- 资源 (29)
- 收藏
- 关注
转载 代码资源
搞了好久的ios开发,过程遇到各种各样的问题,基本都是靠百度+google,然后下载别人的开源代码来研究,下面列出一些常逛的ios开源代码网站,分享一下。cocoacontrols.com 收集了很多UI控件效果代码,缺点是需要翻墙,而且代码分类不够好。code4app.com,国内有个类似的,大部分代码来自github,但是做了中文翻译和效果截图,支持搜索,比较好用。缺点是代码还没有
2012-04-28 17:48:55 316
原创 imageView 添加手势失败原因
imageView = [[UIImageView alloc] initWithFrame:CGRectMake(8, 8, 200, 200)]; imageView.image = [UIImage imageNamed:@"d_citypick.png"]; imageView.userInteractionEnabled = YES; [self
2012-04-28 14:17:03 2807
原创 淡出效果
imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 1024, 768)]; imageView.image = [iBabyPubFunction ImageName:@"DefaultDay.png" IsPublic:NO Role:ROLE_UNKNOW]; image
2012-04-26 16:43:54 253
原创 缩放
//// PinchView.m// ViewDemo//// Created by wgd on 12-4-25.// Copyright 2012 __MyCompanyName__. All rights reserved.//#import "PinchView.h"#import @implementation PinchView
2012-04-25 17:16:47 390
转载 pbxuser
*.mode1v3*.pbxuser 这些文件,和项目代码没多大关系,和窗口布局,显示位置相关。 且包含断点信息转载自http://stackoverflow.com/questions/2373046/xcodeproj-filesup vote3down vote favorite share [g+] share
2012-04-24 17:41:46 958
转载 svn
SVN: How to resolve a conflict tutorialPosted by Charleson August 10, 2010 Leave a comment (4)Go to commentsThis tutorial is walkthough on how to resolve a conflict in svn (subversion)Firs
2012-04-24 16:54:03 939
转载 快速 打开模拟器文件夹 和去影藏
open /Users/wgd/Library/Application\ Support/iPhone\ Simulator/4.3/Applications 快速打开模拟器文件夹 open /Users/wgd/Library/Application\ Support/iPhone\ Simulator/4.3/Media/DCIM/10
2012-04-24 10:17:58 885
原创 CustomLable
#import @interface CustomerLable : UILabel { NSMutableAttributedString *mutaString;}@property (nonatomic,retain) NSMutableAttributedString *mutaString;- (NSAttributedString *)
2012-04-23 14:37:05 669
原创 UILable 库
https://github.com/AliSoftware/OHAttributedLabelUILabel是经常使用的一种控件,iOS上的UILabel已经能很好满足一些需求。比如设置对齐方式,换行模式等等。但如果需求是需要一串字符中不同的字符颜色,字体都单独设置,UILabel就无法满足了。那就自己来做个富文本Label好了。先创建继承UILabel的Attrib
2012-04-23 09:43:54 2588
原创 移动图片
-(void)chooseRect{ float newX=0,newY=0; CGRect newFrame; newX = sourceView.frame.origin.x + endPoint.x-beginPoint.x; newY = sourceView.frame.origin.y + endPoint.y-beginPoint.
2012-04-19 09:35:05 423
原创 截取 视图 部分 图片
/* * begin * 可以通过下边这段代码实现将myView中的图像抓取并保存成文件 */ UIGraphicsBeginImageContext(photoBackGround.frame.size); //@ 这里的myView可以换成其他的View,都可以得到这个View里的图像 CGContextRef cont
2012-04-19 08:37:26 303
原创 UIPinchGestureRecognizer
http://stackoverflow.com/questions/5647084/limit-maximum-scale-for-scaling-image-with-pinch-gesture-in-ios http://stackoverflow.com/questions/3406179/uipinchgesturerecognizer-zoom-out-zoom-in
2012-04-17 21:53:03 724
原创 图形api 函数解释
CGContextRef context = UIGraphicsGetCurrentContext(); // 获取图形环境CGContextSaveGState(context); //保存图形环境到堆栈CGContextTranslateCTM(context, 0, rect.size.height); //重新设置坐标点 原本点是 左下角(0,0)CGCont
2012-04-13 17:54:51 535
转载 截取视图 保存
CGRect rect = self.view.frame; UIGraphicsBeginImageContext(rect.size); CGContextRef context =UIGraphicsGetCurrentContext(); [self.view.layer renderInContext:context]; UIImage *img
2012-04-13 11:23:50 278
转载 往返小球
[UIViewbeginAnimations:@"movement"context:nil]; [UIViewsetAnimationCurve:UIViewAnimationCurveEaseIn]; //设置速度 [UIViewsetAnimationDuration:1.0f]; [UIViewsetAnimationRepeatCount:3];
2012-04-12 17:56:42 273
原创 自动调整 lable
-(void)drawGroupTip:(NSString *)groupName{ UILabel *frontTipLabel = [[UILabel alloc] initWithFrame:CGRectMake(60,44,100,20)]; frontTipLabel.text = @"你正在"; frontTipLabel.backg
2012-04-12 08:56:03 343
原创 URLRequest
//// Copyright 2012 __MyCompanyName__. All rights reserved.//#import @interface URLRequest : NSObject { id _delegate; SEL _action; NSString *_xml; NSMutableDat
2012-04-10 13:24:33 738
原创 checkView
#import @interface OptionCheckView : UIView { NSMutableArray *buttonArray; id _delegate;}@property (nonatomic,retain) NSMutableArray *buttonArray;@property (nonatomic,assign) id
2012-04-10 13:22:49 532
原创 获取今天星期几 ,一年的多少周
NSCalendar *calendar = [NSCalendar currentCalendar]; NSInteger unitFlags = NSWeekCalendarUnit|NSWeekdayCalendarUnit; NSDateComponents *comps = [calendar components:unitFlags from
2012-04-06 13:54:47 6453
转载 oauth_verifier 的获取
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
2012-04-05 09:36:38 841
原创 CFURLCreateStringByAddingPercentEscapes
@implementation NSString (URLEncoding)-(NSString *)URLEncodedString{ NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
2012-04-01 17:35:23 1131
转载 数组排序
static NSInteger sortParameter(NSString *key1,NSString *key2,void *context){ NSComparisonResult result = [key1 compare:key2]; if(NSOrderedSame == result) { NSDictionary *dic
2012-04-01 16:15:21 234
TMGBusUpdConfCallBohr121604final
2008-08-27
AT&T汇编语言与GCC内嵌汇编简介
2008-08-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人