摘要: 1。 所以我就把它 作为一个section的 headerView。 也就是在函数: - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 里面返回 这个UIView。 然则,因为这个UIView占的空间很大,根蒂根基占用全部屏幕的高度,而迁移转变tableView的时辰,只迁移转变cell的内容,而这个section的headerView却不跟着迁移转变。 后面,我想出了办法2。 2。 设置 tableView的 style为 ... 阅读全文
posted @ 2013-01-07 17:04 郑文亮 阅读(2721) 评论(0) 推荐(0)
摘要: contentSize是scrollview可以滚动的区域,比如frame = (0 ,0 ,320 ,480) contentSize = (320 ,960),代表你的scrollview可以上下滚动,滚动区域为frame大小的两倍。contentOffset是scrollview当前显示区域顶点相对于frame顶点的偏移量,比如上个例子你拉到最下面,contentoffset就是(0 ,480),也就是y偏移了480contentInset是scrollview的contentview的顶点相对于scrollview的位置,例如你的contentInset = (0 ,100),那么你的 阅读全文
posted @ 2013-01-07 16:41 郑文亮 阅读(407) 评论(0) 推荐(0)
摘要: xcode4.2推荐使用storyboard,但网上资料太少,书上讲的也都是基于xib的花了2天时间,终于把xib的helloWorld写出来了。注意,类名一定要大写,为了这个东西,我搞了2天,在配viewContorller时一直抛错。新建 Empty Application添加一个object,添加一个View Controller,添加一个window,把File's Owner的 custom class 改成 UIApplication把Object的custom class 改成 自己的 delegate,我的是HelloAppDelegate然后新建 Cocoa Touc 阅读全文
posted @ 2013-01-07 11:10 郑文亮 阅读(304) 评论(0) 推荐(0)