First edition of IOS Weekly

Source: Internet
Author: User

I. Multi-threaded security scenarios

1. Use a sync lock, but it affects performance

2. With Nslock, is also the lock mechanism

3. Using the dispatch queue, in parallel queue, combined with dispatch_barrier, ensure that the data operation of the concurrent queue is executed independently. --refer to the 52 efficient cocoa programming method

Summary: The third approach is optimal, but rarely used. Of course, serial queues are also available, but parallel queues are more efficient. Also, for a single example of the wording: it is best to use dispatch_once.

Two. Processing of picture Fillet

1. Use layer, but this affects performance

2. Use a box with rounded corners

Of course there may be a better way to ask for guidance ...

Three. Talk about your view of block

I want to hear such an open question, you must be ignorant.

Can be answered from block's data structure.

Four. Does the notification of a child thread callback the main thread?

On which thread to post, which thread responds, regardless of the thread registering the listener. Of course, if you specify on which thread you are registering for monitoring, then which thread will respond.

Five. What do I need to be aware of when defining a library or framework?

1. Avoid namespace collisions with prefixes, including class names, global variables, etc.

2. Try to use immutable objects,

3. Use a clear and coordinated naming method

4. Prefix the private method with a different public method

5: Comment Your header file

6. Initializing parameters

Five. Map deviation resolution

Using a corrective database, or interface, for the moment, I didn't think of a better way.

Reference: http://southpeak.github.io/blog/2015/03/14/nsnotificationyu-duo-xian-cheng/

http://blog.csdn.net/mad1989/article/details/10034251

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

First edition of IOS Weekly

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.