
Here is the long-awaited update of the free version of the
uBooks reader. The reasons for such a long wait were formed in the whole story ...
Functional
While wait, with the story, let's look at the functional and screenshots:


')
I will highlight some features of the application:
- smooth autoscrolling
- scrolling animation
- application language
- custom tap zones
- book search
- manual screen rotation
- bookshelf
- search in the bookshelf
- folders
- moving in book by percentage


From what you don’t notice on screenshots, I’ll highlight ways to fill books:
- using http server
- using ftp server
- via web browser
- public storage
Instructive story
And now - the story that began on September 25, 2009, when the censors from the AppStore gave the go-ahead to the birth of the first free version. But, unfortunately, the release of the paid version was postponed by the censors for an unlimited period. The motivation for refusing to publish an application in the AppStore was very simple - the use of private frameworks.
In order to increase user convenience, it was a risky decision to use the hidden features of the WebKit framework. This is exactly what Cupertino did not like. Still remains a mystery how they missed the free version, which is built on the same principle and differs only in the presence of banners.
We have learned a valuable lesson from this - the development of a new version has begun, which would not have the shortcomings of the previous version, namely, we wanted to get rid of WebKit. The control that would describe the text was assigned the nickname Viewer. And the work began to boil ...
The viewer was planned to be done in two ways: using OpenGL and our know-how. 2 teams were formed that worked in parallel on these tasks. It was believed that the team that quickly and better release the industrial version of the viewer, and won. In this spirit of rivalry, we worked for some time, and in the end, the team came to the finish line with our know-how, but it was still far from the end. Ahead was to unite and correct the flaws of the released version, add utility, which will make it easier to read books.
One of the main shortcomings that many complained about was the incorrect recognition of the encoding for TXT files. To solve this problem, an algorithm was implemented that analyzed the frequency of occurrence of characters and suggested an encoding used in the file. And of course we didn’t forget about the user - after converting the book into our own format, we left the opportunity to transcode the book.
To quickly navigate through the file, we have developed our own format for storing books. The format is xml, in which paragraphs and the number of characters in each of them were numbered for more accurate positioning. To quickly navigate through XML, we decided to abandon the NSXMLParser parser provided by Apple, and to replace it, use the XPath technology, which allows you to quickly access and draw the required paragraph.
Quite a difficult task was to optimize the process of drawing text on small fonts with autoscrolling. When reading books there were jerky movements that tired the eyes. This happened because the iPhone-a processor did not have time to draw and process incoming data in one stream. Having divided these two operations into several threads and synchronized them, we significantly unloaded the processor. This allowed the user to perform additional actions in the background, for example, to listen to music while reading.
By the way, all team members were equipped with iPhona'mi, on which they tested the application not only at work, but also in real life, i.e. at home, in transport and of course at work. Thus, we were interested in the speedy and better development of the application, making suggestions on usability. One of them is a built-in web browser, which, while sitting in a cafe, can surf the Internet and download a new book without using a laptop or PC.
The development of uBooks continues, and after the release in the AppStore, we plan to port it to a new and ambitious device - the iPad, expand the functionality, increase the reliability and speed of the application.
Mini Competition
Competition conditions are simple:
- read this article to this point
- leave a comment with a feedback that will be liked by the HB community
Reward - a promotional code for the
paid version (only $ 4.99 and no advertising).