ios,storyboard,autolayout,ios-universal-app,size-classes
During ViewWillApper() check the traitCollection of your View Controller. myViewController: UIViewController{ mybutton = UIButton(frame: myframe) func viewWillAppear(){ if traitCollection.horizontalSizeClass == .Compact { applyAwesomeEffect(myButton) } } } ...
ios,swift,sprite-kit,game-physics,ios-universal-app
There is a SKPhysicsBody class method that could be of help: + bodyWithTexture:size: From the description: Use this method when your sprite has a shape that you want replicated in its physics body. The texture is scaled to the new size and then analyzed. A new physics body is created...
ios5,ios7,ios6,xcode5,ios-universal-app
Yes, set the deployment target to iOS 5. You will have to make separate storyboards for iOS 5/6 and 7, and choose which to load upon startup based off of the device's OS.
ios,iphone,ipad,screen-resolution,ios-universal-app
Check the answer to this question: Q: Black bars showing when running app on iOS 7 (4 inch retina display) A: http://stackoverflow.com/a/18913189/4666621 You're probably missing the image [email protected]
iphone,ipad,swift,ios-universal-app
Go to the info.plist file and add an array with key "Supported interface orientations (iPhone)" and add the following values in it: Portrait (bottom home button) Similarly, add another array "Supported interface orientations (iPad)" and add the following: Portrait (bottom home button) Landscape (left home button) Landscape (right home button)...
ios-simulator,iad,ios-universal-app,iad-workbench
You don't have to do any of those to test ads -(void)bannerViewDidLoadAd:(ADBannerView *)banner{ [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0]; [iAdBanner setAlpha:1]; [UIView commitAnimations]; [self.iAdBanner setDelegate:self]; } -(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{ [bannerView setDelegate:self]; [bannerView setAlpha:0]; bannerView.hidden=YES; } Just add the above code and an iAd test banner should appear ....
Any graphics you can have normal and retina version. MyImage.png and [email protected] and the system will use the right one. But for all other positioning you're on your own if you're not using interface builder. Take a look at - (void)viewDidLayoutSubviews and the various resize mask settings for your UI...
iphone,xcode,ipad,upgrade,ios-universal-app
This isn't an issue with Xcode, thats what its supposed to do. You can certainly duplicate your entire project for the iPad version manually if you'd like, but I can't think of a case where you'd actually want to do this. Most of the time you just want to change...
ios,uistoryboard,ios-universal-app
You only need one storyboard to build an interface that is compatible with both iPad and iPhone models. Apple is now encouraging developers to embrace Adaptive User Interfaces. As their guide states, "With the latest advancements with View Controllers in iOS 8 and Auto Layout in Xcode, it’s now even...