I am developing an IPhone cocos2d app with a scene like the the one depicted in the following image (I hope you can see that):
On the right there is a vertically scrollable menu contained in a separated layer (menulayer) which is itself contained in the main scene's layer. On the left there is a back button contained in the main scene's layer.
I am trying to exploit the UIScrollView as described in this link. However, despite I can see the UIScrollView working I am experimenting some problems:
1) while the menulayer actually scrolls it seems the menu does not. In fact when a press the menu item 8 the menu item 4 is selected, when I press the menu item 7 the menu item 3 is selected and so on.
2) the back button only works when the menulayer is at its first position
Do you have any idea of how shall I do to fix it?
You need to check you selectors. calls selectors from proper controls. check it carefully.Your problem shows your menu item 8 th selector bind with 4th same for others. some mis binding of selectors is present in your code so check them properly.
Related
I have a form appearing in one of my views and inside the form I have a picker view, I do not want the preview to appear on the right hand side (as shown by the picture, in red). How would I make this disappear? I'm sure there is a modifier, but I can't seem to find one that will do it.
I want give user the possibility to change some option. So if one touch on a "button" element build by touchevents and SKLableNode, I want to open a smaller modal view with close and other buttons. Has anyone an Idea?
Thanks.
There's an issue when accessing my website (http://www.zero11arquitetura.com.br) on iPad or iPhone with iOS 5 that I can´t fix. When window is scrolled thru code every position:fixed elements click event stop working. Can you please help me ?
This site structure uses a top menu div and a header div with position: fixed css. When user clicks on a menu item window scrolls horizontally until it reaches its target.
Clicking in the menu item is done by jQuery click method on each img tag and scrolling is done by jQuery animate method ($("html:not(:animated),body").animate({ scrollLeft: varDestino }, 1500);)
When page is loaded the menu works just as I intended but, after it scrolls thru menu, and I try to click on another menu item nothing happens. The strangest thing is that everything works again when user manually scrolls the window (by finger).
It looks like that by changing window scroll position by code (jQuery calls window.scroll) fixed elements lost its clickable position references.
Is there any workaround for this ?
Thanks,
I've solved this with a trick. I've created invisible divs over the menu items that changes it's position when page scrolls (simulating afixed element over the real position: fixed menu items). When user clicks or hover over those invisble divs the real ones are called
I've had this problem several times now, and never found a satisfactory solution: If I want to move a group of items with a view all together in Interface Builder, and these items are all on top of a larger background item, I can't put a selection rectangle around the items in the view because any click and drag in the view initiates a move of the background item. In other words, every pixel in the area I'm interested in (and nearby) has a "hand" mouse pointer, no "arrow" pointer is available so I can't drag out a rectangle selection box.
cmd-clicking individual items to build up the group only works when they are separate, and only when there are a few of them. Sometimes I want to select a "pile" of items all on top of each other.
Is there some way to "select for moving" by clicking in the .xib item list? Double clicking a single item selects it for moving in the view, but I have't found a way to add to the "select for moving" selection this way.
So far the best way I've found is temporarily moving the background out of the way and then putting it back but this is unsatisfactory, and wouldn't work with a more complex background arrangement.
How have others done this?
I know what you mean, and I have found a slightly better solution: go to the list view and...
drag either the background view or your custom view up to the root hierarchy level (adjacent to File's Owner)
double click on your custom view and edit away using drag-box-selection
when finished, drag the view back into its original hierarchy position
The key here is that the GUI editor only edits one root object at a time, so moving the background vs. 'foreground' views into separate root objects allows you to edit them separately. Woo!
This is my solution to this problem: Select the background images/object that you don't want to move and set its width to 1 and then, after a comfortable layout editing, restore its original width. This works for me.
Use the left hand side list view and multi-select a range by clicking on the first item in the range then shift-click on the last item. Use ctrl-click to unselect some items if necessary. As items are selected they will also show as being selected in the interface view on the right.
Once have set up all the selected items, cmd-click on the selected items in the right hand side interface view and drag.
In the list of objects, cmd+click each one you want to select them all. In the interface hold command and click and drag the stack of items. Drag them to where you want them and release cmd. If you don't release the button they will rubber band back to their original position.
When you use your safari on iphone, you can see the page control on the right bottom corner.
If you press this button, all pages will show, also they can be edited too.
I try to do the similar thing like this.
I want to press my edit button on the toolbar, then all the subview will appear a delete control on the left top corner(right top corner all ok). I tried to use the tableviewcell(setEditing method), it show the delete control, but isn't appear on the top corner.
Do you have any ideas? Or, Am I doing something wrong by using tableviewcell?
A table-view cell definitely isn't the right approach here. That editing control is a custom one, probably a generic UIButton with a red-encircled X graphic. There isn't a built-in class that'll give you the behavior you're looking for; you'll have to roll your own, probably using a UIScrollView (with pagingEnabled set to YES) with your “page” views laid out in a row inside it.