What is the main Storyboard called in VLC ios? - ios

Im trying to modify and learn from the ios open source code for ios.
Its a mixture of Objective C and Swift.
Is it possible to tell from the repo what the main storyboard is called? Id like to add a login screen that redirects back to the Initial screen but not sure how to get the Storyboard name
Here is the repo
https://github.com/videolan/vlc-ios

There is no “main storyboard”.
The app is created from the app delegate (like all apps were “back in the day”).
https://github.com/videolan/vlc-ios/blob/master/Sources/VLCAppDelegate.m
You can see in the function applicationDidFinishLaunching it creates a tabBarController and window and the passes the tab bar controller into a coordinator that will populate it with other view controllers.
This was the norm for all apps once. And is still a perfectly viable option for apps now too.

Related

iOS UINavigationController loading to white screen but app is running

I'm developing an app with a single ViewController. When I run the app, it goes to that default LaunchScreen that is included when you start the file, and then proceeds to the ViewController. Everything is fine, it loads and does everything it's supposed to, which includes some audio feedback.
From my storyboard then, I've clicked on the existing ViewController and then Editor -> Embed In -> Navigation Controller. Navigation Controller appears, the Storyboard reflects the Navigation Bar on both screens, and the Navigation Controller has "Is Initial View Controller" checked. Great.
Now, however, if I run the app, the LaunchScreen goes and then a blank white screen follows. No navigation bar, none of the original interface. However, I still get my audio feedback - the app is running just fine.
So what's going on?
Let me know if there's anything you'd like to see (code, screenshots, etc.).
I was using PixateFreestyle to style some elements. At some point it seems I had rather heavy-handidly added:
view {
background-color:#ffffff;
}
Which covered the views nested in the root view controller. Figured it out when I noticed copying my classes to another project resulted in the same issues and started commenting out chunks. Took out the Pixate initialization and regained my view.
Thanks to everyone who offered help. If nothing else, I learned more about debugging iOS apps.

UISplitView equivalent on the iPhone.

I have an iPad app which I am attempting to make universal and port over to my iPhone following this tutorial. http://www.appcoda.com/ios-univeral-app-tutorial/ (feel free to post a link if you believe it will help me).
So far, I have added a new storyboard file, named it Main_iPhone.storyboard and configured my target etc. However my iPad app is a UISplitView controller, with options on the side (in the master view) which control my detailview.
What I want to know is the iPhone equivalent of this object as i was made aware it cannot be used on the iPhone. Guidance needed on this one.
Thanks.
This is a very generalized answer since I have no idea what your app does.
The rootviewController of the app should be a navigation controller. The the root controller of the navigation controller should be the view controller that is on the left side of the split view controller. I'm going to assume that is a tableviewController.
When the user selects a row in the tableview controller, push the view controller that was on the right side of the split controller.
Now you have a master-child relationship.
Another thing to consider is that with the upcoming iOS 8 release, you'll be able to easily implement iPad like master-detail views on iPhone. (the concept is size constraint classes). As a developer, you can download the new xcode beta (and osx yosemite beta) to test this out.

App starting as Single view and proceed to tabbar application

I am about to create an xcode iphone app which will lauch initially as a single view ( something like login and settings screens ) and then proceed to a tabbed bar application with multiple tabs .
how to do this -
should i create two differnet projects one single view and one tabbed application ?
and is it possible to roll two projects into one single app ?
or is there just another easier way. I have xcode 4.3 and planning to use storyboard insteaod of XIBs
rgds,
sumit
Do not start with two projects, as you'll have an incredibly difficult time integrating them into one app. This is pretty simple, but you do need to learn the basics of view controllers.
Use Storyboards, and start with a single view app, maybe inside a navigation controller. Then do a transition to a tabbed view controller.
Upgrade to Xcode 4.6.3 or 5. Look at Apple's template apps for a tabbed application and a single view app to see how the storyboards look. Then copy the storyboards in one to the other, and link them up. This is definitely possible and straightforward, but you do need to understand how each view controller works with the others.
I also faced same situation once. I made a project as single view based app. without storyboard (since I was required to build compatible apps with iOS 4.3).
Made login screen as main view controller.
On login, I presented tab viewcontroller modally.
On sign out, I dismiss tab controller and return back to login screen.
If you have any queries, just ask it :)

can my app delegate be used as a controller of UIViewControllers (MVC)

Can an app delegate act the as the glue between all my UIViewControllers for the whole app?
I'm creating a mail client that has a navigation structure very much like sparrow (and fb etc). The first screen would be a login screen.. which would then lead to a UITableViewController that has the famous left menu button, which if clicked reveales other VC's underneath.
To make a long story short, right now it's my app delegate that's running the show.. it's the one that decides if to show the login screen if on first visit, or the default mailbox along with its subviews. If I get information from one subview, it hands off that info to the app delegate, which in turn passes it on to other view controllers.
Is this right from an MVC point of view? I know an app delegate is the first point of contact, it's what kicks off the application, but I haven't seen it used this extensively. I just want to make sure if I'm following iOS MVC best practices here.
It's not recommended, but it's perfectly legal to do that. I generally use a master view controller class and do most of the heavy lifting in that. Keep in mind that XCode will dump most of the auto generated code in the app delegate if you are using Core Data, so it can get a little difficult to navigate if you are using Core Data. It's really just a personal preference though. If it were me, I would still have the app delegate do the login screen vs. main screen logic, but put most of the app logic in a main screen controller.

Why doesn’t iOS 5.0 like plain window applications? Why does it request that view controllers be used?

I have an iOS app that I created with Xcode 4.0’s “Window-based Application” template. It worked fine back then and it was using the iOS 4.3 SDK. This is an app that simply puts the buttons, labels, etc. directly onto a window. No view controllers—no nothing.
But now that I’ve upgraded to Xcode 4.2 (and its iOS 5.0 SDK), and I run the app, this message gets logged to the console when the app launches in the simulator:
“Applications are expected to have a root view controller at the end of application launch”
To be sure, the app continues to work, but this rather bothersome log gets printed out on every launch.
Why is this happening? Why does iOS 5.0 prefer/request view controllers?
I don't know specifically why the message is logged, but integration between UIWindow and UIViewController has been increasing over the last several iterations of iOS. iOS 4 added a rootViewController property to UIWindow. The two classes work together to manage view rotation. Given the new capabilities that iOS 5 introduced to UIViewController (specifically, the ability to create your own container view controllers), it's clear that the relationship between the two classes will continue to evolve. As you've said, your app continues to function in iOS 5, so having a root view controller isn't a hard and fast requirement yet. Perhaps there are features planned for future iOS versions that will depend on having a view controller available.
I don’t have anything against them, and I will use them if iOS wants
me to. I was just curious about the above behavior.
I'd interpret the logged message as a gentle but persistent nudge from Apple toward providing a root view controller. Most apps already use view controllers anyway, so this isn't a big change, but there are probably a number of apps out there that don't properly set the window's rootViewController property to their top-level view controller.
You have just Connected your "view" with "File Owner".....just remove that connection and run your app.click your view and see the connections inspector area and remove that connection which I told..I dont know exactly what reason..but i had this issue and i cleared.
May be you have used some tableview or some other views in it.So the app. needs a view controller to launch.If you remove that connection then it will run what you wrote in a code only...
Let me tell you the reason.
In former edition, Window-based Application is used to build multi-view applications.But in Xcode 4.2,the Window-based Application does not exist any more. Empty Application is designed to establish a multi-view program.
The difference between Window-based Application and Empty Application is that the former has a main window, the MainWindow.xib.
When the program starts, iPhone build the main window firstly. The content in the MainWindow will be loaded and built.But if you want more functions, e.g. multi-view, you still have to new a root view controller. Root view controller can help manage the views in your program. In the new edition,Xcode 4.2, a root view controller is expected.
In the new edition, there is not a MainWindow.xib in Empty Application.The AppDelegate create a window instead. And it wants a root view controller. So the best way is to create a UIViewController Subclass with XIB for interface for MainWindow. But in the old edition, XIB is not needed.
So get it? Without a root view controller, you are not going to receive an error, but you can hardly do any thing without one. That's why the warning always come out.

Resources