TapLynx 1.0b9: custom article view controller

2 views
Skip to first unread message

Brent Simmons

unread,
Nov 30, 2010, 3:53:12 PM11/30/10
to beta-taplynx...@googlegroups.com
http://ranchero.com/downloads/TapLynxiPad.zip

Consider this screenshot. (It's not pretty, but that's beside the point.)

http://ranchero.com/images/customPadLynxArticle.png

This article is laid-out using a new feature that I'm totally excited about -- you can now create custom view controllers to take over display of articles.

To specify a plugin, use the Article_CustomViewController key with the name of a view controller class.

The protocols are in TLViewControllerProtocols.h. There is a sample (which you can see in the above screenshot) in the Example Plugins folder: see PLXArticleViewController and other PLX* files.

(Yes, TapLynx is moving toward something like a WordPress theming and plugins system, where developers can make themes that other people can use. I don't expect everybody to write code, but I do hope to see developers create plugins of various types that non-programmers can use.)

Some of the cool features of this new plugin:

1. You can use any, all, or none of the ready-made subviews.

The example uses the title, article-content, and ad view, but not the existing sharing view.

2. You can add your own views.

Instead of using the existing sharing view, the example creates its own sidebar with its own sharing buttons. (You can add whatever you want to add, in other words.)

3. You can lay it all out however you want to.

4. You can deal with spacing issues with long/short titles -- note, in the example, how -[PLXArticleView layoutSubviews] gets the preferred height for the title view, which is based on the length of the title string, and then makes the article-content view taller or shorter based on the title height.

-Brent


Reply all
Reply to author
Forward
0 new messages