I am working in a app I an considering making a splash screen with a uiprogression bar, taking the time the loading of the app lasts...
I am not sure how to do this.
Can anyone give me a few tips please.
PS: I am asking this because I think I cannot add a class to launchscreen... So is it possible to do this in the launchscreen? If so, how?
You can't do much on launchscreen since, even custom font's not are loaded on it. Just create initial navigation controller, where first view controller will have your progress bar, write a delegate for your progress bar so when it will finish loading it will do action.
You can't do anything on launch screen. But If you want to show uiprogress bar on launch screen then you have to design a view controller just like your launch screen and show it right after launch screen, do your work while uiprogress bar is showing when you finish your work then show next controller.
Related
I would like to show a progress view while my app is downloading files when starts. Loading view should be active until download ends, then, main tab controller will be shown. Which is the best method to reach it? Thanks
I think, loading the "main tab controller" first and then adding a view on top which shows the Progress should do the work.
Maybe MBProgressHUD (GitHub) could be interesting for you.
It's nice if the user will see little more then only progress. So make the View in Front translucent.
I am new at ios programming and I need some help, can't figure out how I am going to switch between two views without firing a button event
I have a splash screen waits for 2 sec then it should go to main view. I don't know how I am going to acquire the main view's reference and navigate to main view!
Any tutorial about switching between views programmatically?
Thanks for your help.
Cheers
For Splash screen you have to name it Default.png and in appDelegate didFinishlaunchingMethod, you have to add view controller to window. the Default.png is automatically reference as a splash screen. try it out
Start with one of Xcodes default projects, and see how they are setup. They should give you a window, with a main view out of the box.
If you add a Default.png image file to your project, it will automatically be used as a splash screen and displayed upon startup. However it will not be visible for 2 seconds, but rather as long as it takes for the application to start.
If you want it to be displayed longer, you will have to add a UIImageView with the same png image to your mainview, then remove this from your mainview after two seconds.
You can use performSelector:withObject:afterDelay to trigger the hiding of the UIImageView after a period of time. However this goes against Apples design guide, as the splash screen only is meant as a ting for the user to look upon before the application launches.
As for adding new views, I recommend using a UINavigationViewController. Using this enables you to navigate back to the main view, and you also get a nice animation as a transition between the views.
If you want to switch between views you use addSubview
maybe this tutorial will help ->Tutorial
Wanna create a custom splash screen for the iPhone, but Im asking for opinion from all of you.
For what I understand, the splash screen is only a image (Default.png), so if I want to make the splash screen longer, the only way I can do is create a image then add the subview to the front? Then create a timer to call a method to remove the image from the view.
But then I want to create a media type splash screen, which will show audio, video and etc. So the question is what flow will it look like. The only way I think of is create a ViewController, then present it in a modal view. Later I also will add in an option to detect a tap from user, if tapped then the media will quit/hide/dismiss the fake splash screen and present the main view controller.
For now the flow of my thinking is like this:
AppDelegate --> RootViewController --> SplashViewController(Modal View)
is it possible to make it like this?
AppDelegate --> SplashViewController --> RootViewController
Is there any other way to show the media when the app start?
Any answer is appreciate, thank you in advance.
set the root view controller of your navigation controller to Be your splash screen.
Then just dont allow the user to navigate that low.
after the timer lapses, push onto the nav with animation:NO and your splash screen will be replaced.
Alternatively you can add your splash.. and when the timer lapses, you tell the splash screen to remove itself from its parent view, then add your root controller.
I'm wondering if it is possible to start my app with all my tabs in the "up" state and show a "landing" view to the user. Kind of like a welcome/quick start. When they select one of the tabs, it switches views as normal.
Will you point me in the right direction?
Kind of like this:
If you're using a UITabBar/UITabBarController, I think you must have the selectedIndex set to some legal value. I don't think this is possible, nor can I find an app on my iPhone or iPod that mimics the behaviour you're looking for.
(The App Store app is as close as it gets, where it looks like it has an empty tab bar before it loads data from the Internet, but it could very well be that they are just re-using the Default.png and superimposing an activity indicator during loading.)
Note that if you tried to submit your app to Apple, they could easily reject it for using non-standard UI.
The way I would probably do this is to create a new ViewController that's just for this screen, but make sure it's last in the viewControllers array managed by the UITabBarController. That way, when you show the tab bar on the screen, you get the 4 tabs and the more button, but the currently selected view controller is not in the bar, meaning that all of the other tabs are unselected.
Once the user has satisfied the condition for showing the screen, you can discretely remove the view controller from the tab bar, and the user will never be the wiser.
I'm writing an app that has a 5 item TabBar. When launching, I want the app to show the contents of the view for the first item, without showing the Tabbar. I want a hidden button to cover the full screen so that when I tap anywhere the TabBar pops up from the bottom. I then want it to hide itself again after a few seconds.
I guess it isn't vital that it not show the TabBar on launch if it will hide itself after the predetermined time frame.
I'm new to programming, and I'm having difficulty making this happen. I've looked at the suggestions for similar questions, but they don't seem to help. Any suggestions for making this happen?
Look at the example code "The Elements". It hides the tab bar when you select an element.