Parse HTML to implement zhihu daily report Demo and parse html daily report demo
Use Gallop to parse HTML and render it into the Demo of zhihu daily report implemented by the iOS native PAGE.
Gallop v0.3.0Gallop --- a powerful and fast text-and-image hybrid layout framework. A framework for build a smooth asynchronous iOS APP.
About GallopGallop is a powerful and excellent graphic/Text hybrid layout framework.
Features is mainly used to address the following needs:
- Implements a text-and-text mixed layout interface, such as adding an emoticon in the text and adding a click link to the text. Gallop also provides convenient methods for parsing expressions, URL links, @ users, # topics #, and so on.
- The performance of the scroll list is optimized. Gallop uses asynchronous rendering, view-level merging, mainRunloop observation, pre-caching of layout models, and other methods to implement complex graphic and text mixed layout interfaces, still maintain a relatively good rolling performance (FPS is basically maintained at 60Hz), there is a circle of friends Demo built using Gallop in the project.
- Easily parse HTML Rendering to generate a native iOS page. The project contains the zhihu daily report Demo built using Gallop.
Parse the advantages of HTML Rendering to generate a native iOS page:
- Better performance.
- Images can be cached locally without repeated loading. UIWebView can only be cached to the memory. After the UIWebView is released, it needs to be reloaded.
- You can use the native image browser to browse photos and enjoy a better experience. This can solve the problem that NavigationBar cannot be overwritten when you view a large image in UIWebView.
- You can layout and set styles for HTML content as needed to remove unnecessary parts.
- You can add other native controls to the content as needed.
// TODO: currently, only text and images are supported. Videos will be supported later. |
DEMO: Click me