Objective-c 基本概念


1.Difference between shallow copy and deep copy?

2.What is advantage of categories? What is difference between implementing a category and inheritance?

3.Difference between categories and extensions?

4.Difference between protocol in objective c and interfaces in java?

5.What are KVO and KVC?

6.What is purpose of delegates?

7.What are mutable and immutable types in Objective C?

8.When we call objective c is runtime language what does it mean?

9.what is difference between NSNotification and protocol?

10.What is push notification?

11.Polymorphism?

12.Singleton?

13.What is responder chain?

14.Difference between frame and bounds?

15.Difference between method and selector?

16.Is there any garbage collection mechanism in Objective C.?

17.NSOperation queue?

18.What is lazy loading?

19.Can we use two tableview controllers on one viewcontroller?

20.Can we use one tableview with two different datasources? How you will achieve this?

21.What is advantage of using RESTful webservices?

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

23.What is the difference between REST and SOAP?

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

25.How many autorelease you can create in your application? Is there any limit?

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

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

28.When retain count increase?

29.Difference between copy and assign in objective c?

30.What are commonly used NSObject class methods?

31.What is convenience constructor?

32.How to design universal application in Xcode?

33.What is keyword atomic in Objective C?

34.What are UIView animations?

35.How can you store data in iPhone applications?

36.What is coredata?

37.What is NSManagedObject model?

38.What is NSManagedobjectContext?

39.What is predicate?

40.What kind of persistence store we can use with coredata?

转自http://blog.csdn.net/favormm/article/details/7049022, 我先去整理答案,过两天上来对答案。多谢各位的解答,让我们共同进步~
56 个回答

3

1 shallow copy 拷贝了对象的基本类型,不拷贝资源和对象中指针指向的堆上内存。

2 category 可以在不获悉,不改变原来代码的情况下往里面添加新的方法,只能添加,不能删除修改。 继承可以增加,修改或者删除方法,并且可以增加属性。

3 category和extensions的不同在于 后者可以添加属性。另外后者添加的方法是必须要实现的。extensions可以认为是一个私有的Category

4 OC中的代理有2层含义,官方定义为 formal和informal protocol。前者和Java接口一样。informal protocol中的方法属于设计模式考虑范畴,不是必须实现的,但是如果有实现,就会改变类的属性。

5 key-value code , key -value observer.

6 代理的目的是改变或传递控制链。允许一个类在某些特定时刻通知到其他类,而不需要获取到那些类的指针。可以减少框架复杂度

7 可修改不可修改的集合类。

8 多态。 主要是将数据类型的确定由编译时,推迟到了运行时。

9 协议有控制链(has-a)的关系,通知没有。

10 太简单,不做回答

11 多态,子类指针可以赋值给父类。

12 单例。

13 事件响应链。包括点击事件,画面刷新事件等。在视图栈内从上至下,或者从下之上传播。

14 frame是相对于父view的,bounds是自己的。

15 selector是一个方法的名字,method是一个组合体,包含了名字和实现

16 OC2.0有Garbage collection,但是iOS平台不提供。

17 存放NSOperation的集合类。

18 懒汉模式,只在用到的时候才去初始化。


下面的问题大多数都没什么技术含量,


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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值