horizontal scroll menu in iphone? - iphone

i want to create exact screen like above... should display horizontal scroll options below the product(mobile) image.
and the screen should have swipe feature when swipe to left it shows next product(mobile)
how to design this? which controller to use
can i use tab view for horizontal menu??
please give some examples and ideas.....

It looks like you need a UITabViewController to manage the different sections.
The UITabViewController manages a bunch of view controllers (one for every tab). One of those will be a UIViewController managing a UIScrollView.
Have a look at th e apple documentation for both those controllers and the UIScrollView. Scroll view has a property to activate paging.

Related

Load a view controller created inside a storyboard as a subview (into a part of the screen) of another view controller

I am currently developing as app for iPad. And I need to create a tabbar. The problem is that, for design purposes, I need the tabbar to be on the top half of the screen and not on the bottom as it is on the default tabbar controller.
Once the tabbar is on top I want that when a button is touched, the subview bellow the tab is changed. Furthermore, the subview that should be loaded was alson designed inside the storyboard. The following sketch shows what I want it to look like:
On my research I found a solution (here) for putting the tabbar on top. Now my problem is on loading a subview bellow it.
I tried it with [self.view addsubview:theNameOfTheViewCreatedINStoryboad.view] but the application simply hangs when I press the button.
I think that is because I am not specifying anywhere what should be the dimension of the new view or where on the scree should it be placed. The reason for that is because I do not know where it should be done.
Can anyone give me some lights on this matter? Is the referred approach the best one for putting a tabbar on top? How can I solve the subview problem?
Glad to see you are using a toolBar and not a tabBar. Even better would be to create a custom content view controller.
You should be looking into using containment:
UIViewController containment
How does View Controller Containment work in iOS 5?
positioning UIViewController containment children
check out the docs

iOS Navigation bar

I want to build an application with this kind of navigation between views:
a scrollview with text items (like a menu bar). Check Radio-Canada app on app store (free).
How to proceed? I know that I need a scrollview, but after that... You have to understand that I don't have too much experience with iOS 5.
Check this snapshot for an example:
snap http://www.eazyrf.com/Snap2.jpg
For a horizontal scrollview, just create a scrollview and add buttons to it. The white 'selected' background you clipped can be created by loading a white oval and using resizeableImageWithCapInsets: to extend it to fit the text. Link the button's click event to a function that presents the new view. If this 'menu bar' acts like a standard iOS tab bar, you'll need to manage the view hierarchy yourself.
For a vertical scrollview, most likely you're looking at a UITableView contained within a UINavigationController, where the class implementing UITableViewDelegate for the table view is responding to didSelectRowAtIndexPath by pushing a new view onto the navigation controller. This is a common pattern to implement what looks like a scrolling list of items, where tapping on one cell causes a transition to a new screen.

Implement UIToolBar so it acts like a UITabBar and UIToolBar at the same time

I have an interesting problem. I have an app that I'm developing that involves photos so screen space is at a premium. Also, using disappearing and reappearing nav / tool bar controllers (like in the camera app) doesn't make sense for me. In a perfect world, I'd use a UITabBar to switch between the 4 main navigational view controllers that my program implements, however I also am going to need space for a toolbar right on top of the tab bar most of the time. These two components take up too much space between the two of them so I need a way to save some space.
That's where I came up with the idea of using a toolbar to implement the functionality of both the TabBar and ToolBar. On the left side of the ToolBar would be the 4 buttons that allow access to my 4 main navigational view controllers. The one that is currently on the window would have it's button depressed. Then there would be a divider, and on the right side of the tool bar would be buttons specific to whatever view is currently on the window.
Anyhow, I'm just wondering if anyone has any clever ideas on how they'd implement this?
wat do u mean by left and right of toolbar??? adding a tab bar will not affect ur view size. when adding a toolbar, well yes it does affect ur view size.
my idea wolud be add a toolbar to the top of ur view and u can make it visible only when the user taps on the screen. until then keep the toolbar hidden. when the user clicks for the second time on the screen hide ur toolbar. this way u can have the whole view for ur pics and also have a toolbar for giving options.

How to display buttons under a TableView at the bottom of a screen?

I am trying to build a screen like this:
I've already built the navigationItem (the "title Bar") and the table view, now I'm looking for a way to add the buttons under the table view.
The result should look similar to a tab bar, but as the buttons are used to influence the the number of displayed records in the table, I'm only dealing with one controller.
How do I achieve what I'm looking for?
I can think of two ways off the top of my head you could accomplish something like this.
You could create a UISegmentedControl and place it in your tableview's tableFooterView property. The buttons would only be visible underneath the tableview and would scroll with the table.
You could create a UIToolbar, or ideally display the toolbar you get for free with the navigation controller, and place a UISegmentedControl there. This way the buttons would always be visible regardless of where the user has scrolled to.
Hope this gets you started.
A couple of approaches suggest themselves:
1) You could use an actual tab bar. If you do that, your outermost view controller has to be the UITabBarController. Some searching on "UITableView inside UITabBar" and the like should give you more details.
2) Set the frame of the UITableView to be less than the whole screen. Have both it and the buttons (which might well be a UISegmentedControl) be subviews of a common container.

iPhone/iPad/iOS: tricky use of tab bar controller

Trying to implement the following behavior on an iPad.
I have a map-centric application which uses a tab-bar interface. The tabs at the bottom allow the user to choose between looking at the various different types of points that are marked on the map (e.g, think of the tab-bar items "food", "lodging" and "gas", where the "food" tab shows a listview of all the restaurants in the area, and so on).
The top half of the screen should always show the map. The bottom half of the screen is what should be controlled by the tab bar. However, there needs to be one tab on the tab bar that will make the map full-screen (not covering the tab bar itself, but covering everything else).
My impulse is that what I need is a map-view which always covers the whole screen, and then a tab-bar-controller that controls a view which sits on top of the map view, and then when the user selects the full-screen-map tab, the content view just gets hidden. But how do I actually do that?
Thanks!
I would go so far to say that this barely possible using a standard UITabBarController. Instead, you should use the UITabBar directly in your interface and then link the actions of the items directly to your root view controller. This controller should then lay out the content area accordingly. This could be done quite easily by giving your nib a structure like this:
- ViewController
- View
- View // place contents here
- TabBar
- Item1 // link action to ViewController
- ...
Depending on how generic you want your solution to be, you could also implement a custom subclass of UITabBarController that does the custom layout. The above solution is the simplest and might require the least code.