I have a navigationcontroller and on click of a row I want a sheet:
self.modalPresentationStyle=UIModalPresentationPageSheet;
that comes up and takes the middle space of the iPad (transparent).
This works fine I want this sheet which is itself a viewcontroller to have a table view within it.
When the user clicks on the table row of this sheet, it should navigate and another view should come in as a sliding animation effect, but I am not able to add another navigationcontroller to this view.
Is there any way to get this sliding animation effect without navigation?
Check out this tutorial http://www.nanaimostudio.com/blog/2010/6/30/modal-form-sheet-navigation-controller.html
The tutorial is not using a table view but in principle it works just the same.
Related
i am trying to set up a pageviewcontroller that has embedded buttons ( those that dont move when the page view is swipped left or right but are constantly visable )
i have the standard viewcontroller, the pageviewcontroller, and another viewcontroller that has an imageview. the problem is that regardless where i place the buttons they move off screen whith the swipe an reappear with the new image.
is there a way of embeding them so they dont move off each swipe?
ive even tried placing an embedded navigation controller on the first viewcontroller but with no success.
thanks for the advice.
if you don't want them to move, you have to put them in the view controller that contains your UIPageViewController. So they will be only one instance of the button (not one for each pages).
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
I am trying to show a modal view controller that hovers over another viewcontroller. Now the problem is when I use pushViewControllerAnimated the view controller that gets pushed will be as big as the whole iphone screen. I just want it to be half size of the screen.
How to adjust the size?
What exactly do you mean by half size of the screen?
If you are interested in the Facebook-like side menu, have a look at:
https://github.com/Inferis/ViewDeck
or https://github.com/BenHall/ios_facebook_style_navigation
If you are interested in an alertview-like small modal view controller, you might:
Consider using an alert view and adding some subviews
Read http://devblog.bu.mp/easy-partial-screen-modals-on-ios if you really have to use an UIViewController for that, which is not recommended by Apple (http://blog.carbonfive.com/2011/03/09/abusing-uiviewcontrollers/)
Hope this helps.
I am struck with this thing.. Dont know how to implement this one...
My requirement is When..user clicks on the second half of the screen.., Only the second half of the screen should change, So.., modalViewController and pushViewController wont help I guess..,
The first half of the screens remains fixed. Depending on the control logic, I can then navigate to the next respective second half screen and the first part of the screen remains fixed
Add two subview to your view and listen for touches (touchesBegan:withEvent:) on them in your view controller.
Create your own split view controller which mimics a navigation controller but manages its own views. Have a sub view for the bottom part and animate changes / navigation from this controller.
I posted earlier but am running into similar problems again. Basically the way that my app is setup there is a top bar that is basically just a static image that has UIButtons placed on top of it. That is the Main View Controller and is persistent no matter what view is shown beneath it. I can't use a navigation controller because it is not possible to change the height and I need the bar to be significantly larger than a navbar. However my bar is functioning in much the same way. There is a "Home" Button, a "Back" Button and several destination buttons.
I understand how to switch views from say the home screen. My confusion comes with the back button. In order to press back the app is going to need to know what view is currently being displayed so that it can be removed from view and a new subview can be added. Ideally I would use the UINavigationController so that I can push and pop views which is really what I want to do here, however that is not possible because of the visual problem.
Does anybody know of a method that returns the current displayed view so I could do something like the following
[currentview.view removeFromSuperView];
[self.view insertSubview:experienceViewController.view atIndex:0]
You can use UINavigationController with the nav bar hidden. Put the nav controller inside a view that does have your jumbo toolbar and you'll have access to the push/pop behavior you're looking for.