         
         configureCollectionView()
         adjustTrackingArea()
+        
+        NotificationCenter.default.addObserver(self, selector: #selector(self.windowDidChange), name: .NSWindowDidResize, object: nil)
+        
 
         let failureHandler: (Error) -> Void = { print($0.localizedDescription) }
 

            
            let glyphRange = layoutManager.glyphRange(for: textContainer)
            var bounds = layoutManager.boundingRect(forGlyphRange: glyphRange, in: textContainer)
            bounds.size.height += 28
            bounds.size.width = collectionView.bounds.width
            
            tweet.itemHeight = bounds.height

        }
    }

    deinit {
        NotificationCenter.default.removeObserver(self)
    }
    
    @IBAction func newTweet(_ sender: Any) {
        let twitterService = NSSharingService(named: NSSharingServiceNamePostOnTwitter)
