universal

iPhone - How to transform an iPhone only app to universal app?

我的未来我决定 提交于 2019-11-30 23:19:16
how can i transform an iPhone only app to an universal application? EDIT : FOUND SOLUTION If you want to have the "Upgrade current target to iPad" option selected, you must have Target Device Family set to iPhone only, not iPad/iPhone. It works for me! "The first step is to select your target in Xcode, right-click and use the “Upgrade Current Target for iPad…” command. You will presented with a choice: Select “One Universal application” and Xcode will do (some) of the hard work for us. The Apple guidelines warn against trying to manually migrate your target though to be honest it is hard to

Simulator iPhone Retina has wrong screen resolution

爱⌒轻易说出口 提交于 2019-11-30 18:14:49
问题 I'm trying to write a Universal Application. The display should be slightly different for different screen resolutions. But when I code like this: - (void)viewDidLoad { SCREEN_WIDTH=[[UIScreen mainScreen] applicationFrame].size.width; SCREEN_HEIGHT=[[UIScreen mainScreen] applicationFrame].size.height; NSLog(@"w:%f h:%f",SCREEN_WIDTH,SCREEN_HEIGHT); ... } I get output: w:320.000000 h:480.000000 even when the simulator is set to Hardware->Device->iPhone (Retina) Furthermore, images with this

Constraining proportions of GUI elements in Spritekit game

血红的双手。 提交于 2019-11-30 13:25:54
问题 I apologize in advance because of huge post, but everybody who ever tried to make some kind of universal app knows that this is pretty problematic stuff, so please be easy on me... The goal What I am trying to achieve (shown on image above) is to use @2x assets on both iPhone 5 and 6, and maintain same look of an app. And if possible, to do all that without manually calculating scale and position properties of nodes based on detected device... So in short, how to achieve that app

Universal app for iPad not loading iPad .xib files?

只愿长相守 提交于 2019-11-30 13:25:47
问题 I have been trying to figure out why this has been happening but it seems that, in the iPad version of my universal app, it is loading the iPhone .xib instead of the iPad one. I have named my iPhone xibs with a suffix of ~iphone.xib and I left my iPad ones just with .xib . I read to do that because someone said that worked for them but in my case it did not work for me! Even if I do ~ipad.xib and ~iphone.xib for the different .xib files, it still loads the iPhone version! * *Is there any way

Dynamically load nib for iPhone/iPad within view controller

若如初见. 提交于 2019-11-30 11:28:14
问题 I have converted an iPhone application using the wizard like thing in XCode into a universal app. It builds fine but obviously looks a bit rubbish in some areas :) I need to load nibs according to which device is being used. I dont wish to create my view controllers using initWithNib as I already have code to create the controllers with some data ( initWithMyLovelyData ) which doesnt do anything to do with nib loading. I know to find out the device you use UI_USER_INTERFACE_IDIOM() so I tried

What makes `impl Trait` as an argument “universal” and as a return value “existential”?

ε祈祈猫儿з 提交于 2019-11-30 09:28:19
问题 I was reading the RFC on "expanding" impl Trait when I came upon the following: By contrast, a programmer who first learned: fn take_iter(t: impl Iterator) and then tried: fn give_iter() -> impl Iterator would be successful, without any rigorous understanding that they just transitioned from a universal to an existential. While I understand universal vs existential from a logic perspective, what makes the first one above universal and the second one existential? 回答1: The RFC defines the terms

Android-Universal-Image-Loader doesn't keep loaded images on scroll in gridview

廉价感情. 提交于 2019-11-30 09:18:01
I am using Android-Universal-Image-Loader library to load a remote pictures to ImageView in my GridView cells. Here the the imageLoader configurations: new ImageLoaderConfiguration.Builder(Config.context) .threadPriority(Thread.NORM_PRIORITY - 2) .memoryCacheSize(20 * 1024 * 1024) // 20 Mb .memoryCache(new LruMemoryCache(20 * 1024 * 1024)) .defaultDisplayImageOptions(DisplayImageOptions.createSimple()) .tasksProcessingOrder(QueueProcessingType.LIFO) .enableLogging() // Not necessary in common .build(); and Display Options: new DisplayImageOptions.Builder() .showStubImage(R.drawable.blank)

Constraining proportions of GUI elements in Spritekit game

我与影子孤独终老i 提交于 2019-11-30 07:30:02
I apologize in advance because of huge post, but everybody who ever tried to make some kind of universal app knows that this is pretty problematic stuff, so please be easy on me... The goal What I am trying to achieve (shown on image above) is to use @2x assets on both iPhone 5 and 6, and maintain same look of an app. And if possible, to do all that without manually calculating scale and position properties of nodes based on detected device... So in short, how to achieve that app automatically constrain proportions of, and between elements (and scene)? Also I would like to have same look of an

Universal app for iPad not loading iPad .xib files?

不羁的心 提交于 2019-11-30 07:28:53
I have been trying to figure out why this has been happening but it seems that, in the iPad version of my universal app, it is loading the iPhone .xib instead of the iPad one. I have named my iPhone xibs with a suffix of ~iphone.xib and I left my iPad ones just with .xib . I read to do that because someone said that worked for them but in my case it did not work for me! Even if I do ~ipad.xib and ~iphone.xib for the different .xib files, it still loads the iPhone version! * *Is there any way to completely confirm that it is loading the iPhone version instead of the iPad version? And is there

iAd — cannot click banner

浪尽此生 提交于 2019-11-29 20:50:55
问题 I am creating a universal-app template. This template will need to support optional iAds, and optionally all orientations. I coded up a solution only to find a bizarre bug. in certain situations I was unable to click on the banner I then recoded another revision, tidied everything, and gutted out most of the code to reveal a minimal test case failure. https://github.com/p-i-/iAdUniversalTemplate/commit/2c829d268a9452e1a054802e7ccb9cde5de17853 In this new code, only 3 views: window, uberview