joshaber / Few.swift

Views as functions of their state.
MIT License
1.08k stars 39 forks source link

Mark RealizedElement.layoutIfNeeded public #93

Closed Adlai-Holler closed 9 years ago

Adlai-Holler commented 9 years ago

@joshaber I'm using Few in a production app and this would sure be nice.

joshaber commented 9 years ago

I'm curious what the use case for this is. Ideally users won't need to know about it.

Adlai-Holler commented 9 years ago

It seems like a really common use case – the user wants to make decisions based on the layout of a given RealizedElement and wants to make sure they're up-to-date.

In my case, I want to use Few to manage some table cells, but not use the TableView element (it just isn't ready yet,) and so my first stab is to literally copy the FewTableCell code over, but FewTableCell forces a layout in each updateWithElement. Maybe that's extraneous in Few but I assumed it isn't.

joshaber commented 9 years ago

Fair enough :+1: