+ (UIImage *)createImageWithColor:(UIColor *)color
{
CGRect rect = CGRectMake(0.0f,
0.0f, 1.0f,
1.0f);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context =
UIGraphics...
分类:
其他好文 时间:
2014-12-08 19:40:57
阅读次数:
152
- (UIImage *) createImageWithColor: (UIColor *) color{CGRect rect = CGRectMake(0.0f,0.0f,1.0f,1.0f); UIGraphicsBeginImageContext(rect.size); CGConte.....
分类:
移动开发 时间:
2014-12-08 12:03:50
阅读次数:
145
A.内存管理 NSString: copy 基本数据类型、结构体(int, CGFloat, BOOL, CGRect等):assign 对象(如自定义model类型、NSArray、NSDictionary):strong 控件:weak
分类:
移动开发 时间:
2014-12-06 01:25:52
阅读次数:
165
/* NSRange 范围(location length) NSPoint\CGPoint 点 NSSize\CGSize ui元素的宽高 NSRect\CGRect*//* NSString 不可变字符串 ->NSMutableStri...
分类:
其他好文 时间:
2014-12-05 10:44:16
阅读次数:
118
1.动画(头部-开始动画)[UIView beginAnimations:nil context:nil];2.设置动画的执行时间[UIView setAnimationDuration:1.0];3.向上移动// CGPoint tempCenter = _btn.center;CGRect te...
分类:
其他好文 时间:
2014-12-05 10:24:44
阅读次数:
189
@interface UIView : UIResponder/*** 通过一个frame来初始化一个UI控件*/- (id)initWithFrame:(CGRect)frame;// YES:能够跟用户进行交互@property(nonatomic,getter=isUserInteractio...
分类:
其他好文 时间:
2014-12-04 19:44:54
阅读次数:
147
- (void)application:(UIApplication *)application didChangeStatusBarFrame:(CGRect)oldStatusBarFrame{ float height = application.statusBarFrame.siz...
分类:
移动开发 时间:
2014-12-04 11:29:35
阅读次数:
145
//震动效果- (void)shake:(UIView *)view{ CGRect frame = view.frame; CAKeyframeAnimation *shakeAnimation = [CAKeyframeAnimation animationWithKeyPath:@...
分类:
其他好文 时间:
2014-11-27 21:54:26
阅读次数:
201
CGRect frame = [[UIScreen mainScreen] applicationFrame];//获取窗口大小 UIView *theView = [[UIView alloc] initWithFrame:frame];//实例一个UIView theView.backgr...
分类:
其他好文 时间:
2014-11-27 21:53:44
阅读次数:
115
1、得到当前屏幕的尺寸:
CGRect rect_screen = [[UIScreenmainScreen]bounds];
CGSize size_screen = rect_screen.size;
2、获得scale:
CGFloat scale_screen = [UIScreen mainScreen].scale;
...
分类:
移动开发 时间:
2014-11-27 10:43:56
阅读次数:
175