It's almost a week since the launch of Win8's debut "Modern Educational Technology.
The project has a total of three platforms: iPad, web, and Win8. The iPad and Win8 versions are also complete, =. =.
IPad:
It is a native + HTML project. The main technical point is the effect of the page scroll of webview and the interaction between OC and JS, such as how OC listens to JS events.
For details, refer to my blog post: The paging slide problem of IOS: uiwebview scrollview.
IOS: listening for JavaScript events (JavaScript communicating back with objective-C Code) in object-C)
Win8:
We use HTML5 + css3 + winjs for Win8 development. HTML + CSS mainly acts on the view layer, while winjs is implemented on the logic layer. So we need to find the MVC-like mode. After the project, I also learned about some front-end technologies.
After all, it is a new platform. In the details of the project, we will see that Ms has not done well in some API details, and some implementations can only be completed in a circle.
One problem for the project is to adapt to multiple resolutions. Currently, the adaptation problem of Win8 in development is between iOS and Android. There is no need to worry about multi-resolution adaptation for iOS, but there is no wide variety of Android. However, we can still learn from some experience in Android. For example, the most commonly used method is to use the percentage method.
1. All sizes and lengths used in CSS can only be set with percentages;
2. When Facing listview, sometimes the CSS setting item size cannot meet the effect, you need to make dynamic adjustments in JS: e.g.
Obtain the available width and height of the screen:
Set in listview template:
The rest is more about interface la ing, which must be done with html css. Front-end knowledge will be helpful.
If this method is used for project development, there is no webview control. webview is available only in C # And XAML development methods. This is inconvenient. Although HTML is replaced by IFRAME, it is difficult for us to interact with the content of IFRAME, which leads to the lack of flexibility and direct interaction with the Web end.
However, Ms provides two solutions for Win8 modern app development, which is undoubtedly intended to attract more developers. The C # XAML solution is more suitable for migration of Android and iOS developers, the winjs solution is more used for Web Developer transfer. If you use web development, it is very easy to get started with Win8 development.
The following figure shows the two platform products:
IPad: https://itunes.apple.com/cn/app/xian-dai-jiao-yu-ji-shu/id595581360? Mt = 8
Win8: http://apps.microsoft.com/windows/zh-CN/app/6731b692-b272-4784-9f91-a78b457685eb