UICollectionView scrolling swipe direction on tvOS - uicollectionview

I have a collection view in a tvOS project. The cells are fullscreen photos. The view has the default scrolling behaviour: in order to display the next photo, I have to swipe from left to right. This is completely opposite to the “natural” scrolling behaviour used elsewhere in the Apple ecosystem.
This behaviour (swipe left-to-right to display next) makes sense when there’s some apparent focus on the screen, but when there’s just the fullscreen content, it feels completely backwards. Is it possible to change it, swiping right-to-left to display next photo?

I have found a suggestions on the Apple Developer Forums to use UIPageViewController instead. That works, the scrolling direction is as expected.

Related

Invert Scrolling in UICollectionView of tvOS

In my tvOS app, I have a UICollectionView. When I scroll from top to bottom on the Siri Remote, it it moves the view down. This is the opposite of how most Collection Views would work. I want it to behave like a trackpad, when you scroll from bottom to top, have it move the collection view down. How can I invert this scrolling behavior?
You don't want to move away from Apple TV standards. Your goal in making a tvOS application is not to create an entirely different piece of software, but to make your application feel like an extension of the Apple TV. This creates a better user experience when users open your app and everything behaves just as they expect.

Swipe without actually swiping in iPad?

Is it possible to make a view move either to the left or right in the iPad, when I tap on a button, instead of actually swiping on the view.
This can be seen in the iPad when I'm in the screen after the search screen, and I install an app, the screens move to the left by itself and the app sits in the right place and starts installing.
Any suggestion will help.
The home screen is actually a UIScrollView with paging enabled. So it just moves to the next page (with scrollRectToVisible) if a new app is installed. So if you want to have something like that, I guess you have to implement a paging UIScrollView. Just search for that and you will find a lot of good tutorials.
Some further resources:
UIScrollView reference documentation
A paging UIScrollView tutorial

iOS App Portrait and Landscape Views

I'm trying to make and iOS app with both portrait and landscape views, but if I open it and change the orientation to Landscape, some buttons got offscreen, after going to IB and reordering the buttons, in Portrait they go off screen.
After googling, I dont have ANY ideia how to 'change' views according to orientation.
Could you guys give me some help?
Ah, also, Apple Support Documents seems pretty useless to me :P
Thanks!
There a method - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{}
which is useful in such cases.
You should change autosizing properties in IB (they're in the same place where frame size is) or change autoresizingMask properties of your inner views and controls programmatically. This controls what happens to the elements of your screen after it gets resized (for example when the screen is rotating). You can glue your components to left or right or both, top or bottom or both and similar. Play with it, it's pretty powerful and you don't need any code for that if what they can do is enough.

Scrollbars hidden in Lion. How do people scroll horizontally if they aren't using a trackpad?

I have an app that has a list of tags on the bottom of the window. This list grows over time and needs to be scrolled horizontally. This was fine before, but now in Lion they scrollbars automatically hide. If using a mouse without a horizontal scroll, there's basically no way to scroll these now in Lion. What are the best practices here to solve the issue? Do I need to get rid of the scrollview and change it to a "More" list or something?
If the user doesn't have a device available which supports touch-based scrolling (e.g, a touchpad, Magic Trackpad, or Magic Mouse), the horizontal scrollbar won't be hidden by default. It's controlled by this preference option:

iPad Gestures with UITableView

I am using a UITableView to display a list of products in an iPad app. I would like to make this list scroll up and down, not only by swiping the finger, but also buy flicking the iPad vertically downwards (to scroll down a bit) or upwards (to scroll up a bit). I don't know what this iPad gesture is called and how to implement it with a UITableView. Can someone please explain or provide me with some code/tutorial?
Thanks.
You need to use the accelerometer for that (it's not a gesture, a gesture in a movement on the screen with fingers).
Have a look at the UIAccelerometer doc, you will find some nice example for what you're trying to do :
http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/MotionEvents/MotionEvents.html#//apple_ref/doc/uid/TP40009541-CH4-SW5
Hope this helps,
Vicent