Hacker News new | past | comments | ask | show | jobs | submit | bradya's comments login

UITableView lays out cells from the top. If there aren't enough cells to fill the screen, there will be an empty area in the bottom part of the table view, between the last cell and the bottom of the table view (as you would expect).

Unfortunately, there isn't a standard way to invert a UITableView, and have cells laid out from the bottom.

So, the easiest solution for us was to set the table's transform to CGAffineTransformMake(1, 0, 0, -1, 0, 0) (flip the whole table upside down) and then give the cells the same transform (to cancel out the table view's transform).

A bit hacky, and causes indexPaths to be inverted as well (0,0 is now at the bottom), but worked for us.

Seen a few other people take this approach as well: https://twitter.com/tapbot_paul/status/461161920402563072


That's a pretty interesting approach. Wouldn't it be cleaner to use a UICollectionView with a custom layout?


Most definitely! UICollectionViewLayout should be the right answer, but the thing is: the Slack iOS app was already built using UITableView, drawing many many custom cells. We'll probably port someday to UICollectionView ;)


We do the same thing, custom views, mostly drawn in -drawRect:, reused in different cells. It's actually a very nice technique but like you said, the are some sacrifices to take. Still, these cells depend of a tableViewcCell which has unique properties and special APIs that collectionViewCells don't. I think the most trikcy part here is to be able to build a custom UICollectionViewLayout allowing to display cells from the bottom. Haven't found any third-party doing it well enough yet. Do you know of any?


I've started experimenting not making cells but UIViews and just add them on top of cells. I haven't gone with that fully yet but I've planned to try it out.

The downside is you lose out on many of the out of the box stuff, like cell background highlights that you know have to define yourself.

The upside is that you can now reuse the UIView everywhere, including non-subclasses of ScrollView.


You should add your view to the cell's contentView instead of directly on the cell, which allows you to keep the default behaviors and also reuse the view.


We tried other popular text input projects for iOS, but none felt right and worked fully for our needs. We ended up spending a big portion of our time maintaining custom versions of other projects.

For that reason, we decided to build our own growing text input from scratch, and we've just released it as open source. We hope you all will find it useful!


Looks really great. Have you thought about submitting to CocoaControls? (https://www.cocoacontrols.com/) It's the second place that I look for iOS components (after a simple Google search, that is).


Thanks! We submitted and it should be up on their site soon. (Pretty sure they are still reviewing it)


Just did :)


thanks a lot @aaronbrethorst!


Thanks, Liyan :) I'm happy to hear it's useful for you!


Elon Musk of SpaceX and Tesla Motors is also a good example of a successful multitasking founder.


Those are all sunk costs (they can't go back in time and change them) - so they are likely evaluating the deal with the long-term future in mind.


The HTML5 boilerplate provides a boilerplate humans.txt

https://github.com/paulirish/html5-boilerplate/blob/master/h...


Using LittleSnapper (or equivalent tool) to take and archive screenshots of well-done page designs is a really good way to enhance brainstorming.

After months or years of doing this, you build up an asset that has real value to you and other designers.

You should consider posting your screenshot library - I'm sure quite a few designers would be interested in it (or at least links to the pages, to avoid any copyright issues). New webapp idea?


I've used Delicious for this for years. I used to just tag stuff as "design" but over the years my taste has changed and so now the good stuff is more like: http://delicious.com/philfreo/design+amazing+inspiration


I regularly use Skitch for taking screenshots. It is free and also uploads to its website.


Abtin, great job on Wompt. I'm pretty impressed that you're running Wompt on the EC2 free tier. What is your CPU utilization at?


Its hovering around 0-1%. Such is the power of node.js :)


Very impressive, hope that you guys get in.


My feelings are almost exactly the same. I work 60+ hours a week and make an upper middle class income. I'm trying my hardest to change that because I'd like to have time to enjoy life while I'm young (I'm 23).


Here's an alternative: save as much money as you can. This buys you tremendous flexibility when you're in your 30's (compounding interest plus a healthy savings buffer).


Yes, I can vouch for that.

I've worked with several "senior" developers who had "decades" of experience but had no idea how to write good code.


Congrats! This is inspiring and motivated my business partner and I to consider selling our mobile app business. We just hit 1 million users across our portfolio of relatively unknown apps.

If we are able to sell our company, we would be able to use the cash to pay for living expenses so we can start another company.


Awesome. We're in similar shoes. We should connect.


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: