iOS 笔试题03~[有答案]

//联系人:石虎  QQ: 1224614774 昵称:嗡嘛呢叭咪哄

1. When to use NSMutableArray andwhen to use NSArray? 

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

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

 

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

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

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

 

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

没有限制

 

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

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

 

5.When you willcreate an autorelease pool in your application?

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

 

6.When retaincount increase?

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

 

7.What are commonly used NSObject class methods?

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

8.What is convenienceconstructor?

NSStirngstringWithFormatNSNumbernumberWithInt

 

9. How to designuniversal 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>  属性列表

2>  Preference(NSUserDefaults)

3>  键值归档(NSKeyedArchiver、NSCoding)

4>  SQLite数据库

5>  Core Data

 

13. What is NSManagedObject model?

NSManagedObject是Core Data中的实体对象

 

14. What is predicate?

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值