ive been looking at some tutorials on a toolbar they all are implemented through the navigation controller delegate. Is there a way i could use the toolbar without using the navigation controller?
right now i have a ViewController with a Scrollview in that scrollview i have images when the user uses a touch gesture then i want a toolbar to be viewable and usable to the user just like on the Photo App.
i want to know how i could use the toolbar and make it functional without going through the app delegate and staying on the current viewController.
A toolbar can be created and positioned just like any other view. Don't confuse toolbars with tabbars.
Related
I have a UIPickerView on a UIActionSheet. Right now the UIActionSheet makes the view behind the UIActionSheet not touchable. Is there a way that I can make it touchable? Or is that just how a UIActionSheet works?
I don't believe it is possible to make the view behind the UIActionSheet touchable without dismissing it first. They're meant to be modal, i.e. require the user's attention before being dismissed.
From UIActionSheet class reference (emphasis mine):
For applications running on iPhone and iPod touch devices, the action sheet typically slides up from the bottom of the window that owns the view. For applications running on iPad devices, the action sheet is typically displayed in a popover that is anchored to the starting view in an appropriate way. Taps outside of the popover automatically dismiss the action sheet, as do taps within any custom buttons. You can also dismiss it programmatically.
I suppose a way around this could be that you just create your own view that displays similarly. For example, create a UIView that you can animate the same (slide up) when a button is pressed. This UIView can contain your UIPickerView and whatever else you need (probably a cancel button to dismiss it).
Hope this helps, good luck!
I am creating a reader app and have the kindle app as an
inspiration.
From the reader view (uiscrollview) I wish to present/animate a navigation bar
and toolbar on a tap. Now the app (uiwindow) already has as its root view controller
a navigationVC, which is used for the flow for selecting book category and a book. I then make the top bar invisible when displaying the actual text in my uiscrollview.
I want to display that navigationVC again on a tap, is that possible? I tried in my uiscrollview bind a tapgesturerecognizer to present that controller modally but it didn't work.
Thanks!
It works now, it wasn't as advanced as I thought. Actually, I had an error in my gesturerecognizer handler, which didn't set the UINavigationController's properties :).
I'm now working with view-based application. It's just simple. If I touch the view, the view flips using animation ability of UIView. This is all.
What I want to do after this...is...locating a kind of button in the middle of the main view. BUT!, the button must not be animated while the main view is flipping.
How do I do this?
I dont know this is a correct way or not and i havnt tried this. Just a thought.
Create a UIButton in appdelegate and add that button as subview to the UIWindow.
So you can access that button in anyview and so that you can keep that button in the front and change view controllers.
I have an app built from the UITabBarController starter project. The first tab is part of the main.xib that contains the tab bar. I would like to slide a view up from the bottom on top of that tab's view that only covers part of the screen. My understanding is that you can only cover part of the screen if you make the top view non-modal, but I don't see a way to do that without a NavigationController.
How can I do this?
you can add a UIView as a subview to the current view, and then animate its appearance into the screen using animation blocks, or Quartz or however you would like.
presentModalViewController: is actually a method that belongs to UIViewController, the superclass of UINavigationController, so you can use it from any view controller, not just a navigation controller.
Have you tried using a UIActionSheet? That's an easy way to get a view with a few buttons for user input to slide up and only cover the bottom portion of the current view.
I have a custom UITabBarController and I want it to slide out the old view and slide in the new view whenever a TabBarItem gets pressed. I looked at UITabBarControllerDelegate but it just offers me to decide if the view gets displayed not how (via shouldSelectViewController).
Is there a way to do that?
(My goal is to have a starfield background that looks almost the same on all the 4 views. It should look like the items get changed and the background just scrolls by a little)
Subclass UITabBarController and make it it's own delegate. Now you can intercept methods like tabBarController:shouldSelectViewController: and manipulate any custom views you have added to the tab bar. And if you add your starfield to the tab bar view, and then use tab controllers that have translucent views the common background can show through.
And you can even intercept tab bar controller methods directly like setSelectedIndex: to have even more control to let you fade things out. But just make sure that you call the super version of the method at some point if you do this so the tab bar remains functional.