One: Three steps to become a single case
1, import the third party framework #import "Singleton.h" in h file;
2, write in H file: #define Singleton_interface (ClassName)
3. Write in M file: #define Singleton_implementation (ClassName)
Second, how to make the view not appear from the bottom of the navigation bar
1, judging
#define IOS7 ([[Uidevice currentdevice].systemversion Doublevalue] >= 7.0)
2. Use: if (iOS7) {
Self.edgesforextendedlayout=uirectedgenone;
}
Third, how to achieve automatic scaling?
For iphone projects, there is generally no need for a screen fit, but for ipad projects it is generally necessary to adapt to the screen. The specific implementation is:
Uiviewautoresizingnone is not automatically adjusted.
Uiviewautoresizingflexibleleftmargin automatically adjusts the distance to the left of the superview, ensuring that the distance to the right of the Superview is constant.
Uiviewautoresizingflexiblerightmargin automatically adjusts to the right distance from the Superview to ensure that the distance to the left of the Superview is constant.
The uiviewautoresizingflexibletopmargin automatically adjusts the distance from the top of the Superview to ensure that the distance from the bottom of the Superview is constant.
Uiviewautoresizingflexiblebottommargin automatically adjusts the distance from the bottom of the Superview, that is, the distance from the top of the Superview is constant.
Uiviewautoresizingflexiblewidth automatically adjusts its width to ensure that the distance to the left and right of the Superview is constant.
Uiviewautoresizingflexibleheight automatically adjusts its height to ensure that the distance from the top and bottom of the Superview is constant.
1.30 Summary