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.
Related
At this time I'm trying to edit an app of mine to support iOS6+7 aswell as 3.5+4 inch displays.
However I'm trying to do this without changing the code. And it works fine...for one of my requirements.
First I tried fix the 3.5/4 inch display issue with autolayout/contraints. It worked well but either it looked good with iOS6 or iOS7. And I didn't find a way to fix the iOS6/iOS7 diffrence without adjusting tons of code.
Then I resetted my contraints, disabled autolayout and fixed the iOS6/7 issue via offsets (iOS6/7 Deltas). Worked fine too for resolving the other requirement.
Since you can't use offsets AND autolayout at the same time I'm wondering if it's not possible to fix both problems without either checking iOS version or display size in my code?
I didn't provide code or screenshots because it's a more general question and I'm trying to solve this issue without touching my code. However what I can say is that I'm using .xib files to create the views not knowing if that's a problem too...
Thanks in advance,
blaluma
if your using storyboard with autosizing you can achieve that one
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.
I hope you can help me with my actual problems with designing an iPhone-App in the latest xCode version.
Here´s what I find a bit strange:
I designed a new project with a Storyboard and a Navigation Controller. Then I placed Objects like UILabels, ImageViews and so on. No when I run the Project in the simulator (as well on the iPhone) I noticed the following: When the App loads all the in the View placed objects fall down from the top to take their defined place. It takes maybe the quarter of a second, but its clearly to see. It also happens on all other views initiated from the root view controller
So, what do I have to change that everything is at it´s fixed place without to fall down from the top at the start of the app?
I hope I described it good enough. Actually I have no idea what´s going on there. I hope you can help me to fix this "problem". I´ve written some small Apps before, but I´ve never noticed a behavior like this.
Got the solution: I´ve had to remove the animations on the main view... now it works proper! :-)
First of all I want to say that I'm I aware that my question is probably way too vague to answer and may be closed/down-voted. I just hope for some inspiring brain-storming on possible solutions.
Here's the story:
My app was crashing on iPad 2, but not on iPad 1. I've fixed the crash related to unarchiving nib and now I have a very strange problem - my universal app still runs without any problems on 1st gen iPad with iOS 4.2.1 and 4.3.3, but not on (some/all?) iPads 2 with 4.3.3. Unfortunately I don't have an access to iPad 2 with iOS < 4.3.3 to test further and narrow down the problem.
My app has it's main screen displayed by using presentModalViewController. My modal VC is MGSplitViewController (it mimics native UISplitViewController and enhances its functionality). When my VC is presented, only "root view" is displayed and remaining part of screen for "detail view" is just black and empty however the controller is loaded and active (debug logs are printed etc.).
So on iPad 2 I have access to, it fails to display detail view properly, however I've heard from one user that it's fine on his iPad 2 (both iOS 4.3.3). App also works ok on iPhone/iPod regardless iOS version, so I assume it's related only to iPad code of my universal app.
I believe it may be more general issue with displaying views. I've tried to read view property of my detail view, which should force view to be displayed, but it didn't help. It may also be related to IB stuff (the initial nib unarchiving crash only on iPad 2??), but I think everything is wired ok in IB...
Anyone has a slightest idea how to investigate this problem?
EDIT: BTW: My iPad 2 is giving me hard time as it drops Wi-Fi connection very often. Other people are also reporting this kind of "feature". Can it be that it's just something wrong with my iPad 2?
EDIT2: the app is also not correctly displayed on iOS 3.2, 4.2 and 4.3.3 Simulator (via XCode 4), but gets displayed correctly on iOS 3.2, 4.2 Simulator via Xcode 3. Strange, isn't it?
Anyone has a slightest idea how to investigate this problem?
If you'll allow a somewhat vague answer to a somewhat vague question, then yes, I do have an idea.
To approach problems like this in general, bisection of the problem field is a great way to go forward:
You identify the general problem area. Could it be presentModalViewController in your case?
Then about halfway through the code in question, you set a breakpoint/write a message to a log file/play a sound/send a mail/tweet/whatever it takes to verify that your code has come that far without a crash.
Run it and see if your message has been produced.
If it has been produced, the problem is not in the first half, so it must be in the second half (a log message at the end of the identified problem area is useful, too, just to make sure that the crash actually happens before that).
On the other hand, if there is no trace of your log message, then the crash must occur in the first half, and you can rule out the second half of your code for this particular problem.
Now you repeat the algorithm by setting your breakpoint/log message about halfway into the culprit half you just identified.
Repeat until you find the problem. It won't take many iterations.
Of course, the crash may be due to some variable stored at a previous step or in another method, but now you know where to look.
Initially the app was crashing due to unarchiving the nib. I don't recall the exact crash output, but it was quite strange for me that same nib was properly unarchived on iPad 1 with same OS version, so I suspected that the problem lies in xib file... I've recreated the xib from scratch routing everything carefully and - bam! - it started working on both iPad 1 and iPad 2! How come some nibs aren't unarchived in a same way on same OS running different HW???
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.