UIButton Strange Issue (wont release on releasing tap) - xamarin.ios

I have a problem with UIButton and it is bizarre because I do not have it on similar occasions in new projects. My problem:
I have four UIButton(s), when you hold your finger on one of them them, then when you tap on another button, even if you release your finger from the second button, until you release all the fingers from the screen, the buttons will not release. I guess that it is related to TouchEvents and TouchGestures like swipe and I am using all of them in my application.
Sincerely yours,
Peyman Mortazavi

I myself found the issue.
You need to make a separate panel inside of the main panel (let's say Root) and then put your buttons or any other UI there.
Regards,
Peyman Mortazavi

Related

JavaFX request layout does nothing

I'm absolutely confused.
Studying JavaFX for several months.
In my application I have a custom scrollpane, where I recount scrollbar values manually. Everything is OK there. And when I resize the window it also works fine.
The problem appears when I launch application the first time. I see that my scrollbar value is incorrect, and it become correct when I resize window or move the pane placed inside scrollpane.
So theoretically all i need is just update my scrollpane on window start, or after window start. And... I've spent more than week trying to find out how. And the only way I've managed to do this is to call layoutChildren recursively. This is awful of course.
layout() - doesn't have any effect. I tried it with runLater() and placed it inside timer call. No way!
requestLayout() - also makes no sense.
Is it possible just UPDATE or REDRAW or MARK CONTROL TREE AS DIRTY in JAVAFX ???
Ok well, try this way
first gaining the focus, then try relayout options..
blah.requestFocus();
blah.layout();
Well. layout() works. But it shouldn't be placed inside Platform.runLater().
In simple example everything is fine. Then I suggest I have something wrong with my controls.
Thanks.

UIWebView with Custom Gestures

As of right now I have a View with a UIWebView inside of it and some added custom gestures. Some examples of these gesture are Two Finger Slide Right to Go Back, Two Finger Slide Left to Go Forward, Two Finger Long Press for Refresh, ect.. But now I'm facing an issue I knew I would have to face when I began developing this app:
All of the gestures work great unless the UIWebView is zoomed in. Even if it is zoomed in the tiniest bit (or you are able to scroll the web page horizontally), the gestures that require you to swipe left or right are suddenly disabled because UIWebView takes first priority over these gestures.
If anyone can shine some light on this issue or even provide a work-around, I would be very grateful. Thanks!
I'm more familiar with OS X, but could you subclass UIWebView to remove this behavior?

How to change scene with 2-step button method in cocos2d?

Two buttons are in the main menu.
First button is for choosing a game,
and second button is to playing that game.
It's simple to just touch+play. But I don't know how to separate these steps.
How can I store this parameter(selected game) and send it to the method(replaceScene)?
Use CCMenu to create two buttons. Show different scene on pressing those two buttons.
Learn how to handle global data with singletons! Solved.
Great tutorial by Bob!
http://bobueland.com/cocos2d/2011/how-to-make-scenes/
You probably won't need this but for all else having this same issue, use CCMenu. Here is a link to the CCMenu class documentation.
http://www.cocos2d-iphone.org/api-ref/0.99.3/interface_c_c_menu.html
Their documentation is quite useful. Take some time and read and read through documentation and the other useful instruction they have on their site.

Javafx 2.0 ChoiceboxPop UP Position Changes Weirdly

I have a problem with choiceBox in my project.
When i make a selection on choicebox, pop up menu appereance on different areas for all time.
I mean when i make a selection, pop up menu position changes and not even close choicebox.
I am really confused.
Thanks in advance.
Oh, you are using embedded JavaFX. It seems you've encountered issue http://javafx-jira.kenai.com/browse/RT-15970 (Popups aren't drawn in the right place in applet mode if the browser window is moved). It's targeted for upcoming 2.1 release so you may just wait till it.

What is the alternative to putting UIWebView inside UIScrollView

I have gotten UIWebView inside UIScrollView to work, so far anyways, and I have just seen mention on Apple's site that doing so is not advised.
So OK, what's the alternative? I need to display web pages, and I need them to be scrollable, such that if the user swipes leftward then an entirely different page appears coming in from the right. And a reverse situation with swiping rightward.
How is that done without putting UIWebView inside UIScrollView?
Thanks.
Well, you need the UIWebView, which has indeed many features of a UIScrollView, to be able to scroll not only up and down, but also to left and right.
Also, scrolling with two fingers is a no-go, for scrollable elements within a web page, such as textareas can only be scrolled with two fingers.
Three fingers is also not so good because that's not convenient for people with thick fingers...
So my suggestion is that you add a UIGestureRecognizer to your UIWebView and look out for a swipe gesture. Then handle the switching of pages accordingly with animations.

Resources