UI 基础单选题库一、选择题(每题 4 分) 1. 下面哪个不是按钮(Button) 的状态? A. normal B. highlighted C. disabled D. touchInside 参考答案: D 2. 下面哪一个是其中三个类的父类? A. UIButton B. UILabel C. UIView D. UIImageView 参考答案: C 3. 下面哪一个不是确定控件位置的属性? A. frame B. CGRect C. bounds D. center 参考答案: B 英寸 Retina 屏幕的设备上, 一个点是一个() 的格子? 像素*2 像素 像素*1 像素 像素*2 像素 像素*1 像素参考答案: C 5. 所有可以触发操作方法的 iOS 控件都是( )的子类。 A. UIView B. UIControl C. NSResponder D. UIResponder 参考答案: B UIKit 中, frame 与 bounds 的区别是? A. frame 是 bounds 的别名 B. frame 是 bounds 的继承类 C. frame 的参考系是父视图坐标, bounds 的参考系是自身的坐标 D. frame 的参考系是自身坐标, bounds 的参考系是父视图的坐标参考答案: C 和 UIImageView 的说法正确的是? A. 默认都能显示图片 B. 默认都能显示文字 C. 默认都能响应事件 D. 以上说法都是正确的参考答案: A 8. 如果 UIScrollView 无法滚动,以下原因哪个是不正确的? A. 没有取消 autolayout 功能 B. 没有接收到触摸事件:userInteractionEnabled = NO C. scrollEnabled = YES D. 没有设置 contentSize 参考答案: C 9. 下面那个不是 UITableView 数据源方法? A.- (NSInteger)numberOfSectionsInTableView:(UITableView*)tableV iew; B.- (CGFloat)tableView:(UITableView*)tableView heightForRowAtIndexPath:(NSIndexPath*)indexPath; C. -(UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath; D.- (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section; 参考答案: B 10. 关于字典转模型不正确的是? A. 字典转模型的后, 性能会大大提升 B. 防止因为字典的 Key 写错导致加载数据出错 C. 模型的属性写错编译器会直接报错 D. 使用模型访问属性,编译器会给相应的提示,提高开发效率。参考答案: A 11. 关于 instancetype 和 id 描述不正确的是? A. instan
UI基础考试题(带答案) 来自淘豆网www.taodocs.com转载请标明出处.