Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Old comment? #653

Closed
BNTR opened this issue Mar 17, 2017 · 2 comments
Closed

Old comment? #653

BNTR opened this issue Mar 17, 2017 · 2 comments

Comments

@BNTR
Copy link

BNTR commented Mar 17, 2017

Hi all!
While I'm looking through Kiosk app code I found old comment which I suppose had been written when you used ReactiveCocoa. I'm talking about SaleArtworkDetailsViewController.swift file about comment in viewDidLayoutSubviews function. I'm not sure about how valid this comment now for you guys, but may be its old piece of information which you don't want see in your code =)
Thx!

@ashfurrow
Copy link
Contributor

You mean this comment here?

override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
// OK, so this is pretty weird, eh? So basically we need to be notified of layout changes _just after_ the layout
// is actually done. For whatever reason, the UIKit hack to get the labels to adhere to their proper width only
// works if we defer recalculating their geometry to the next runloop.
// This wasn't an issue with RAC's rac_signalForSelector because that invoked the signal _after_ this method completed.
// So that's what I've done here.
DispatchQueue.main.async {
self.layoutSubviews.onNext()
}
}
That's intended to be there, it was added during the move from ReactiveCocoa to RxSwift. Happy to provide more context.

@ashfurrow
Copy link
Contributor

I think this issue is addressed, so I'm going to close it. Feel free to re-open if you have any follow-up 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants