IOS中的AppDelegate.m/h文件是很重要的呢,因为它是对Application的整个生命周期进行管理的。先明白,每个iPhone应用程序都有一个UIApplication,UIApplication是iPhone应用程序的开始并且负责初始化并显示UIWindow,并负责加载应用程序的第一个UIView到UIWindow窗体中。UIAppl..
分类:
移动开发 时间:
2014-10-09 02:22:18
阅读次数:
212
大致思路使用两层辅助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
//通过XIB的方式创建视图对象 NSBundle *bundle = [NSBundle mainBundle]; NSArray *array = [bundle loadNibNamed:@"View" owner:self options:nil]; UIView ...
分类:
移动开发 时间:
2014-10-01 23:47:11
阅读次数:
514
- (UIViewController*)viewController{ for (UIView* next = [self superview]; next; next = next.superview) { UIResponder* nextResponder = [next...
分类:
其他好文 时间:
2014-09-30 21:36:20
阅读次数:
154
直接先说原理吧--原理:利用了scrollview的回调函数(如下)以及scrollview自己内部的一些缩放规则(其实我也还没弄清楚具体scrollview干了什么事),只是知道了它可以怎么做-_-#- (UIView *)viewForZoomingInScrollView:(UIScrollV...
分类:
其他好文 时间:
2014-09-30 19:49:50
阅读次数:
186
由于一个项目中有大量的UITableViewCell需要书写,样式差不多都是 文字介绍:显示内容 这样的。自己又懒得写UITableViewCell类嫌没必要;在方法tableView:cellForRowAtIndexPath中手写又繁琐。就封装变化写了一个UIView类。
构思:首先由于文字介绍和显示内容的宽度固定,然后Cell的一行(Cell可以包括多行)高度就是文字介绍和显示内容所需要的高度两者相比高一些的。下一行就是高度累加重复;Cell的最上端和最下端给个宽度;最下端再画个间隔。...
分类:
移动开发 时间:
2014-09-30 17:38:49
阅读次数:
272