UIButton *b1=[[UIButton alloc]initWithFrame:CGRectMake(200, 200, 40, 20)]; b1.backgroundColor=[UIColor redColor]; view1=[[UIView alloc]initWithFrame.....
分类:
其他好文 时间:
2014-10-10 00:13:57
阅读次数:
266
iOS开发UI篇—九宫格坐标计算一、要求完成下面的布局二、分析寻找左边的规律,每一个uiview的x坐标和y坐标。三、实现思路(1)明确每一块用得是什么view(2)明确每个view之间的父子关系,每个视图都只有一个父视图,拥有很多的子视图。(3)可以先尝试逐个的添加格子,最后考虑使用for循环,完...
分类:
移动开发 时间:
2014-10-09 17:08:48
阅读次数:
279
应该来说CALayer是一个比较底层的类,每一个UIView里面封装有一个UILayer的属性(其实我们点击UIView进去也可以看见这个属性)。在使用前需要导入QuartzCore框架,然后再需要设置CALayer的地方引用头文件QuartzCore.h。
一.简单UIView处理
接下来就介绍下它常用的几个地方:
1)圆角:
2)边框:
3)阴影:
...
分类:
其他好文 时间:
2014-10-09 16:59:48
阅读次数:
175
IOS中的AppDelegate.m/h文件是很重要的呢,因为它是对Application的整个生命周期进行管理的。先明白,每个iPhone应用程序都有一个UIApplication,UIApplication是iPhone应用程序的开始并且负责初始化并显示UIWindow,并负责加载应用程序的第一个UIView到UIWindow窗体中。UIAppl..
分类:
移动开发 时间:
2014-10-09 02:22:18
阅读次数:
212
[objc]view plaincopyprint?转载学习-(void)drawLayer:(CALayer*)layerinContext:(CGContextRef)ctx{CGFloatwidth=10.0f;//drawathickredcircleCGContextSetLineWidt...
分类:
移动开发 时间:
2014-10-09 01:36:07
阅读次数:
325
大致思路使用两层辅助UIView的旋转来实现添加后的View的横向翻页效果 CATransform3D transformA = CATransform3DRotate(CATransform3DIdentity, degreesToRadian(90), 0, 0, 1.0f); CATrans....
分类:
移动开发 时间:
2014-10-08 12:41:25
阅读次数:
180
今天写了如下的一段代码:
for (NSInteger i =
0; i 10000000; i++) {
UIView * v = [[UIView
alloc] init];
[v release];
}
NSLog(@"好了!");
并且观测了内存,发现“好了”这个词打印出来之前,内存一直处于疯长阶段,在“好了”打印出来之后,内存...
分类:
其他好文 时间:
2014-10-07 13:33:33
阅读次数:
105
Chapter 27 Controlling Animations1. The simplest block-based animation method on UIView is animateWithDuration:animations:. This method takes in the d...
分类:
其他好文 时间:
2014-10-06 16:23:10
阅读次数:
185
UI 常用方法总结之--- UIWindow UIView (不断更新中)...
@interface UIView : UIResponder/*** 通过一个frame来初始化一个UI控件*/- (id)initWithFrame:(CGRect)frame;// YES:能够跟用户进行交互@property(nonatomic,getter=isUserInteractio...
分类:
其他好文 时间:
2014-10-03 04:10:03
阅读次数:
260