iphone to ipad porting - iphone

i have iphone project based on tabbar template . want to convert it to ipad,
final output i want is to move tabbar inside a splitviewcontroller .
How to go about?

You have to rewrite it to be in correspondence with the change in templates... There is no other way sorry to be the bearer of bad news. But, you can still potentially re-use a lot of the variables and IBOutlets and IBActions that you had from the previous project. You just have to take that code and fix it so it works with the new template.

I recently found this blog post on the topic. You might find it helpful:
http://www.raywenderlich.com/1111/how-to-port-an-iphone-application-to-the-ipad
Plus there's some discussion of creating a universal app here:
iPhone & iPad versions of same app?

Related

UICollectionView in ios 5

I just learned about UICollectionView after creating the same functionality in a custom class. So I am thinking about using deleting all that code I wrote and just using UICollectionView.
I know my app gets a lot of installs on iOS 5. And I know a lot non tech savvy friends and family still have it installed.
I googled this and it says I can use some other's guys library(another thing I should have known before writing my custom class). But the answer was not definitive.
So my question is, does Apple include a bridge for iOS 5 or will my app just fail if I use UICollectionView?
I have my target deployment set to 5.0 and it is not giving me any warnings.
Venkat
UICollectionView is iOS6 only. You can include extra code to check for iOS6 and use your custom class on iOS5. But there is no way to use an actual UICollectionView in iOS5.'
Thats what that "other guy's library" does. It has an iOS5 compliant clone of UICollectionView and checks based on the OS which to use.
Maybe you want to try this as an alternative:
https://github.com/steipete/PSTCollectionView

iOS Universal App without storyboard or xib file

I have a question about universal app. My app will not have storyboards or xib file. There is possibility to write universal iPhone/iPad application without it? I found some tutorial how to create universal app with storyboard, but i don't want (i can't) use this feature in my project.
If it is possible What should i do? If i have to made changes only in ViewControllers? I'm start to do this, i'm not changing old project so i can do anythng - what should i learn/what should i remember?
I'm targeting to iOS 5.
EDIT:
I have a screen information in resource file and my rootViewController or any other ViewController will be created in compile time, so i can't have xib file for that, i can't put button on xib with Interface Builder becouse i don't even know how many buttons i will have there. I don't know how many screens i've got till i hit run in my project.
Not only can you write any type of iOS app without Interface Builder, it is actually much more testable and pliable. Some auto layout tricks are difficult (not possible?) in IB style projects, as well.
There is an incredibly impressive library called Masonry that wraps the NSLayoutContraint syntax. This makes it quite pleasurable to subclass views while not having to use ugly VFL or incredibly verbose NSLayoutContraint syntax (not even going to address frame setting...blech!). IB style apps also promote bad software development practices and anti-patterns (just dumping everything in a view controller presentation-wise. No Separation of Concerns!). Also, it is more difficult to work on larger teams (IMHO even small teams) while utilizing Nibs, Xibs, and Storyboards due to merge issues.
On top of all of that, you gain a much deeper understanding of the classes you are working with (UIView, UIResponder, etc.) when writing code in this manner (once again IMHO). There is an interesting article outlining some of these issues in more detail: http://doing-it-wrong.mikeweller.com/2013/06/ios-app-architecture-and-tdd-1.html This is by no means the only article that discusses this problem. Also, this will help for your app delegate: creating a universal window-based iphone app without generated xib file
This is certainly possible, I have only used storyborads once in the many apps I have published. As for not using XIBs, I am not sure why you would want to do that. You can lay out your views at runtime in the init method, but I feel like that is just making things unduly hard on yourself. You can set a XIB up for the iPad and one for the iPhone so you can tailor the UI specifically to each device.
Perhaps if you go into a bit more detail about why you are imposing this requirement on yourself we can discuss if it si worth the effort to go down that road.
Good Luck.

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

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.

Trouble understanding universal apps, multiple view controllers

I'm trying to figure out the best way to approach writing a universal app. I'm not sure how to add some new files (for a new view), and how to add both iPhone and iPad view controllers. I'm using Xcode 4.2.
Your question is pretty vague (and general), but does this tutorial give you the information you need? http://blog.corywiles.com/creating-a-universal-ios-app-tutorial

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