Giter Site home page Giter Site logo

issue-1-lighter-view-controllers's People

Contributors

chriseidhof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

issue-1-lighter-view-controllers's Issues

你好 问个问题

你这个demo cell高度都是固定的,现实项目中 cell动态的多,咋算高度啊?咋封装

'Photo' objects are leaking

Hi,

'Photo' objects never get released which results in memory leaks.

'ArrayDataSource' copies block of type 'TableViewCellConfigureBlock'.
I think during this copy of block, 'Photo' instances are copied and retained too.

I put following NSLog statement in Photo which never get printed.

// Photo.m
-(void) dealloc
{
NSLog(@"%s",PRETTY_FUNCTION);
}


In fact, I profiled memory footprint in instruments. It goes like this:

  1. I have added 'HomeViewController' as rootviewcontroller of navigation controller. HomeVC has a button 'Launch'. Memory usage till point is 14.4MB.

  2. Action on 'Lunch' button will push 'PhotosViewController'. Memory usage after successful loading of 'PhotosViewController' is 17.3MB.

  3. 'Back' button in navigation bar, pops 'PhotosViewController' & 'HomeViewController' appears. Memory usage till point is 16.2MB. I was expecting it to be close to 14.3MB

//AppDelegate.M
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
HomeViewController * hmv = [HomeViewController new];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:hmv];
....
}

//HomeViewController.m
-(IBAction) launch:(id)sender
{
PhotosViewController *photosViewController = [[PhotosViewController alloc] initWithNibName:@"PhotosViewController"
bundle:nil];
[self.navigationController pushViewController:photosViewController animated:YES];
}

How to handle multiple custom cells?

This approach works great for having one custom cell per table view. But how would one handle multiple customs cells with this approach? Saying you would like to use different cell layouts based on your model attributes.

Why not just place data source methods into a superclass?

I'm at a loss to the advantage here. Seems to me you'd have the same amount of code, and the same number of files if you just moved the code to a superclass rather than another object.

Ex:
superclass with photoDataSource methods
subclass
2 files

object with photoDataSource methods
uiviewcontroller with object set as datasource
2 files

Is there an advantage I am missing to not just placing all the photoDataSource methods into a superclass rather than a separate object?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.