ios面试题
1.  ObjC中,与alloc语义相反的方法是dealloc还是release?与retain语义相反的方法是dealloc还是release,为什么?需要与alloc配对使用的方法是dealloc还是release,为什么?
2.  在一个对象的方法里面:
self.name<self.name/> = “object”;
name =”object”
有什么不同?
江苏好玩的地方
3.  这段代码有什么问题:
@implementation Person
- (void)setAge:(int)newAge {
self.age = newAge;
美国旅游须知}
@end
卡老师wap歌词中文翻译
4.  什么是retain count?
5.  以下每行代码执行后,person对象的retain count分别是多少
Person *person = [[Person alloc] init];
[person retain];
[person release];
[person release];
6.  为什么很多内置类如UITableViewController的delegate属性都是assign而不是retain的?
7.  定义属性时,什么情况使用copy,assign,和retain
8.  autorelease的对象是在什么时候被release的?
9.  这段代码有什么问题,如何修改
for (int i = 0; i < someLargeNumber; i++)
{
NSString *string = @”Abc”;
string = [string lowercaseString];
string = [string stringByAppendingString:@"xyz"];
NSLog(@“%@”, string);
}
10. autorelease和垃圾回收机制(gc)有什么关系?IPhone OS有没有垃圾回收(gc)?
名校校训
11. Objective C中的protocal是什么?
12. Objective C中的selector 是什么?
13. Objective C中的category是什么?
14. 什么是Notification?什么时候用delegate,什么时候用Notification?
15. 什么是KVC和KVO?Notification和KVO有什么不同?KVO在ObjC中是怎么实现的?
16. ViewController 的 loadView, viewDidLoad, viewDidUnload 分别是在什么时候调用的?在自定义ViewController的时候这几个函数里面应该做什么工作?
17. ViewController 的 didReceiveMemoryWarning 是在什么时候被调用的?UIViewController类中didReceiveMemoryWarning默认的操作是什么?
18. UITableViewController 中,创建UITableViewCell时,initWithSytle:resuseIdentifier 中,reuseIdentifier有什么用?简述UITableViewCell的复用原理.如何劈叉
服装辅料市场 19. UIView 和CALayer 有什么区别?
20. 以 UIView 类 animateWithDuration:animations: 为例,简述UIView动画原理

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。