https://www.jianshu.com/p/f2bc7d155a86
If the video address is not detailed in the article, click to see the operation video
Project requirements: code extraction, business logic and data The processing needs to be highly isolated and modular, and the model layer and network layer need to be isolated. Therefore, consider building a public project. Every time you build a new project, you just need to rely on this project. After the code is modularized, we can continuously optimize and integrate each module to facilitate the realization of some more complex requirements and structural designs.
Idea design: ①MonkeyApp, used to store public libraries. ②MonkeyAppDemo is used to write demos and examples.
Specific steps:
1. Create a MonkeyApp project. Note that the dependent project here is Cocoa Static Library.
2, create a MonkeyAppDemo project. Right-click on MonkeyAppDemo and add File, select MonkeyApp.xcodeproj, and establish a dependency.
3. Import related classes in MonkeyAppDemo will have errors that cannot be found and compilation errors will occur. The following operations are required:
/div>
4, There is still an error after compiling. Or the compilation still shows that the relevant files cannot be found. At this time, it can be judged that the result of the compilation is not correctly dependent. Perform the following steps; add the dependency of the target to ensure that the MonkeyAppDemo is compiled first Compile MonkeyApp. Select MonkeyAppDemo Target, then select its Build phases option, and add MonkeyApp target.
5: If you need to introduce MonkeyApp For the image resources in, you need to check the copy file option.6: When there is a category, using the category will cause Crash. The solution is to add and compile in the Sample Command
7: The final effect, so that the model layer and network layer can be extracted.
Read 7858
WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3934 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC