UIPageControl with scrollview - iphone

In my app i have to use two pages using UIPage Control.
Now my question Is there any need to use UIScrollView to use page controll?

A scrollview and the page control are two separate components. When you scroll the scrollview, you need to change the status of the page control. The page control is just the series of dots.
If you want an easy way to integrate multiple view with page control in a scroll view, you can use GCPagedScrollView that will ease this process and make a lot of things automatically.

Related

Using UIPage Control

I have been trying to build a app where you touch three different buttons and then go to there new view. Its it possible to use a UIPage Control? If so How would you go about doing that. For example I have three views. Apple, Orange, Cherry. I would like the user to flick between these three views. I need them to be three separate views i can't just have the image change.
How would I go about using the UIPage Control and switching views?
UIPageControl doesn't deal with switching views itself, it just provides the dots that are typically displayed at the bottom of a paged view and it can be tapped to go one page forward or backward (instead of swiping the actual view). The actual view that displays the content is typically a UIScrollView with pagingEnabled set to YES.
When the control is tapped, it sends the UIControlEventValueChanged event to its target. You'll then have to scroll the UIScrollView to the right page yourself.

Better to use UIScrollView or UITableView for horizontal buttons?

I have a page enabled scrollview on an iPad. On the first page, I have a child scrollview that scrolls horizontally through image buttons. The buttons scroll the outer scroll view to the correct page. Its basically like a table of contents that jumps to the correct page.
My end goal is to be able to categorize the buttons seen in the child scroll view. So there would be a segmented control that changes what buttons you can see. So maybe one category would be ALL, and another category would be A-M, and another would be N-Z for example.
My question is, should I use a uiscrollview or a uitableview?
Right now I use a scrollview and it is really easy to get the buttons in. I could implement the different categories kind of gimmicky by having all of the buttons in the scrollview and then just showing or hiding the buttons accordingly. I feel that it'd be bad memory usage though.
For a uiscrollview i was looking at using EasyTableView, butI'm not 100% sure if this is compatible with what i want to do or if it'd even be better.
Any ideas for what the best way to implement this is? Specifically, I'm not sure of the best way to change the buttons when I change categories.
Thanks!
Use a tableview when you are dealing with data that is best expressed as sections and rows.
I think for your situation I'd have a UIView subclass that can display the images you need for a given category. Stick that on the outer scrollview as needed. You can keep memory low by only keeping the currently visible view and the ones on either side on the scrollview. When you scroll to a new location you can recreate the view needed for that page, and the ones surrounding it. Then you release the ones that are far away and let the system reclaim their memory if needed.

How can I put the three dots showing on what page you are on my views?

I have UIViewControler with three views and UISwipeGestureRecogniser and I can't figure out how to put the dots that indicate on what page you are (like on the home screen on iOS.)
You are looking for the UIPageControl.
Just so you know, you have to update this control as your user changes from "page" to "page". It's essentially a passive display. (You can't, for example, tell it to automatically update when a scroll view scrolls.)
You want to checkout the UIPageControl

ios view transitions animations, page curl

i'm new to the ios sdk and i'm developing my first app. i need to implement a curl transition between multiple views; giving the user the impression they are reading a book. the documentation only talks about doing it between two views in a single view controller. like i said i need to implement this with a stack of several views. do i need to use more than 1 view controller? if so how? or do i have to use 1 view controller but use say 10 views in a stack? again how would i go about doing this.
would greatly appreciate your help.
Ideally, you would use only two views for this: one for the view being animated (to an offscreen position), and one for the view underneath. To handle multiple flips, you would animate the top view to its offscreen position, then fill it with the data for the page underneath the current page and then insert it underneath the current page. For the subsequent flip, you would animate the current off the screen, etc.
You could alternatively use a number of views that matches the total number of pages you want to display. This might make your coding simpler, but it would eat up a lot more memory.

iphone search swiping

I am wanting to have half of a view taken up by a page control. The page control will allow the user to swipe from left to right on a selection of 5 different table view lists.
Is this possible?
What is the best approach.
Will each table view that will be put into the page control need its own controller? Or am i totally off the path.
The example i want it flow like is the screenshots of apps in the app store app details page. Except for screenshots i will be showing lists of data.
Thanks in advance
It sure is possible. Use a scroll view with paging enabled.
And you dont need to have separate controllers for each table view. You can handle multiple tables in a single TableViewDelegate, as all the delegate methods have the table view a parameter.
Check PageControl and ScrollViewSuit code samples.
And about covering half the view, well, your scroll view can be any size.