SpriteKit iOS8 different physical behavior - objective-c

i've noticed different behaviors in Physics, for example:
I have coded a rope with many SKSpriteNode and SKPhysicsJointLimit for the chain.
At the ends i've attached two SKPhysicsJointSpring to two physics-disabled SKSpriteNode.
On iOS7 it works like a charm, in iOS8 there are some "distorsion" on the rope.
These are the pics, the little square is just a joint for touch and the big rectangle is just a trigger.
In iOS8 you can see a "U" distorsion around the candy, but not in iOS7. Why?
iOS7 Launcher http://i.imgur.com/yRt6UfB
iOS8 Launcher http://i.imgur.com/WE3Esuu

The right PhysicsJoint for a rope is SKPhysicsJointPin and not SKPhysicsJointLimit.
This solution works well in iOS7 and iOS8.

I also had some serious troubles with ios8 physics behabiour... But for th e rope problem mybe you can checkout my code from this answer. It runs the same on ios7 and ios8
https://stackoverflow.com/a/20855093/3148874

Related

How do I get my iPhone-only app to run on iPads? (constraint question?)

My iPhone-only Objective-C app (iPad not checked) runs correctly on SE 2nd up to iPhone 12 Pro Max, properly centered, fully functional, but is stretched and clipped on any iPad (in Simulator--I blanked center content below re privacy), and on some I get black screens. Every element is constrained ultimately centered on Superview X and Y centers (nothing absolute); is that the problem? Is there a typical problem that keeps iPhone-only apps from appearing properly on iPads? The app in no way does anything special for iPads. Is there a good tutorial about this subject? Thanks
The answer is simply that constraints sufficient for all iPhones are not necessarily sufficient for iPhone in iPad. Just because the app is sized correctly for all iPhones doesn't mean it's correct for iPhone in iPad. That's what this newbie learned!

"M13ProgressView" - not working in landscape

I don't know about any restriction for asking question in Stack Overflow about the third party code. However, i like to ask and if any problem about that question means then i'll close my question.
If you know about the "M13ProgressView" open source tool means, then you may be helpful for my question.
Question: "M13ProgressView" not worked for landscape. When rotating the device to landscape, the superview changing to the landscape but the "M13ProgressView" displaying vertically(both simulator & device) not excepted as horizontally. How could i fix this?
That's an iOS8 fix by Apple, that breaks workarounds.
Prior to iOS8 code needs to take care of rotation if it is being added to the window.
Now on iOS8+ handles automatically, the windows subviews are rotated due to orientation changes.
So you need to find code where rotation transform is applied, and disable it if OS version is greater than 8.0.
For example here is the commit that fixed iOS8 rotation issue on MBProgrgressHUD

Behavior changes for updateViewConstraints in iOS 8

I notice some small graphical glitches while testing one of my app under iOS 8: some UIViews elements are not in the right place, others have not the right size.
In a first step, I use storyboard, Auto-Layout and constraints. Then I programmatically tune constraints to perfectly suits devices' screen size, using updateViewConstraints.
Perfect on iOS 7 but with some glitches on iOS8 as on following picture:
./Users/dominiquevial/Documents/Informatique/Dev/Novae Marathon/_log/captures/iOS8 - iPhone 6/pause.png
After investigation I found the problem: updateViewConstraints is not called. I don't understand why, maybe due to some optimizations...
Correcting this problem is easy :
use viewWillLayoutSubviews in place of updateViewConstraints
or add call to setNeedsUpdateConstraints in viewWillAppear
Which way is the best one ?
Depends if the user can cause the views to enter an invalid state after the view appears, if so the first option. If this is not possible the second.
The less work your app has to do the better.

SpriteKit physics world scale in iOS 7.0

I am working on this game where I have a SKNode (named objectsNode) which contains all of the game sprites.
Running on iOS 7.0x Collision detection works great between the sprites until I try to zoom out the objectsNode (by modifying its xScale and yScale properties).
It seems that the physics body's size of each sprite remains the same as if it was not affected by the scale. I ran across this answer which might confirm it is a bug with iOS 7.0 but I could not find a more convincing source.
Running on iOS 7.1 works great and collision is correctly detected when zooming out the objects node.
Is there a way to fix this or should I just deploy the game to iOS 7.1 devices and above (is it recommended to so ?) ?

ObjC - Hiding the separator lines of a UITableView on iPhone

I try to do this with following line:
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
and it works! on the simulator.. strangely when I run the app on the iPhone (3Gs) they show up again.
Any ideas why this could be happening?
(Also labels and images of my custom cells are displayed on wrong positions, maybe its the same problem)
There is absolutely no difference between the simulator and the device code (it's the same code that gets compiled).
It seems it was an Apple bug. I updated to iOS 4.0.1 (with XCode+SDK update as well of course) and now everything works just fine.