UICollectionView in ios 5 - ios5

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

Related

UITableView overlaps status bar on iOS7 beta 4

Here is a UITableView that worked fine in iOS6 overlapping the status bar in iOS7. What is the best way to solve this problem? Using iOS7 beta 4. This behavior existed since beta 1.
META:
Complain about me disobeying NDA to Apple directly at 800-275-2273 or Stack Overflow at 212-232-8294; or help me solve this problem here which is clearly superior to Apple's forums.
If you're happy to have the "Language" section title to not overlap but don't mind the content overlapping once you scroll past it you can try this in your ViewController's viewDidLoad:
[self.tableView setContentInset:UIEdgeInsetsMake(20,
self.tableView.contentInset.left,
self.tableView.contentInset.bottom,
self.tableView.contentInset.right)];
One answer is described here https://devforums.apple.com/message/830042#830042 (yes, you need to be a paid developer to access it). All answers are various levels of hackery. Given how bad this situation is, there will probably be a different solution in the final version.
As per the rant thread (https://devforums.apple.com/thread/197429?tstart=0 "We all are royally screwed!!!") I do really think Apple should be using its own resources for beta testing rather than leaning on its vendors. In a FOSS project we would call this a community, but Apple is closed so we are vendors.
Starting with iOS 7, this is the expected behavior for a UITableView that's managed by a UITableViewController which is not inside a UINavigationController.

IB z-order on simulator 6.0

Consider the above's IB objects listing. Siblings further down the list should be on top of the siblings listed further up when rendered on the screen.
Under Xcode 4.5.2, everything is ok if iphone simulator 5.1 is used. But for simulator 6.0 the map just covers everything. The same if using actual devices (phones) for testing.
Hope that somebody knowledgeable could help.
Please also add comments if you do not (or do) find such a problem on simulator 6.0. Chances are the problem is related to how my project is setup.
Update :
Have setup a new test project with iOS 6 map view myself. There seems to be no problem with z-order at all. So the problem could relate to my code. Unfortunately, quite a lot have already been written, there wouldn't be enough time to go over everything for the time being. I suspect that it has something to do with the rootViewController property. My project initially followed a older scheme in which rootViewController was not used ...
I dont know if that order is reliable at all -- in the past definitly not and I am not conviced it is today :D. (even though apple claims it :D)
see: IPhone Interface Builder: Z-Index, Z-order of a button, image, ui element, etc?
(the 3rd answer currently. 7 votes)
The problem is solved by calling Window's bringSubviewToFront method. But I believe a better and more proper solution can be found given enough time.

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.

iphone to ipad porting

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?

iPhone - UITableView not calling didSelectRowAtIndexPath method in 3.0 SDK

I have an iPhone app that works fine in 2.x version of the SDK. When I upgraded to 3.0, the didSelectRowAtIndexPath method is no longer called, so the action when a user highlights a row doesn't happen. This is a custom UITableViewCell that is in a separate nib from the UITableView. Both the data source and data delegate are properly wired up in Interface Builder, and if I compile it to 2.21, it works. On version 3.0, clicking on the row doesn't do anything.
This question, mentions a similar issue, but they mention another first responder that is taking the click. I don't have any first responder methods hooked up to the cell or table.
How can I have the table work properly in 2.x and 3.0? The custom cell has a few labels and an image, and I just want to be able to click on a row and show the details for that particular row.
You probably won't like this answer too much...
Some things that worked in 2.2, don't work in 3.0 (you already know this). Some APIs have changed, etc…
A few things, however, are different because they were never supposed to work in the first place (according to Apple).
I can't be sure one of these changes is your issue, but it might be. Subtleties having to do with nibs and properties were definitely affected.
My advice would be:
First, check your nib connections, Maybe you have a connection missing that 2.2 let you get away with, but 3.0 will not.
Next, build a test app with a simple table view and see if you can get it to work. If it does, you should begin adding in complexities from your code into the test app until it breaks.
Unfortunately, this may take some time. You can also post some code to see if there is anything that we can find.
I had this same problem. I spent hours on it trying just about anything you can imagine. The funny thing was it ended up not being a problem with my code.
I am using Objective Resource and after upgrading to version 1.0.1 the problem went away. Check all your third party libraries and make sure that you are using the latest to ensure you have their 3.0 changes.