一组外企iOS开发的笔试题,您能回答出来吗?从群里收集来的。

(miki西游@mikixiyou的文档,原文链接: http://mikixiyou.iteye.com/blog/1546376  转载请注明出处和作者)

1 why can't NSArray contain NSInteger Instance? with which extra step can you do it?
2.complete this code so that it becomes syntacticallty correct using no more than one additional word and  square branckets NsInteger myNumber=@"10000";

这个我会回答是:

NSInteger myInt = [myString intValue];

3.What does the following code do? Variable age is defined as NSInteger It compiles fine..but why does it crash? UILabel *mylabel=[UILabel new]; mylabel.text=age?[NSString stringWithFormat:@"%@",age];@"";

这个我的回答是:定义一个UITable对象,根据age的true或者false来给该对象的text属性赋值。难道是bool转换成string时导致的crash?
4.Why does the following code crash as soon as the property is set?What is the simple fix? MeasueStripView.h @Interface MeasueLinealView:UIview { NSUIInteger minvalue;
} @property (nonatomic,assign)NSUIInteger minvalue;
MeasueStripView.m #import "MeasueStripView.h" @implementation MeasueStripView @synthsize minvalue #progma mark Passthrough properties -(void) setMinValue:(NSUIInteger)aVal {
self.minvalue:aVal; } Some other file: MeasueStripView *myMS=[MeasueStripView ww]; myMS.minValue=100;//THis Line crashes..
5.You have a UIView and would like to for it to have rounded corners, What's the Fastest way to achive that|
6 How many methods do you know of performing a piece of code in other thread on IOS4.0 and later version.

关于多线程的问题,只能去翻apple的文档了。

我查到的方法是: 1、detachNewThreadSelector或performSelectorInBackground 2、NSThread 3、NSOperationQueue

外企iOS开发的笔试题的更多相关文章

  1. QQ群里收集的外企iOS开发的笔试题

    一组外企iOS开发的笔试题,您能回答出来吗?从群里收集来的. 1 why can't NSArray contain NSInteger Instance? with which extra step ...

  2. iOS开发工程师笔试题

    iOS开发工程师笔试题 1.   Object-c的类可以多重继承么?可以实现多个接口么?Category是什么?重写一个类的方式用继承好还是分类好?为什么? Object-c的类不可以多重继承:可以 ...

  3. 复盘鼎甲科技2020web开发工程师-笔试题(校招)

    复盘鼎甲科技2020web开发工程师-笔试题(校招) 本试卷以W3C规范为准,JavaScript使用ES5标准,除特别说明外,不考虑各个浏览器之间差异. 一.多项选择题 以下标签是行内元素(inli ...

  4. 100个iOS开发/设计面试题汇总

    常见问题 你昨天/这周学习了什么? 你为什么热衷于软件开发? 你对哪一种控制系统比较熟悉? 是否参与过GitHub项目? 是否参与过GitHub或其他同类型网站的iOS开源项目? 请描述一下你的iOS ...

  5. 100个iOS开发/设计面试题汇总,你将如何作答?

    原文: http://www.csdn.net/article/2015-01-19/2823604-ios-interview-questions 常见问题 你昨天/这周学习了什么? 你为什么热衷于 ...

  6. iOS开发工程师面试题(二)

    1.手写冒泡跟插入排序 冒泡排序来源于生活常识,相当于把数组竖起来,轻的向上,重的向下.void bubbleSort(int[] unsorted) { ; i < unsorted.Leng ...

  7. iOS开发工程师面试题(一)

    SDWEBImge原理 一,先上标答 1)UIImageView+WebCache:  setImageWithURL:placeholderImage:options: 先显示 placeholde ...

  8. 牛客网试卷: 京东2019校招笔试Java开发工程师笔试题(1-)

    1.在软件开发过程中,我们可以采用不同的过程模型,下列有关 增量模型描述正确的是() A 是一种线性开发模型,具有不可回溯性 B 把待开发的软件系统模块化,将每个模块作为一个增量组件,从而分批次地分析 ...

  9. 【web后端开发】笔试题收集

    4399Web后端开发笔试题 题目来源:牛客网 1.linux中,用mkdir命令创建新的目录时,如果需要在其父目录不存在时先创建父目录的选项是   D A  -h B -d C  -f D -p [ ...

随机推荐

  1. java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext

    ***************************错误提示************************************************ SEVERE: A child cont ...

  2. MYSQL关于表的一些操作

    mysqldump -u username -p dbname > dbname.sql 清空表数据 delete from xxxx; 插入一条数据 insert into tablename ...

  3. Event Handling in Spring

    Spring内置的event有 1.ContextRefreshedEvent This event is published when the ApplicationContext is eithe ...

  4. 反射调用与Lambda表达式调用

    想调用一个方法很容易,直接代码调用就行,这人人都会.其次呢,还可以使用反射.不过通过反射调用的性能会远远低于直接调用——至少从绝对时间上来看的确是这样.虽然这是个众所周知的现象,我们还是来写个程序来验 ...

  5. 【转】使用SharpZipLib实现zip压缩

    使用国外开源加压解压库ICSharpCode.SharpZipLib实现加压,该库的官方网站为 http://www.icsharpcode.net/OpenSource/SharpZipLib/Do ...

  6. ASP.NET MVC 教程

    http://msdn.microsoft.com/zh-cn/dd327597.aspx

  7. Ajax中get提交和post提交的区别

    $.post("HandlerLiuYan.ashx", { leixing: leixing, danwei: danwei, liuyan: liuyan, name: nam ...

  8. FusionCharts 相关知识

    FusionCharts1.平均线: <trendLines><line startValue='{0}' toolText='平均线' color='#FF0000' displa ...

  9. ssh-key 与 git账户配置以及多账户配置

    http://www.cnblogs.com/dubaokun/p/3550870.html 在使用git的时候,git与远程服务器是一般通过ssh传输的(也支持ftp,https),我们在管理远程分 ...

  10. WCF之数据契约

    从抽象层面看,WCF能够托管CLR类型(接口和类)并将它们公开为服务,也能够以本地CLR接口和类的方式使用服务.然而,CLR类型却属于.NET的特定技术.由于面向服务的一个核心原则就是在跨越服务边界时 ...