iOS开发基础知识--碎片18 1:initWithFrame方法的理解 1. initWithFrame方法是什么? initWithFrame方法用来初始化并返回一个新的视图对象,根据指定的CGRect(尺寸)。 当然,其他UI对象,也有initWithFrame方法,但是,我们以UIView为 ...
分类:
移动开发 时间:
2016-08-22 16:13:03
阅读次数:
213
问题描述 因为项目需要,需要UITableView上添加固定的筛选表头,一直固定,不能随UITableView滚动。所以直接将表头与UITableView分离,将它添加到控制器的UIView上,即添加到UITableView的父视图上,与UITableView同级。然后表头上添加三个UIButton ...
分类:
移动开发 时间:
2016-08-22 07:07:20
阅读次数:
1853
//显示有多少组 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView //显示每组的头部 -(UIView*)tableView:(UITableView *)tableView viewForHeaderInSecti ...
分类:
移动开发 时间:
2016-08-20 13:15:18
阅读次数:
241
UIView : UIResponder<nscoding, uidynamicitem="" uiappearancecontainer,="" uiappearance,=""> /** * 通过一个frame来初始化一个UI控件 */ - (id)initWithFrame:(CGRect)f ...
分类:
其他好文 时间:
2016-08-19 19:03:57
阅读次数:
151
在对UIView以及其子类空间的布局方案有多种,今天温习了一下autoresizing布局 一、了解一下相关知识: 1、UIView其中一个属性为 @property(nonatomic) UIViewAutoresizing autoresizingMask; // simple resize. ...
分类:
移动开发 时间:
2016-08-19 18:46:33
阅读次数:
373
1、界面上一个输入框,一个按钮,一个webview 。点按钮,webview显示输入框中输入的url的页面。 @IBOutlet var wv:UIWebView = nil //定义一个UIWebView @IBOutlet var btnGo: UIView = nil //定义一个按钮 @IB ...
分类:
编程语言 时间:
2016-08-18 06:25:41
阅读次数:
171
CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; animation.duration = 1; NSMutableArray *values = [NSMutableA ...
分类:
其他好文 时间:
2016-08-17 15:37:12
阅读次数:
174
有时候因为项目的需要,给tableView添加一些动画: cell.layer.transform = CATransform3DMakeScale(0.1, 0.1, 1); [UIView animateWithDuration:0.25 animations:^{ cell.layer.tra ...
分类:
其他好文 时间:
2016-08-17 15:27:43
阅读次数:
154
1、UIApplication 是 iPhone 应用程序的开始并且负责初始化并显示 UIWindow,并负责加载应用程序的第一个 UIView 到 UIWindow 窗体中。 UIApplication 的另一个任务是帮助管理应用程序的生命周期,而 UIApplication 通过一个名字为 UI ...
分类:
移动开发 时间:
2016-08-17 01:25:32
阅读次数:
251