kentnguyen / KNPathTableViewController

UITableViewController with customizable overlay panel while scrolling, inspired by Path
kentnguyen.com
569 stars 48 forks source link

Could it be used as non ViewController subclass #2

Closed emanuelef closed 12 years ago

emanuelef commented 12 years ago

I really like the control, would it possible to decouple it from a ViewController? Could it be some delegate used for an already existent tableVIew? Thanks

kentnguyen commented 12 years ago

Yes ofcourse, it is a tableviewcontroller, just subclass it as you would for UITableViewController.

Regards, Kent Nguyen

On Tue, Jan 17, 2012 at 6:23 PM, Emanuele Fumagalli < reply@reply.github.com

wrote:

I really like the control, would it possible to decouple it from a ViewController? Could it be some delegate used for an already existent tableVIew? Thanks


Reply to this email directly or view it on GitHub: https://github.com/kentnguyen/KNPathTableViewController/issues/2

emanuelef commented 12 years ago

yes, I was just thinking to have the control like a UIView subclass instead, that will make it possible to easily used it without changing structure of exisiting UITableViewController (thinking they also have already custom UITableViewController subclass)

kentnguyen commented 12 years ago

You are talking about two different issue. This class has to be a subclass of UIScrollView (UITableView) in order for it to work.

UIView, on the other hand, doesn't scroll.

It is entire to to have 2 level of subclassing if you already have your own custom uitableviewcontroller class.

Probably you need to read more about how subclassing works.

Regards, Kent Nguyen

On Tue, Jan 17, 2012 at 6:37 PM, Emanuele Fumagalli < reply@reply.github.com

wrote:

yes, I was just thinking to have the control like a UIView subclass instead, that will make it possible to easily used it without changing structure of exisiting UITableViewController (thinking they also have already custom UITableViewController subclass)


Reply to this email directly or view it on GitHub:

https://github.com/kentnguyen/KNPathTableViewController/issues/2#issuecomment-3526068

emanuelef commented 12 years ago

take a look here: http://cocoacontrols.com/platforms/ios/controls/timescroller I'm thinking of having this decoupled as he did.

kentnguyen commented 12 years ago

Eh I did reference to this in my description, did you miss it?

My control implementation is like any other custom control based on UITableviewcontroller. I think you are mixing the wrong concepts.

Kent.

On 17 Jan, 2012, at 18:59, Emanuele Fumagalli reply@reply.github.com wrote:

take a look here: http://cocoacontrols.com/platforms/ios/controls/timescroller


Reply to this email directly or view it on GitHub: https://github.com/kentnguyen/KNPathTableViewController/issues/2#issuecomment-3526290

kentnguyen commented 12 years ago

Another point you might have missed from my blog. My control is implemented with flexibility and extendability in mind. While the link you mention here did an excellent job in recreating, it is not meant for flexibility like mine.

Kent.

On 17 Jan, 2012, at 18:59, Emanuele Fumagalli reply@reply.github.com wrote:

take a look here: http://cocoacontrols.com/platforms/ios/controls/timescroller


Reply to this email directly or view it on GitHub: https://github.com/kentnguyen/KNPathTableViewController/issues/2#issuecomment-3526290

emanuelef commented 12 years ago

Mmm, I don't want to bother you much again. Just in my case the other library approach is more suited (less invasive, more decoupled).

@interface TimeScroller : UIImageView instead of @interface KNPathTableViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>

I can understand they are two different things (don't tell me I need to read about MVC pattern ;-) ) it's just that in my case I prefer the other approach.

kentnguyen commented 12 years ago

Yes. You mixed the two concepts. One is a View and one is a ViewController. And they are used very differently. Your case is a special one.

On Tue, Jan 17, 2012 at 7:17 PM, Emanuele Fumagalli < reply@reply.github.com

wrote:

Mmm, I don't want to bother you much again. Just in my case the other library approach is more suited.

@interface TimeScroller : UIImageView instead of @interface KNPathTableViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>

I can understand they are two different things (don't tell me I need to read about MCV pattern ;-) ) it's just that in my case I prefer the other approach.


Reply to this email directly or view it on GitHub:

https://github.com/kentnguyen/KNPathTableViewController/issues/2#issuecomment-3526463