iOS Navigation bar - iphone

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.

Related

Scrollable tab bar in swift

I'm using a tab bar view controller with more than 5 items and it's showing as the fifth item an item named "More". I want to avoid that item and make the scrollable tab bar.
ThanksImage
I don't think you can subclass UITabBar and get what you want.
You probably need to create this as a custom UI object. You could create it using a UIScrollview.
If you are a beginner then this is likely over your head.
I know this is old but maybe you could add a UIView to a Tab Bar Controllers scene (not the actual controller) and then add a UICollectionView on top of that same UIView of yours to create a custom Tab Bar. You would have to change the size and flow layout for the collection view but other than that if you are familiar with switch statements and delegates I don't see why it couldn't work!

Mimicking iOS notification view

I am trying to mimic iOS 5's notification view (when you swipe down the view appears) for hub with a left swipe in my view. I created a mimic for a single view controller by adding the hubview as subview and changing the origin of view when making swipe. But With this approach I have to add it to every view I implement in my app. I want to add it to UIViewController as a category. I am not sure how to proceed at this point.
If you don't want every viewController to have to handle the menu then I would suggest having a root viewController that acts like a container. It has a subview that displays the content from your various view controllers and it also has the controls for your menu and any other overlay information you may want to provide.
A category won't work in this case but subclassing will. Just ensure that all of your view controllers are sub classes of the view controller with this functionality implemented.

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.

Overlay view over tab viewcontrollers

using iphone sdk 4.1. I want to overlay a small view over all my tabcontroller views. this will present itself on the push of a button from one of the tab bar viewcontrollers but then i wish it to remain in place even if the user tabs to another view. How to do?
Thanks
Look at the Apple docs for UITabViewController - you want to add your overlay as a subview of the "view" property on your UITabViewController. This will make it appear above everything on the screen (even over the tab-bar itself, if you're not careful).
You can change the tabs as much as you want - that should just switch the value of the content underneath.

horizontal scroll menu in 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.