UIPageViewController stops scrolling after receiving a press - uigesturerecognizer

I have a plain UIPageViewController with a data source, in a tvOS project. The swipes for going to previous/next page work fine, but only until I press the “select” button (UIPressType.Select, pressing down the touch pad on the Siri Remote). From that moment on the swipes don’t work anymore, the page view controller just stays on the current page.
There are no custom gesture recognizers, I don’t override any of the press or touch input methods. What could be wrong?

D-oh, it’s just a simulator glitch. After pressing Return on the keyboard, the arrow keys no longer switch pages, but the Siri Remote gestures work fine.

Related

How do you make a button automatically press without user interaction in Swift Cocoa

This sounds like a weird question, but I am using Swift 2.0 and Xcode to create a cocoa app, and I have a popover linked to an invisible button. I wan't to activate it so it pops up after the user has been on the page for a little while. I have a timer set, but I can't figure out the code to get the button to actually activate at that time, so that the popover will show. I am using a button so I can have an access spot for the popover to show at.
Right now, if you click the (invisible) button, everything shows perfectly. However, I need the click to activate programmatically. I would really appreciate any help!
Thanks!

NSStatusItem app focus

How can my menubar application achieve the same behaviours as 1Password or Dropbox:
clicking their menu bar icons or popovers does not steal focus, e.g. while I am in for example TextEdit and open 1Password/Dropbox, the blinking cursor disappears but the window itself does not go into the background, yet I can type into 1Password's text field.
even though they didn't take focus in the first place, they disappear when I click back into another application
I figured out how mouse over works in the Dropbox popover table view by using an NSTrackingArea with the options MouseEnteredAndExited, AssumeInside, and ActiveAlways.
I am trying to get the same behaviour to work in an NSPopover that opens from an NSStatusItem.
I found a workaround for now. I am able to get the same behaviour by using non-activating NSPanel with a window level kCGPopUpMenuWindowLevelKey and I had to override canBecomeKeyWindow to return true.
Unfortunately I haven't found a way yet to get a NSPopover to behave this way since it's not a subclass of NSWindow.
To set the kind of behavior you are describing you use:
yourPopover.behavior = .transient

What is the hype around the Windows Phone 8 back button?

I know how to implement the back button. My question is about the desired behaviour (as I experienced there is a hype around it that the good implementation of back button is required to sell the app in the store).
There is the official source:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402536(v=vs.105).aspx#BKMK_BackButton
But I have never used a WP8 for more than 5 minutes. I understood that the "Windows" button/key is the same as android home and ios home buttons. Is it true, that the WP8 back should be the same as the android back? (Briefly navigate back through pages (screens/activities), dismiss alerts or cancel confirm popups, or if it is the first/only/final page/activity, the app should exit.)
As I experienced, there is a long-press on the back button, which brings up the app switcher (~ios double home). Is it true that I should not take care about of this button? Is the default behavoiur the same for the remaining buttons (windows, power off, camera (half and full), search)? Should I override them? Can I override them (I think I can use camera, but can I use volume controls for other purposes)?
The certification requirements lay out what the back button should do pretty well. In short, it sounds like how you described the Android back button - here are the relevant requirements:
(5.2.4.1) Pressing the Back button must return the app to the previous page or return to any previous page within the back stack.
(5.2.4.2) Pressing the Back button from the first screen of an app must close the app.
(5.2.4.3) If the current page displays a context menu or a dialog, the pressing of the Back button must close the menu or dialog and return the user to the screen where the context menu or dialog box was opened.
You don't have to handle triggering the long-press, nor do you need to handle navigation specifically (assuming you're using the NavigationService for page navigation.)
You can definitely override the camera button, but search, power, and volume are off limits.

Open new window uppon NSAlert

I'm using a NSAlert to ask the user to enable Accessibility for assistive devices. Is it possible to have a button that does not close the NSAlert that I could use to just open the UniversalAccess prefpane ?
If not, I suppose I've to create myself that window.
Thx.
Normally alerts close when any button is pressed. In Mac OS X 10.5 or later you can use setAccessoryView: to insert a custom view into the alert, which presumably can contain a button that does anything you want.
Note however that you can't specify where the accessory view goes. It might have a button in it but the button would show up in the middle of the window instead of along the bottom with the other buttons. (If you chose a different button style such as a square bevel for your custom button, it might look less out of place.) To have complete control over layout, you need to make your own alert window.

Programmatically controlling a Cocoa Button on OSX (making it invisible and pressed)

I am trying to interface with a cocoa popup menu from an OpenGL button. The actual button needs to be in OpenGL and I cannot stick an actual Cocoa button in its place but when this button is pressed I would like for a Cocoa menu to popup just like the one that comes up when you press the nspopupbutton. It seems that there is no way to get this popup window to come up by itself so I wanted to just insert an invisible button and have it be pressed automatically when the popup menu method is called. Is there a way to programmatically set a button to pressed (this will bring up the menu from the popupbutton) and make the button itself invisible without making the resulting menu invisible?
It seems that there is no way to get this popup window to come up by itself
Sure there is. See + popUpContextMenu:withEvent:forView:
Have you thought about just using a regular NSMenu, rather than trying to finagle the menu from an NSPopupButton?

Resources