Finish: @lp_ ma built
1.Auto Layout VFL masonry @Dev_GJ
With the change of Apple mobile phone screen, pixel, after iOS6, Apple released the Auto Layout tool, in fact, from absolute Layout to relative Layout (android seems to use relative Layout from the birth of the day, After all, there are so many screens/HTML + CSS layouts that have to be adapted to relative layouts.
One is through xiB visual debugging (small projects/outsourcing projects/personal Demo/ and pages with little change are recommended). If the product is a project, try to avoid the use of XIB, XIB is not so good for SVN/GIT and other version management tools. If the team project uses XIB more, You’ve got a lot of trouble ahead of you.
Auto Layout learning tutorial recommended: segmentfault.com/a/119000000…
AutoLayout use
1.1 In xiB or Storyboard, use Xcode to provide graphical interface to add constraints directly
1.2 Add constraints in code using apis provided by Apple
1.3 Use VFL, full name is Visual Format Language
1.4 Using the tripartite framework to add constraint (navigation)【 recommended 】github.com/SnapKit/Mas…
2. Imooc programming/evaluation question cache implementation @ ying_wind _ dance
Due to strong feedback from MOOCs users, we need to program assessment caching, which will be implemented in the next version.
Due to the programming/evaluation questions often change, and various styles, we all switch to webview after 2.0, although Webview helps the client to reduce a lot of work, but the memory consumption of Webview, page experience is relatively poor. The minor modification is to provide the programming test and video for download together. A programming/evaluation test contains an HTML and a lot of JS + CSS. It is difficult to climb out of THE JS + CSS mode based on traversing THE HTML, so our steps are as follows:
A. The server packages a single programming/assessment question into a ZIP
B. The client uses the resumable download class to download the ZIP file
C. When users need to watch this course,
C0. Use the third-party library SSZipArchive to decompress
C1. Remove SSZipArchive
C3. Local call [baseURL needs to give your HTML and CSS + JS relative directory]
[_webView loadHTMLString:[NSString stringWithContentsOfFile:[localFilePath stringByAppendingPathComponent:@”index.html”] encoding:NSUTF8StringEncoding error:nil] baseURL:baseURL];
3. Course jump [inside App + Outside App]
A. String judgment, jump to the corresponding page [in application]
B. Inter-application jump -schema mode
B1. The targets – Info – > URL Types Settings
B2. Use this method in the AppDelegate class to handle App jump postprocessing
– (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotationNS_AVAILABLE_IOS(4_2); // no equiv. notification. return NO if the application can’t open for some reason
4. Night mode: Keyboard problems @_______ Baiding
Moocs iPad has added the function of night mode. In addition to night switching on the UI layer, it also needs to switch on the system keyboard, etc. On the native UI, the keyboard can be called through the input box
UITextView*textView = [[UITextViewalloc]initWithFrame:self.view.bounds];
textView.keyboardAppearance=UIKeyboardAppearanceDark;
But for the night mode of the WebView we need to use a runtime method, see this link
Stackoverflow.com/questions/1…
———————————
5. Some development tools recommend @ an American TV series
A. SZipArchive[zip and unzip third-party libraries]
B. Testing Tools – Developer options [iOS Settings – Developer options]
The real machine needs to be connected to the computer to appear this option, the use of some tools in the developer, can help us test a lot of complex environment bugs, at present just look at the network this piece, other arrangements will be studied later.
c. Charles
HTTP packet capture tool. We can capture some interfaces of other apps and calculate the realization of some functions, which will certainly reduce the cost of rebuilding wheels. Secondly, we can do some interesting things based on other apps. Charles specific use, please refer to the original software.
D. xcode flashes back to log Crashes
Note :d1. You need to add the following permissions in iTunes Connect
D2. Xcode – > open the Organizer
e.SimPholderwww.simpholders.com
Apple’s sandbox directory address changed again after iOS8, which was and is difficult to manage, and SimPholder solves this problem nicely.
F. Json XML Parser [JSON XML Formatting tool]
G. Real [View Debug tool, you can also View the View hierarchy of other apps on the jailbreak machine, recommendation :iOS Reverse Engineering]
h.Core Animator
UI designers or engineers can create beautiful animations with simple Settings.
Typography: MarkDown grammar is not familiar, typography is a little messy, next time to fix.
Note: this article comes from iMOOc iOS team, there is any mistake please timely contact me @lp_ Ma Jiancheng, so as not to mistake people’s children, thank you!