iOS

Top iOS Interview Questions

1. What is strong, weak, assign, unowned reference and copy?

2. What would happen in the following code?

@property (nonatomic, copy) NSMutableArray *mutableArr;

self.mutableArr = [NSMutableArray array];
[self.mutableArr addObject:object];

3. How to prevent other class creating class instance?

4. Explain the retail cycle in blocks and closure

5. What are the types of blocks? How's memory allocated for different types of block?

6. What is the difference between Atomic vs Nonatomic?

7. How to make a class thread safe?

Objective-C Runtime and Runloop

问Runtime常用的几个应用场景? 答我们常用Method Swizzling来将系统的方法换为我们自定义的方法,给系统方法添加一些需要的功能,来实现某些需求。例如,跟踪程序每个ViewController展示给用户的次数,可以通过Method Swizzling替换ViewDidAppear初始方法。再例如更换全局UILabel默认字体,可以通过Method Swizzling替换UILabel初始方法来修改等。

How to pass data between threads?

What's the relationship between layer and view?

https://patrickbalestra.com/blog/2018/08/06/my-tech-interviews-experience.html

results matching ""

    No results matching ""