I would like to make a popupwindow like this:
http://www.touch-code-magazine.com/showing-a-popup-window-in-ios-class-for-download/
However, It doesn't work on my xcode because i am developing an app for ios5, using a storyboard.
Do you know any othere examples similar to this?
thanks in advance.
There is no reason you cannot create the view you need using a Nib file and then add that view pro grammatically with a VC controlled by storyboard.
Storyboards handle the kind of window you are talking about.
Make your segue "Modal", "Form Sheet", and "Default"
Then your new window make the size "Form Sheet".
This should get you something similar to what you want without resorting to NIBs.
Related
I'm currently developing a framework in Swift that includes a storyboard that I designed myself. What I need to do is that the user that uses my framework can create a segue to my storyboard. Then I'd like to be able to recreate a segue to the user storyboard that that I "leave" my storyboard.
How could I do so ?
Thx !
Your question is vague and I am not entirely sure what you are asking. However, I can't comment yet so I will try to answer with what little I know. It seems like you are asking how to transition storyboards. The simplest way is using a UIButton in your storyboard. Open up storyboard and go to the navigation controller. Then, add a button to the Nav Controller. Right click (or control click, depending on your settings), and drag the line to the main storyboard. Lastly, click on the show option. When a user clicks on the button, it will immediately switch to the main view controller. Don't forget to add the button in the view controller. Hopefully, this is what you meant and helps. If you wish switch view controllers in code, this is a duplicate and you should go here: How to switch view controllers in swift?. If this doesn't answer your question, comment and I will try and help. For future reference, please provide more information: snippets of code, pictures, anything that better demonstrates your problem.
I fixed it by getting the instance of a new view controller added on the user storyboard with the view controller identifier like so :
ProcessOut.backViewController = storyboard?.instantiateViewControllerWithIdentifier("back")
And then I present it like I would present a normal viewController from my storyboard.
I'm working on an iPhone app again and I'd like to setup one view to be seen before another. I've added the view to my window and have specified the viewcontroller code that I'd like to use, but I can't find where on earth xcode specifies which viewcontroller in the window is displayed first. I'm sure it must be something obvious. I thought that the appdelegate seemed logical, but I don't see it displayed there. Any help? :(
Usually it is in the UIApplication setup code. Also try looking in your xib file as to the linkages setup there!!!
Without seeing more code or your setup, this is the best I can do!!!
As you can open the MainWindow.xib file you can see the part on the windows that specifies that from which viewcontroller it is gona load. (Like "Loaded From "RootViewController""). From the inspector of the window there is an option called NIB Name that gives you a list of view controllers available in your project.Changing these will change the setting of from which view controller you want to begin your app.
Hope this will help you.
Is it possible to make an advanced UI, such as the twitter app for iPad, using storyboards? I am new to them and all the reading I have done on storyboards make them seem rather simplistic. Can you do most everything you could with nibs with a storyboard?
A storyboard isn't much different from a group of .xibs. The advantage they provide is that you can see the relationship between the different view controllers. So sure -- anything you can do with a .xib you can also do with a storyboard.
I have an app planned out that needs to have a custom menu throughout the application. Its not a toolbar or anything like that so i don't think a regular UINavigationController or a UITabBarController will do the job.
What would be the best approach to creating this custom menu that appears in all views? I thought of just creating a view with the custom menu and alloc it for each view but it seems like a bit of an overkill. Extending UINavigationController might also be an option, but I'm not sure.
Would love to hear your opinions.
Thank you! :)
Shai.
The UINavigationController and the UITabBarController are pretty much always the best way to go because they have view and memory management built in. Here's what you can do:
Create a subclass of UITabBarController that hides the tab bar. See the last post on this page: http://www.iphonedevsdk.com/forum/iphone-sdk-development/4091-uitabbarcontroller-hidden-uitabbar.html Make this UITabBarController accessible on a singleton object.
Create a view for your menu and some IBActions corresponding to the menu buttons.
When a menu button is pressed, you can manually switch the tabs of the uitabbarcontroller as follows: tabBarController.selectedIndex = x;
I agree with ade. I think a popover controller added to a shared class would fit best to the iOS style (I'd put it in AppDelegate in order to have reference to it from anywhere and to avoid creating multiple instances and using only one which you will keep displaying / hiding whenever you wish to see the menu)
I can think of two options: 1. Subclass UINavigationController, hide the standard UINavigationBar's view and create your own view and put it on top of it (ugly and who knows what the results will end up like). 2. Add the menu as a subview of UIWindow so it stays on top of everything throughout the app.
I think the best way is to create a custom tool bar and use it across the app. Subclassing UINavBar is another option but not recommended by Apple so I would not go there.
I'd look into using a popover style menu such as WEPopover
Basically my app lends itself perfectly to a tabbarcontroller, but I do not want to use the default tab bar. Instead I have created nice graphical drawings of tabs which I want to use as the controls for my app... Does anyone know of the best way to do this? Am I goin to have to write all the functionality for my control from scratch or can I use UITabBarController somehow?
Many thanks
Jules
you can use button as tabbar then make function on that like you see the app 24X7 locksmith service i implement buttons there