Next and Previous button for looping scrollView - objective-c

I have a UIScroll view that scrolls between 4 different XIBs. I would like to disable the ability of scrolling by touching the scroll view. There are two buttons at the bottom of my app that I would like to scroll forward and back in a loop. The ViewController is forced to be in landscape orientation, and the scroll view dimensions are 568w x 217h.
Here is an image of the layout: Click Here

What you are tying to do is called "paging", and in my opinion a scroll view in not the best way to do so... here is a great project that looks like what you need:
https://github.com/caesarcat/InfinitePagingView
Hope this helps

Related

Can't seem to achieve the same effect on my slide menu as Any.Do

I am trying to create the same type of slide-up/pull-up menu (from the bottom) as the Any.do iPhone app, but not having any success.
The issue I am running into is the app was built with storyboards so I am thinking I might have to scratch that idea and use just code.
Any ideas?
There is no need to get rid of your storyboard to recreate this, that's what IBOutlets are for. Any way, it looks like this was made by creating a UIScrollView that takes up the entire screen. Then add a UITableView to the upper section of the scroll view. Mind you in order for this to work, you'll need to disable scrolling on the scroll view in the background.
From there you can programmatically add the other elements to the scroll view to be rendered off screen, since there are only three they can probably just be buttons. And finally, since scrolling is disabled on the background scroll view you can add an image with a UISwipeGestureRecognizer at the bottom of the screen to manually change the scroll view's content offset property.

Shrink detail view controller animated when menu slides at UISplitViewController

I'm working with UISplitViewController on iPad and want to override it's behavior. When user taps on bar button, there are slides menu from the left side of screen. But it overlaps detail view controller. Can I make it so the detail view controller shrinks animated when the menu appears and expands when the menu disappears?
I don't think it's natively possible, so I think of 2 ways of doing this
1 - try and error: study the split delegate calls to see when you should shrink the content in your detail and tune it up until it looks smooth
2 - create your own "split" controller and do all the resizing/presenting by yourself

UIScrollView. How to use the scroll bar on the side?

I'm working with Xcode developing for iOS using a UIScrollView. I got the scrollview working just fine.
But my issue/question is dealing with how to use the scrollbar on the side of the scrollview:
For example, I have dynamically created 2000 buttons inside the scrollview, in the simulator. The buttons are lined up vertically, so I have to scroll down to see all of the buttons. I do not want to simulate scrolling 30 to 40 times in order to get to the 1500th button.
I have the code to go to the last button, and to scroll to top. But I was wondering if there is anyone that can give insights on whether I can use the scroll bar on the side of that scrollview in order to help me navigate the scrolling better.
That bad boy isn't a scroll bar. It's simply a visual indicator of the current location. There are ways to scroll programmatically, but I'm not sure that's really what you want to do.

How do you create a slide out tableView on the right instead of the left of iPad Master-Detail Application?

If you create an iPad Master-Detail Application and use Portrait orientation, it gives you a slide out tableView on the left.
1. How do you make it to show on the right?
Also, in the landscape orientation, it is split in into two views.
How do you make it so that it will be the same as the Portrait View, like slide the TableView out?
Is it possible to adjust the size of the Detail View?
If you dont want two views in landscape, why do you need a splitView at all? You can just have a UIView with a popover button on the top bar. Then you can add the tableviewcontroller to the popover. To show it to the right you can define the rect or use the rightbarbuttonitem to add the popover.
You can have master on right by passing masterviewcontroller as second parameter to the array assigned to splitViewController.viewcontroller. However, you cannot resize the master and detail views. Hence you will end up having a bigger masterView than the detailview.
Looking at limited functionality of UISplitViewController, it may not be possible to have master on right(properly working as per your requirements). You can have your own controller to get this done or try using opensource options like MGSplitViewController.
you may also like to look into this discussion

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