3

开发类似 iPad 杂志的应用程序的最佳方式和技术是什么?是否可以使用 HTML 5 和 CSS,包括滑动效果和类似的东西?

其他技术是什么?

4

4 回答 4

2

I tried hundreds of techniques, which sucked up memory, required a million lines of code, and was at least 200MB. Then I had a stroke of genius last night.

  1. use storyboards, and gesture to swipe / modal / Cross Dissolve transition to and from each ViewController
  2. instead of trying to pull in a PDF or image, throw your text into an HTML file, and use an embedded HTML link
  3. have your index as buttons that go to each view
  4. BONUS: cool feature to add would be a "tap" gesture on each page, so that after 2 taps the index pops up, that way the user doesn't have to swipe all the way back

CODE FOR PART 2

-(void)viewDidLoad {
[super viewDidLoad];
NSString* filePath = [[NSBundle mainBundle]
          pathForResource:@"yourtexthere"
          ofType:@"html"
          inDirectory:@"folderwhereyousavedit"];
NSURL* fileURL = [[NSURL fileURLWithPath:filePath];
NSURLRequest*request = [NSURLRequest requestWithURL:fileURL];
[webView loadRequest:request];
}

in the .h

@property (weak, nonatomic) IBOutlet UIWebView *webView;

and of course synthesize that in the .m, and connect it to the appropriate viewController...and eventually throw it into Apple's Newsstand.

This technique maintains the integrity of the text, has minimal coding, and keeps a small file-size.

Holler if you need any more help with this.

于 2012-01-20T21:14:46.803 回答
0

另一种技巧是使用杂志的pdf文档直接渲染。

实现过程繁琐,但不需要重构杂志。

如果您想使用库,我们设计了 FastPdfKit 来帮助完成这些过程。查看 FastPdfKit.com 并获取 github 上的免费代码。

于 2011-02-14T22:37:23.263 回答
0

是的,您可以使用 html5 技术、触摸技术和 CSS 来做到这一点。我发现依赖 css3 动画是我的项目大量内存泄漏的来源。这取决于对哪些艺术具有 CSS 加速的选择性。

它没有完成,也不是开源的。您可以在此处查看一些测试用途,并与我联系以获取有关设置的更多信息:http: //stacks.acadnet.ca/

新版本从适当标记的 tumbl 帖子中提取内容,但尚未准备好显示。该系统还具有全屏背景图像,可以锁定以提供两页跨页。

由于开发时间(2年),这不是一个开放系统,它是大师概念的核心。

于 2012-08-31T19:00:03.320 回答
0

仅使用 HTML5 和 CSS 很难获得与 iBooks 相同质量的滑动效果。您可能希望开发自己的使用 OpenGL 来实现效果的本机应用程序。

检查此问题以开始实施页面滑动动画。

于 2010-04-15T18:37:44.310 回答