official alternative to implement Splitview as a subview for an IPad App? - iphone

I'm developing an app in IOS using Storyboard for the Ipad. I want to add UISplitViewController as a subview of my app. I want to generate this kind of output (see below image). when user click on FirstView's 'Next' button, a second view-splitview should appear.
Output:
But Apple's guidelines says that we can't push UISplitViewController as a subview of module. if we use a UISplitViewController, it has to be visible at all the times in our app.
so
when i tried to add any splitviewcontroller directly into the storyboard, it generated the error .
Split View Controllers cannot be pushed to a Navigation Controller
I dig around the net but unfortunately couldn't find any proper help.
is there any official alternative to use such a kind of facility by Apple itself?
or any link to the working code or samples to implement such a kind of functionality.
If i'm using third party solution, will my app get banned by Apple App store as they don't allow to do so?
I think this is a very basic kind of functionality which many people needs to implement in their app as a submodule. So there must be a inbuilt facility by apple. may b i don't know about it.
any help would be greatly appreciated.

This isn't an answer to your exact question, but may help in part.
I have an app that uses a UISplitViewController that is a subview of a UITabBarController.
This goes against Apple guidelines, but was desirable for my design that started originally as an iPhone app, and that I wanted to convert to a Universal app. I also wanted to maintain the UI convention of my app that the iPhone users were familiar with.
Unsurprisingly, there were problems with the notification of the orientation to the various UISplitViewControllers that weren't visible (though it would seem that Apple could support this if they chose to).
The workaround was to use the new API added in iOS 5.0,
splitViewController:shouldHideViewController:inOrientation:
...and always return NO. Not the ideal UI arrangement, but it works, and was accepted by Apple as an app update.
So, (clearly) you'll need to do this programmatically, rather than use Storyboards, but I think if you can get it working, Apple may approve. I wouldn't recommend you risk this if you can avoid it, however.

Related

Create an iPhone app with more than one "screen"

I am relatively new to Objective-C / iPhone programming, and have only created single view applications thusfar. I am interested in creating an app soon than will have a "wireframe" in a sense that allows me navigate the various views of my app using buttons. So I guess my questions are:
What do I need to do to make an app that has more than one view
How to I link them with UIActions in buttons to navigate the various screens (ex a back button to go to a previous screen)
and I may have more as I go, but this is a start.
Thanks!
Since no one really had a clear helpful answer, I will share my own conclusion. Xcode 4 offers a very intuitive and interactive way to create multiple MVCs and segue between them even providing the interface to travel between views. I found out how to use this feature from Paul Haggarty's iOS course on iTunes U. I highly recommend it.
Joey
You'd can use a combination of, multiple UIViewController and or UINavigationController's. Utilizing methods such as presentModalViewController:animated: and pushViewController:.

IOS new Facebook iPhone App UISplitViewController Layout [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
SplitView like Facebook app on iPhone
another break away .net developer here now trying to get used to the world of IOS.
I like the layout of the new Facebook iPhone app (October 2011), and want to implement something similar in an app I am doing. I know that the UISplitterControl is not available on iPhone but Facebook seem to have pulled a little magic to make it appear so on their new app.
In Facebook's implementation it looks to me that they have used a UINavigationController which slides to the right by x when the NavigationBar icon is tapped thus exposing a view underneath with the menu items.
Would appreciate if someone could help me work this out as the solution would also be a great learning curve.
I've tried setting a UINavigationController as the AppDelegate window root view controller, then using initwithframe to load a custom view which includes the menu items as a subview hidden behind the UINavigationcontroller root view. Then when the UINavgationController menu item button is clicked slide the NavigationController to the right thus exposing the view underneath with menu items.This presents two problems, first that the subview positioning doesn't work and also how can I slide the actual UINavigationController to the right to expose the menu view underneath.
Please help!
Might also want to check out my implementation on Github. It's specifically designed to resemble Facebook's implementation as much as possible (from a technical point of view). Also it leverages iOS 5's new UIViewController-Containment features, which most others don't. Thus it works flawlessly in both landscape and portrait modes. It's universal of course and highly flexible. One class only. The way you use it is similar to any other Apple made controller.
there is a similar post here: SplitView like Facebook app on iPhone.
you can also checkout the code directly at: https://github.com/mystcolor/JTRevealSidebarDemo
I'm having exactly the same question, my guess is that the "SplitView" is actually more likely a modal view that takes up only part of the screen. I haven't had the time to try it just yet but the following post might give some hint on how this can be done:
http://ramin.firoozye.com/2009/09/29/semi-modal-transparent-dialogs-on-the-iphone/
You might want to check out this project
https://github.com/aaronbrethorst/StackScrollView
Here some howto
http://cocoacontrols.com/posts/how-to-build-the-twitter-ipad-user-experience
Similar to the one "MyPad" is using.
Note: This is only for iPad but you might find some usefull stuff in it
I created a component that mimics the behavior of the Facebook slide out menu. It is available on github.
Here is link from stack overflow where people have discussed on same topic.
Also there are several links that can be helpful:
SplitView like Facebook app on iPhone

How can I use a UIPickerView in my settings.bundle like how the 'nike+ ipod' app does it?

I can't see how this is possible from the documentation but here nike is doing it in their app so there must be a way.
It's impossible unfortunately. Apple developed it for Nike, so they used tricks of their own to do it. It might actually be possible, but it's certainly undocumented if possible. Impossible for an App Store app. Let us know if you figure out a way to do it even if it's undocumented.
If you use the library InAppSettingsKit, you can have a setting that uses a custom subview (a custom UIViewController) to display the choice to the user. So all you have to do is to create a custom view controller that looks just the one in your picture (it's basically just a UITableView and a UIPickerView).
In the example app that comes along with InAppSettingsKit, there is an example on how to use a custom subview.

navigate in iPhone app without programming

is it possible please to build small application with interface builder without coding, just to make sure that my interfaces are well organised ?
For the navigation interface, no. You need to programmatically push views into the navigation stack.
Interface Builder is a layout tool for individual screens. Connecting them in a navigation flow happens in code.
I second #fluchtpunkt's comment that you might want to look at publishing your content as an iBook rather than a native app. Or you could look at one of the html-to-native-app solutions like PhoneGap or Appcellerator. I've never worked with either of them, but theoretically if you have any HTML ability at all, they flatten out the learning curve of simple app building very significantly.
If you just want to test your interface you should probably use a mockup tool. I have good experience with blueprint. Or try something like interface (http://www.lesscode.co.nz/interface). Here you can create a GUI prototype and export it to XCode (maybe you can run the app at the simulator with navigation after this operation…) but i don’t know because i haven’t any experience this tool!

iPhone development - app design patterns

There are tons of resources concerning coding on the iPhone. Most of them concern "how do I do X", e.g. "setup a navigation controller", or "download text from a URL". All good and fine.
What I'm more interested in now are the questions that follow the simpler stuff - how to best structure your complex UI, or your app, or the common problems that arise. To illustrate: a book like "Beginning iPhone 3 Development" tells you how to set up a multi viewcontroller app with an top 'switcher' viewcontroller that switches between views owned by other view controllers. Fine, but you're only told how to do that, and nothing about the problems that can follow: for example, if I use their paradigm to switch to a UINavigationViewController, the Navigation bar ends up too low on the screen, because UINavigationViewController expects to be the topmost UIViewController (apparently). Also, delegate methods (e.g. relating to orientation changes) go to the top switcher view controller, not the actual controller responsible for the current view. I have fixes for these things but they feel like hacks which makes me unhappy and makes me feel like I'm missing something.
One productive thing might be to look at some open source iPhone projects (see this question). But aside from that?
Update
To clarify: I suppose what I'm asking about could be summarised as "Recipes and Gotchas for iPhone development". The sort of things that are of interest to developers, but aren't covered in any of the iPhone books etc. that I've seen, such as:
I'm writing an iPad app and want a UISplitViewController presented to the user only some of the time, which Apple seem to be saying I can't do. Is it possible? How?
Apple don't give me a way to stylise my app in a convenient, across the board way (e.g. font tweaks, or colours). How can I approach styling my app?
Memory management isn't made any easier by some of the inconsistencies in UIViewController method names (e.g. viewDidUnload is not the opposite of viewDidLoad, despite the name). Is there a consistent easy way to tidy that up and make view controller memory management less error prone?
How can I consistently and easily test my view controllers for behaving correctly when a memory warning comes in? It's easy to simulate a memory warning in the Simulator, but if the UI I want to test is showing (and is a 'leaf level' view controller), it won't get its view unloaded because it is currently visible.
N.B. I'm not actually asking the above questions here -- I think I have decent answers to them! -- just giving examples of 'good' questions that illustrate this stackoverflow question.
The WWDC talks available on iTunes U (at http://developer.apple.com/videos/wwdc/2010/) have some great information about structuring, especially in the Application Frameworks section.
If you're talking about code, use the Model/View/Controller pattern like in most Web applications:
The model code defines the objects that your program represents. A time tracker app, for example, might have model objects like Task, TimeSlice, and User (especially in a network setting).
The view code is provided for "free" with the iOS SDK, unless you need specialised view code. These are UIImageView, UIButton, etc.
The controller code bridges the 'gap' between the model and view. The controller will change the views to reflect the model selected by the user and facilitate the selection of model objects.
This is the base design pattern for any iPhone app, and it's the one that most will use.
If, on the other hand, you refer to what we in my company call UX (user experience) design, however, you can't beat the Apple HIG guidelines in the Apple iOS SDK documentation set, available online or in Xcode from the Help menu.
The other thing I recommend quite highly is to play around with some test/dummy code. Nothing can top experience. Experimenting with the iOS SDK and getting your hands dirty will allow you to truly learn the best ways to design apps.
Edit:
Also, delegate methods (e.g. relating to orientation changes) go to the top switcher view controller, not the actual controller responsible for the current view.
Can you clarify? In all of the apps I've written, the currently shown view controller receives the orientation change methods. Note that there are two methods. shouldAutorotateToInterfaceOrientation: allows you to decide if the view should rotate, and didRotateFromInterfaceOrientation: allows you to re-layout the view if necessary.
Please go through this link. In this they have explained clearly about design patterns.
http://www.raywenderlich.com/46988/ios-design-patterns
You might want to consider watching videos like the CS193p course from Stanford on iTunes U. They go through the most important parts of iOS development in deep, and give some source code.
As far as I can tell, there isn't a book or resource which deals with the sort of advanced gotchas and recipes that I was looking for. Loads of useful resources exist, but just not addressing the stuff I'm thinking about.