Question: I would like to access a variable from my rootViewController from within a different viewController (it‘s a CollectionViewCell).

```
window!.rootViewController = ViewController()

```

I declare the var like so:

```
import UIKit

class ViewController: UIViewController {

    var testString : String = "Test";

    override func viewDidLoad() {    
[…]

```

And try to access it this way:

```
import UIKit

class MainCollectionViewCell: UICollectionViewCell {
    override init(frame: CGRect) {
        […]
        super.init(frame: frame)

        let mainView = self.window!.rootViewController
        var testStringFromMainView = mainView.test
[…]

```

But all I keep getting is:

```
Type of expression is ambiguous without more context

```

Strange thing is, when I try for example

```
mainView.view.backgroundColor = UIColor.redColor()

```

it works.

I can’t figure out what I am doing wrong. Any help is appreciated!

Answer: 
ViewPostImeInputStage ACTION\_DOWN is a bug that occurs stemming from the rare instance where your layout is rejected and you are no longer able to click on any clickable items, and what occurs instead is a ViewPostImeInputStage ACTION\_DOWN with every button press (and no action). The solution for this is simple, wrap your layout content with a parent. So if you xml format was

```
<LinearLayout <---root layout
...
<!-- your content -->
</LinearLayout> <-- root layout end

```

change to

```
<FrameLayout <---root layout
   <LinearLayout <-- parent wrap start
   ...
<!-- your content -->
   </LinearLayout> <-- parent wrap end
</FrameLayout> <-- root layout end

```

This solution should resolve that conflict. Atleast this is what has worked for me. Cheers!
I had this happen to me on the first click of a CardView inside a RecyclerView. It turns out the CardView XML set:

```
android:focusable="true"
android:focusableInTouchMode="true"

```

Once I removed that, the first click (and subsequent clicks) worked fine, and I no longer had the error with ACTION\_DOWN.