• 蓝鸥 UI 考试 绝密


    /*


    选择题(共25题,每题3分)

    1、关于ViewController allocloadView, viewDidLoad,viewWillAppear的调用,说法错误的是:

    答案:(C

    Aalloc在初始化当前的ViewController时调用

    B、没有正在使用nib视图页面,子类将会创建自己的自定义视图层时调用loadView

    C、视图将要加载完毕时,viewDidLoad被调用

    D、视图即将出现的时候调用viewWillAppear

    2、下面对UIViewUIWindowCALayer理解错误的是:

    答案:(C

    AUIView继承于UIResponder

    BUIResponder继承于NSObject,UIView可以响应用户事件。

    CUIResponder继承与NSObject,CALayer继承于NSObjectCALayer可以响应事件。

    DUIView是用来显示内容的,可以处理用户事件,CALayer是用来绘制内容的,依赖与UIView来进行显示

    3、以下对于UIScrollView的属性,说法错误的是:

    答案:(D

    Abounces 控制控件遇到边框是否反弹

    BpagingEnabled 控制控件是否整页翻动

    CscrollEnabled 控制控件是否能滚动

    DcontentInset 滚动范围大小

    4、以下的代码会出现什么问题:

    @implementation Person

    - (void)setAge:(int)newAge {

        self.age = newAge;

    }

    @end

    答案:(B

    A、会造成循环引用

    B、会造成死循环

    C、会出现内存泄露

    D、会出现野指针

    5、以下不属于iOS本地数据存储的方式是:

    答案:(D

    ANSUserDefaults

    BWrite写入方式

    CSQLite数据库

    DBLOCK方式

    6、以下关于视图的framebounds的理解错误的是:

    答案:(A

    Abounds是指这个viewwindow坐标系的坐标和大小

    Bframe指的是这个view在它superview的坐标系的坐标和大小

    CframeboundsUIView中的两个属性(property)

    D、一个是以自身左上角的店为原点的坐标系,一个是以屏幕左上角的点为原点的坐标系。

    7、很多内置类如UITableViewControllerdelegate属性都是assign而不是retain,这是为了:

    答案:(D

    A、防止造成内存泄露

    B、防止出现野指针

    C、防止出现过度释放

    D、防止循环引用

    8、获取tableview正在window上显示的cellindexPath方法是:

    答案:(B

    A- (UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *)indexPath;

    B- (NSArray *)indexPathsForVisibleRows;

    C- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;

    D- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath;

    9、以下哪个方法在当程序将要退出时被调用,且通常在此方法里写一些用来保存数据和一些退出前的清理工作。

    答案:(B

    A- (void)applicationExitsOnSuspend:(UIApplication *)application{ }

    B- (void)applicationDidEnterBackground:(UIApplication *)application{ }

    C- (void)applicationWillTerminate:(UIApplication *)application{ }

    D- (void)applicationDidFinishLaunching:(UIApplication *)application{ }

    10、对于UIScrollViewController,监控目前滚动的位置的属性是:

    答案:(A

    AcontentOffSet

    BcontentSize

    CcontentInset

    DscrollIndicatorInsets

    11、在MVC框架中,MC通讯,通常使用什么方式?

    答案:(A

    AKVO与通知

    B、协议-代理

    C、类目

    D、属性

    12、当应用程序将要进入非活动状态执行,在此期间,应用程序不接收消息或事件,比如来电话了,此时会先执行以下哪个方法:

    答案:(D

    A- (void)applicationDidBecomeActive:(UIApplication *)application{ }

    B- (void)applicationDidEnterBackground:(UIApplication *)application{ }

    C- (void)applicationWillTerminate:(UIApplication *)application{ }

    D- (void)applicationWillResignActive:(UIApplication *)application{ }

    13、关于系统自带的UITableViewCell,以下说法正确的是:

    答案:(D

    ACell基本组成:编辑、内容、辅助

    B、编辑:editViewtableView被编辑时显示

    C、内容:contentView。包含imageViewtextField

    DaccessoryView。显示cell的辅助信息

    14、实现一个生成Student实例对象的便利构造器的正确写法是:

    答案:(A

    A

    + (id)studentWithName:(NSString *)newName andAge:(int)newAge

    {

        Student *stu = [[[Student alloc] initWithName:newName andAge:newAge] autorelease];

        return stu;

    }

    B

    - (id)studentWithName:(NSString *)newName andAge:(int)newAge

    {

        Student *stu = [[Student alloc] initWithName:newName andAge:newAge];

        return [stu autorelease];

    }

    C

    - (void)studentWithName:(NSString *)newName andAge:(int)newAge

    {

        Student *stu = [[Student alloc] initWithName:newName andAge:newAge];

        return [stu autorelease];

    }

    D

    + (void)studentWithName:(NSString *)newName andAge:(int)newAge

    {

        Student *stu = [[Student alloc] initWithName:newName andAge:newAge];

        return [stu autorelease];

    }

    15UITableView重用机制中,会将重用的cell放到哪种类型的集合中。

    答案:(B

    ANSMutableArray

    BNSMutableSet

    CNSDictionary

    DNSMutableDictionary

    16、下面关于深拷贝与浅拷贝理解正确的是:

    答案:(A

    A、深拷贝拷贝的是内容,浅拷贝拷贝的是指针。

    B、深拷贝和浅拷贝最大的区别就是子类对象的地址是否改变。

    C、深拷贝是对对象本身复制,但是不对对象的属性进行复制。

    D、如果子类对象的地址改变那么就是深拷贝。

    17、当程序从后台将要重新回到前台的时候,会先执行以下哪个方法:

    答案:(B

    A- (void)applicationDidFinishLaunching:(UIApplication*)application{ }

    B- (void)applicationWillEnterForeground:(UIApplication *)application{ }

    C- (void)applicationDidBecomeActive:(UIApplication *)application{ }

    D - (void)applicationWillTerminate:(UIApplication *)application{ }

    18、对于UIScrollViewControllerscrollView将开始降速时,执行的方法是:

    答案:(D

    A- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView;{ }

    B- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView;{ }

    C- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView;{ }

    D- (void)scrollViewWillBeginDecelerating:

    19、对于UISearchBar,要实现实时搜索(即搜索内容实时发生变化时),会执行以下哪个方法:

    答案:(C

    A- (void)searchBarTextDidEndEditing:(UISearchBar *)searchBar;

    B- (BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar;

    C- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText{ }

    D- (void)searchBarResultsListButtonClicked:(UISearchBar *)searchBar{ }

    20、应用程序启动顺序正确的是:

    ①在UIApplication代理实例中重写启动方法,设置第一个ViewController

    ②程序入口main函数创建UIApplication实例和UIApplication代理实例

    ③在第一个ViewController中添加控件,实现对应的程序界面。

    答案:(B

    A、①②③

    B、②①③

    C、①③②

    D、③①②

    21、对于UILabel,设置单词折行方式的属性是:

    答案:(B

    AtextAlignment

    BlineBreakMode

    CnumberOfLines

    DsizeToFit

    22、以下对响应链说法错误的是:

    答案:(A

    A、当事件发生的时候,响应链首先被发送给第一个响应者

    B、事件将沿着响应者链一直向下传递,直到被接受并作出处理

    C、如果整个过程都没有响应这个事件,则该事件最终要由APP Delegate做出处理

    D、一般情况下,在响应链中只要有对象处理事件,事件就会被传递

    23、以下关于导航栏外观属性对应的解释错误的是:

    答案:(D

    AbarStyle bar的样式

    Btranslucent bar的透明度

    CbackgroundImage bar的背景图片

    DbarTintColor bar上控件的颜色

    24、对于UISegmentedControl,实现在指定索引插入一个选项并设置图片的方法是:

    答案:(B

    A[segmentedControl setImage:[UIImage imageNamed:@"btn_jyy.png"] forSegmentAtIndex:3];

    B[segmentedControl insertSegmentWithImage:[UIImage imageNamed:@"mei.png"] atIndex:2 animated:NO];

    C[segmentedControl insertSegmentWithTitle:@"insert" atIndex:3 animated:NO];

    D[[UIImageViewalloc]initWithImage:[segmentedControl imageForSegmentAtIndex:1]];

    25、以下哪个控件不是继承于UIControl

    答案:(D

    AUIButton

    BUITextField

    CUISlider

    DUITextView

    判断题(共5题,每题5分)

    1UISliderUISwitchUITextField这些类都继承于UIControl这个类。

    答案:(T

    正确

    错误

    2[segmentedControl titleForSegmentAtIndex: ]表示指定索引文字的选项。

    答案:(T

    正确

    错误

    3numberOfTapsRequired这个方法能获取到的是有几只手指点击。

    答案:(F

    正确

    错误

    4[textField resignFirstResponder]; 表示让文本输入框成为第一响应者, 弹出键盘进入编辑模式。

    答案:(F

    正确

    错误

    5[self.view popToViewController: animated: YES];表示弹出一个视图控制器,到指定视图控制器上。

    答案:(F

    正确

    错误

    [关闭]


    @end

     */


  • 相关阅读:
    万亿养老市场如何抢占商机?云巢智慧康养物联网加速器,三招化解ISV痛点!
    13个VSCode使用技巧,开启高效的开发模式
    添零占位 —— 快速生成N个0的六种办法
    使用 dumi 打包 React 组件库并生成文档站点
    Transformer架构记录(四)
    Transformer架构记录(三)
    Transformer架构记录(二)
    Transformer架构记录(一)
    NLP预训练发展小结二(Bert之后)
    p3c 插件,是怎么检查出你那屎山的代码?
  • 原文地址:https://www.cnblogs.com/yuhaojishuboke/p/5155877.html
Copyright © 2020-2023  润新知