一组外企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. React Native(ios)项目中logo,启动屏设置

    由于logo和启动屏尺寸多,react native(ios)中没有命令可以自动生成各种的尺寸,所以可以使用以下办法:在ionic项目中生成(使用命令:ionic resources)后,再粘贴到re ...

  2. BZOJ 1146: [CTSC2008]网络管理Network 树链剖分+线段树+平衡树

    1146: [CTSC2008]网络管理Network Time Limit: 50 Sec  Memory Limit: 162 MBSubmit: 870  Solved: 299[Submit] ...

  3. 从模态视图push到另一个视图

    //需要给模态视图创建一个Nav,然后再调用presentViewController if (_loginVC == nil) { _loginVC = [[LoginViewController ...

  4. Unity3d之动态连接Mesh Renderer和Collider

    using UnityEngine; using System.Collections; public class dynaMesh : MonoBehaviour {     public Skin ...

  5. JS 操作JSON字符串

    用Js的eval解析JSON中的注意点 在JS中将JSON的字符串解析成JSON数据格式,一般有两种方式: 1.一种为使用eval()函数. 2. 使用Function对象来进行返回解析. 使用eva ...

  6. Mac下kernel_task占用大量CPU怎么办?

    我们都知道要想让电脑运行的快速,那么就要尽量的保持内存和CPU的充足.不过一些MAC用户发现MAC系统中的Kernel_task会占用大量的CPU,导致电脑发热变卡.这个问题该怎么解决呢? 具体操作步 ...

  7. C#自定义时间显示格式

    string time = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); 下面是常见的一些日期时间显示格式 标准的For ...

  8. ef codeFirst 修改表结构 增加字段等 EF code first需要重新生成库导致数据丢失的问题.

    需要在库程序包管理器里依次执行以下命令: 1.启用迁移功能:Enable-Migrations -ContextTypeName MvcMovie.Models.MovieDbContext 2.建立 ...

  9. java中vector与hashtable操作详解

    众所周知,java中vector与hashtable是线程安全的,主要是java对两者的操作都加上了synchronized,也就是上锁了.因此 在vector与hashtable的操作是不会出现问题 ...

  10. Iframe跨域_ASP.NET

    1.描述: A系统 需要 调用 B系统的页面,被调用的B系统的页面b.html内部嵌套了iframe框架c.aspx地址页 2.问题呈现: ie浏览器下 Chrome浏览器下 追踪 3.问题原因: X ...