Is there any race conditions here wrt _headerViewProxy or _footerViewProxy? Even so, you might want to check if sender == nil, and return early, before calling TiThreadPerformOnMainThread. Knowing sender != nil reduces the need to check if _headerViewProxy or _footerViewProxy is nil, because then they'd != sender.

Also, if you can safely check the proxies here, then you might use it to reduce calls where sender is neither header nor footer.