For ios, I usually have some questions during my own interview. For details, I have some questions about ios.

Source: Internet
Author: User

For ios, I usually have some questions during my own interview. For details, I have some questions about ios.

Record the interview questions you have seen at ordinary times, and add the questions you will encounter later.

IWhat is the essence of an attribute?What are the default Keywords of the attribute?What is the difference between atomic and nonatomic?What are the @ dynamic keywords and @ synthesize keywords used?

1 @ property = ivar + getter + setter; @ property the system will automatically generate the setter and getter methods;

2 readwrite (read/write), readonly (read-only), assign (do not add 1 to the reference count), retain (add 1 to the reference count)

Copy, nonatomic (non-atomic access, multi-thread concurrent access will improve performance), atomic (atomic access)

Weak (equivalent to assign, which can set the corresponding pointer variable to nil)

3 The difference between atomic and nonatomic is that the getter and setter methods generated by the system are different. nonatomic is faster than atomic.

Atomic will add a security lock to the thread, but atomic cannot guarantee thread security.

4. dynamic and synthesize. The former does not automatically generate setter and getter. The latter will allow the compiler to automatically generate the setter/getter method during compilation, when a user-defined storage or retrieval method exists, the user-defined method will not be automatically generated.

2. Does NSString generally use the copy or strong keyword? Why?

What is the difference between copy and mutablecopy of three variable collection classes and immutable collection classes?

What are the differences between processes and threads? What is the difference between synchronous and asynchronous? What is the difference between parallelism and concurrency?

Difference between a process and a thread: A program has at least one process and at least one thread. A process is the unit of resource allocation and ownership. threads in the same process share process resources. A thread is the basic unit of processor scheduling.

The difference between parallelism and concurrency: Two or more events or activities occur at the same time interval. Parallelism: refers to the occurrence of two or more events or activities at the same time.

5. Some common functions of GCD

Dispatch_async asynchronous execution queue dispatch_sync synchronous execution queue dispatch_get_main_queue global serial dispatch_get_global_queue concurrency

6. data persistence (FMDB)

7. How many methods does AppDelegate provide? What methods have been called from the background to the foreground? What methods are called at the first start? What methods have been called from the foreground to the background?

What are the advantages of NSCache over NSDictionary?

NSCache is a container used for temporary object storage. The key in NSCache does not need to be copied, And the stored object does not need to implement the NSCoding protocol. After the program exits, it is released.

9 do you know the Designated Initializer? When using it, what do you need to pay attention?

10. How to capture click events of the system return key in the navigation bar

- (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPushItem:(UINavigationItem *)item; // called to push. return NO not to.

11 have you used to define multiple classes in a class?

12. How to obtain the controller of the cell in cell. m (through UIResponder)

13. What operations (such as replacement) have been performed on the appdelegate rootViewController)

Fourteen categories and extensions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.