After the project is online, finally have time to summarize their own projects. It's not a particularly important experience, but it can be a lot of trouble if we lack it in our projects.
The first is to create a base class, without looking at the number of great God's code, just summarizing some of the experience of creating base classes. The first is the base class of Viewcontroller, which relates to the style of all the navigation bars of the whole project, and is also more convenient for ios6.0 adaptation. Another base class created in our project is Uilabel, because the color of our overall text is not the default black, but other colors, so it is worthwhile to omit one line of code, and there is a IOS6 adaptation, The default background color for Uilabel in ios6.0 is white, which is colorless in 7, and only two lines of code are written in the base class, but this can save a lot of things.
Next is the handling of the warning box, the warning box in the ipad is customized in our project, so we need to write a warning box and follow the Uialeartview method to pass the event in the agent. But the powerful features that Uialeartview can display anywhere are not very clear, and the warning boxes that you write are loaded into the view using Addsubview methods, but the Uialeartview appears directly on the window, So you can cover everything in the view including the navigation bar. Later studied the Svprogresshud this tripartite class, indeed is directly loaded to the window.
There is also the problem of adaptation, including the adaptation of the screen and the system, we have a simple process for screen adaptation, just add a scrolling view on it. System adaptation first is the navigation bar 6:7 less than 20 pixels, as well as I mentioned earlier Uilabel background color problem, the other to not feel what, there are several methods in 6 does not collapse, make a judgment can be, or use other methods to replace.
Our project is on the iphone and ipad on the two end of all the two folders created at the beginning of the project, the code will be rewritten after the separation, so it is recommended to write a view of the time do not write dead, according to the width of the screen to adapt Ah, so that the trouble is not rewritten. This in the middle of the time to write a few commonly used macros, referring to macros, our project defines a large number of macros, here are recommended to write a macro when a special. h is used to put a macro. I write these grand are all about color, we are very complex about color processing, including the prefix of our background interface and some of the parameters in the middle of the macro.
Finally, the memory management problem, because before the creation of the project using the MRC to now I feel that they have a hole, do not want to trouble students with ARC bar!
These are the experience of creating the project and the convenient late adaptation, the following will summarize the technical points I encountered, including: Custom camera interface, graphic drawing includes interaction, image upload, IAP purchase, Uicollectionview's various custom uicollectionviewlayout I've seen include his infinite scrolling and so on. Although these points of knowledge can be found on the Internet, but what I want to talk about should be difficult to find.
This article from "Yunsankai" blog, declined reprint!
Project experience Summary of iOS development