     /// Returns the drawing area for the footer of the specified section.
     public func rectForFooter(inSection section: Int) -> CGRect {
         
-        
+        updateSectionsCacheIfNeeded()
+        
+        return rect(fromVerticalOffset: offset(forSection: section), height: cache.sections[section].footerHeight)
     }
     
     /// Returns the drawing area for the header of the specified section.
     public func rectForHeader(inSection section: Int) -> CGRect {
         
-        
+        updateSectionsCacheIfNeeded()
+        
+        return rect(fromVerticalOffset: offset(forSection: section), height: cache.sections[section].headerHeight)
     }
     
     // MARK: - Overridden Methods

    /// Returns the drawing area for a specified section of the table view.
    public func rect(forSection section: Int) -> CGRect {
        
        
    }
    
    /// Returns the drawing area for a row identified by index path.

    
    open override var frame: CGRect {
        
        didSet {
            
            let newValue = frame
            
            if newValue != oldValue {
                
                if oldValue.size.width != newValue.size.width {
                    
                    updateSectionsCache()
                }
