Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set CenterWindow as firstResponder of application #5

Closed
rafaelks opened this issue Mar 13, 2013 · 14 comments
Closed

Set CenterWindow as firstResponder of application #5

rafaelks opened this issue Mar 13, 2013 · 14 comments

Comments

@rafaelks
Copy link
Contributor

If you have a TableView inside CenterWindow and you try go to top touching in iOS status bar, the TableView will no scroll to the top.

It is happening with me. Is it happening with you too?

I think we should set the center ViewController as the firstResponder of application.

@staticdreams
Copy link

I just checked with my app and my center view table scrolls fine to the very top. At least for the first controller. I haven't tried other center views yet since they don't contain any tables (yet)

@viezel
Copy link
Owner

viezel commented Mar 14, 2013

Please look at setPanningMode

@rafaelks
Copy link
Contributor Author

It happens only when you have a UITableView in left ViewController and a UITableView in center ViewController.

Anyone knows how to fix it? :-(

@staticdreams
Copy link

I have tableviews in both left and center controllers and it scrolls fine. I removed right view altogether.
however I'm using 0.6 version. haven't had the chance to upgrade and try out the new version

@rafaelks
Copy link
Contributor Author

It scrolls fine. But when I touch in iOS status, the UITableView of center ViewController does not go to the top.

@staticdreams
Copy link

Look, this is a small video I posted just now.
https://www.youtube.com/watch?v=V5ZLxoDz6Bk
You're unable to do what I'm doing towards the end of the video? statusbar click scroll?

@rafaelks
Copy link
Contributor Author

That is exactly my problem.

You left ViewController is a TableView too?

@staticdreams
Copy link

Yes, but on my left table I used:

scrollable: false

if that makes any difference. It isn't too long and I didn't want it to rubber-scroll in the middle. Maybe that fixes it.

@rafaelks
Copy link
Contributor Author

Yes. It changes everything. ;-)

I have fixed it right now, disabling left UITableView when it isn't visible.

mainWindow.addEventListener("viewWillOpen", function(e) {
    winMenu.tableView.setScrollable(true);
});

mainWindow.addEventListener("viewWillClose", function(e) {
    winMenu.tableView.setScrollable(false);
});

Thanks!

@viezel
Copy link
Owner

viezel commented Mar 14, 2013

good you guys figured it out :)

@staticdreams
Copy link

This probably should be documented somewhere :)

@viezel
Copy link
Owner

viezel commented Mar 14, 2013

true. im trying to figure out why this happens..

@rafaelks
Copy link
Contributor Author

It happens because the firstResponder is the first ViewController (leftWindow).

The status bar touch responds to the firstResponder ViewController with UITableView AFAIK.

@viezel
Copy link
Owner

viezel commented Mar 14, 2013

yes.. I understood that from your dialog.
Im talking about native code here. This should not occur. :)

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

No branches or pull requests

3 participants