iOS笔试题03

1. When to use NSMutableArray and when to use NSArray?

1> 当数组元素需要动态地添加或者删除时,用NSMutableArray

2> 当数组元素固定不变时,用NSArray

2. Give us example of what are delegate methods and what are data source methods of uitableview.

1> 代理方法:返回tableView每行的高度、监听tableView每行的选中

2> 数据源方法:返回tableView数据的组数和行数、每行显示什么数据

3. How many autoreleasepool you can create in your application? Is there any limit?

没有限制

4. If we don’t create any autorelease pool in our application then is there any autorelease pool already provided to us?

系统会默认会不定时地创建和销毁自动释放池

5. When you will create an autorelease pool in your application?

当不需要精确地控制对象的释放时间时,可以手动创建自动释放池

6. When retain count increase?

当做一次retain或者copy操作,都有可能增加计数器

7. What are commonly used NSObject class methods?

NSObject常见的类方法有:alloc、new、description等

8. What is convenience constructor?便利构造函数?

像NSStirng的stringWithFormat,NSNumber的numberWithInt

9. How to design universal application in Xcode?

1> 创建项目时,Device选择Universal

2> 可以创建一套痛用的数据模型

3> 根据iPhone\iPad选择不同的控制器(iPad可能用UISplitViewController)

4> 根据iPhone\iPad选择不同的界面

10. What is keyword atomic in Objective C?

1> atomic是原子性

2> atomic会对set方法的实现进行加锁

11. What are UIView animations?

UIView封装的核心动画可以通过类方法\block实现

(首尾式动画和块动画)

12. How can you store data in iPhone applications?

1> plist属性列表(NSArray/NSDictionary)

2> Preference(NSUserDefaults,偏好设置)一般不用

3> 键值归档(NSKeyedArchiver、NSCoding)

4> SQLite3数据库

5> Core Data

13. What is NSManagedObject model?

NSManagedObject是Core Data中的实体对象

14. What is predicate?

谓词:可以以一定条件来过滤数组、字典等集合数据,也能用在Core Data的数据查询中

时间: 2024-08-05 19:37:45

iOS笔试题03的相关文章

iOS 笔试题-1

ios笔试题 有一篇面试题总结文章:http://www.onmoso.com/ios/356.html 原文地址:http://www.cnblogs.com/jiangshiyong/archive/2012/08/27/2657862.html 面试能力要求:精通iphone的UI开发,能熟练操作复杂表视图,熟练使用图层技术, 可以自定义UI控件,使用类别扩展系统控件功能; 擅长通讯技术,熟悉各种通信协议,精通xml, json, 二进制或其他形式的自定义解析,能架设服务器实现客户端与服务

ios笔试题收集(持续更新)

IOS开发笔试题目 一.OC语法部分: 1. NSObject 中description属性的意义,它可以重写吗 用法举例:定义一个Person类,声明两个成员变量 @interface Person : NSObject { NSString * name; int age; } 在类的实现中,init方法初始化成员变量 @implementation Person - (instancetype)init { self = [super init]; if (self) { name = @

iOS笔试题04

1. Object-C有多继承吗?没有的话用什么代替?? 1> OC是单继承,没有多继承 2> 有时可以用分类category和协议protocol来代替多继承 2. Object-C有私有方法吗?私有变量呢?? 1> OC没有类似@private的修饰词来修饰方法,只要写在.h文件中,就是公共方法 2> 可以使用类扩展(Extension)/继承来增加私有方法和私有变量 3. 关键字const什么含义? const int a; int const a; const int *a

iOS笔试题02

1. Difference between shallow copy and deep copy? 1> 浅拷贝:指针(地址)拷贝,不会产生新对象 2> 深拷贝:内容拷贝,会产生新对象 2. What is advantage of categories? What is difference between implementing a category and inheritance? 类别主要有3个作?:(1)将类的实现分散到多个不同?件或多个不同框架中.(2)创建对私有?法的前向引?.

iOS笔试题01

1. #import 跟#include.@class有什么区别?#import<> 跟 #import”"又什么区别? 1> #import和#include都能完整地包含某个文件的内容,#import能防止同一个文件被包含多次 2> @class仅仅是声明一个类名,并不会包含类的完整声明;@class还能解决循环包含的问题 3> #import <> 用来包含系统自带的文件,#import “”用来包含自定义的文件 2. 属性readwrite,re

iOS 笔试题

转:http://blog.sina.com.cn/s/blog_b0c5954101014upb.html 1.截取字符串”20|http://www.621life.com“ 中 ‘|’字符前面及后面的数据,分别输出它们 NSRange range = [responseString rangeOfString:@"|"]; int location = range.location; NSString *str1 = [responseString substringToInde

iOS开发工程师笔试题

iOS开发工程师笔试题 分类: IOS 面试题2013-01-17 10:28 820人阅读 评论(0) 收藏 举报 随着iOS平台开发的职位的增加,笔试.面试也越来越有“套路”,这里我总结了一些面试题,多数是Objective-C的基础知识,适合于面试新人,答案是我自己答的,不准确的地方,欢迎指出. 1.   Object-c的类可以多重继承么?可以实现多个接口么?Category是什么?重写一个类的方式用继承好还是分类好?为什么? Object-c的类不可以多重继承:可以实现多个接口,通过实

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

一组外企iOS开发的笔试题,您能回答出来吗?从群里收集来的. 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 [

外企iOS开发的笔试题

一组外企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