Set correct cursor when a button overlays a scroll/text view? - objective-c

My storyboard includes a scroll view (uneditable but selectable) that is overlaid with a second view containing a couple of buttons which are initially visible and eventually hidden. As I move the mouse over the scroll view, the text cursor displays as expected. But when the mouse moves over the buttons, the text cursor remains. I would have expected the cursor to change to an arrow.
What is the proper way to make the arrow cursor appear when over the buttons, when overlaying a scroll view? Can this be done within the storyboard or am I missing some code?
Thanks!

Related

Adding a scrollview and get it to zoom

In my iphone app, you get a UIView with a background image and a "start button".
When you hit the start button, the start button will be hidden, and your background aswell. You will see another image. You will also get a "back button".
You should be able to zoom the image and scroll around.
I want everything on the same UIView.
When you hit the back button, everything should get back to the first background image and the start button, and you should not be able to zoom or scroll.
How can I do this? And is it possible at all to hide a scroll view in order to just show a regular screen, in the same view?
Thanks in advance!
EDIT: Ok, I know how to hide the scroll view now, but when the scroll view is shown, you can't scroll! I have made the scroll view bigger than the screen and put a label below the "original screen". How to get it to scroll?
Add a UIScrollView to the main view in which you have the zoom/scrollable image. Simply remove it when the back button is pressed.

iOS - UITableView with text field in bottom cell

I've got a table view (which has 15 cells) with a text view in the bottom cell.
When I try to enter text in the text view that is in the bottom cell, the keyboard is appearing over the cell/text view and I cannot see what is being typed.
How can I create a view similar to the contacts view where user can still scroll to bottom cell even when the keyboard appears?
Check out Apple's KeyboardAccessory sample code.
The sample also shows how you can use the keyboard-will-show and keyboard-will-hide notifications to animate resizing a view that is obscured by the keyboard.

Custom tooltip that can overhang NSWindow?

I need to create a custom tooltip for my app yet I want it to act like a normal tooltip and overhang the top level window if the cursor is near the bottom or right edges. Do I need to make the tooltip control an NSWindow itself or is there a way to get an nsview to pop outside the window bounds.
So the solution for this was to create an NSPanel that is setFloatingPanel:YES. On mouse enter of the view I call orderToFront on the panel, on mouse move I setFrameOrigin and on mouse exit I orderOut.

Paging Horizontally with vertical scroll on each page!

In my app I use a page control and a UIScrollView to page horizontally, I'd like to be able to enable vertical scrolling on each page. Now I know you can nest UIScrollViews in order to achieve this, there is however one problem in my project. Each of the pages uses a view controller consisting of a view, with a background image (different image for each page). This background image should not move while scrolling up and down.
Now what I want is the ability to have buttons, regular rect buttons, which I create in Interface Builder (since I want to be able to design and update the positions easily) and which then can be scrolled vertically.
So it should be like this:
You see a screen with a page-control on the bottom, above it an image with buttons over it. When you scroll sideways, you go to another page, again with an image (another one) and with different buttons. Now whenever you scroll vertically on a page, the buttons should be scrollable (so I can have a LOT of buttons on 1 page), but the image should maintain it's position.
So I figured, I just add another scroll view on top of the view with the background image. This works fine since I now have my buttons hovering over the background image and I have a separate nib file for each page including the buttons. But when I do it like this, the scrollview with the buttons becomes un-scrollable vertically. I don't know why this is happening, so could anyone suggest me how to achieve the wanted result?
I'd be really really grateful!
Thanks,
Fabian

iphone app navigation bar multiple items

how can I have a back button and another button both on the left side of the nav bar?
Do you also need the title? If not, you can simply place the button in the center area. Otherwise, if you also need the title, you will need to create a UIView with a label and a button in it and set that as the center view. You will have to set the label's text manually if the title of the view ever changes.
Or, if you don't care too much about the back button, you can create a button that looks like the back button and put your other button next to it in a parent view that you use as the left view. You would have to manually handle going back when pressing the back button, and unless you got an image that looks like the back button, your button would not have the arrow shape.