UIGetScreenImage with iPhone app used on iPad - iphone

My app uses the UIGetscreenImage () method to take a Screenshot, which works perfectly fine using iPhone simulator or an iPhone.
Now I wanted to use my app, that is targeted for iPhone on my iPad too.
Doing so, the Screenshot will only be the upper right corner of the iPad display, in the size of an iPhone display.
Changing the app target to iPad would fix the problem, but screws the complete UI, so it is a rather bad fix.
You know some other way to fix the problem?
Using the UIGetScreenImage method is no problem, as it isn't targeted for the AppStore, and I like the advantage of the statusbar included in the screenshot.
But if their is no other way to fix it I can also use another method for making screenshots.
thx for your help :)

Related

Iphone app on Ipad - make Ipad select 640x960 instead of pixelated 2x320x480

This is for avoiding an extra target and writing any target-specific adaptation code for the Ipad, separate apps on App Store, etc etc - but instead let the Iphone app display in 640x960 rather than 320x480#2x using the "2x" button.
Even on a non-retina Ipad, there's room for 640x960, but the Ipad is still running Iphone apps on the Ipad as if they were made only for Iphone 3GS.
This is for an app used internally by a company and any authorized client/partner. The company has bought Ipads, but the clients/partners may want to use the Iphones they have.
So, I'm looking for a compile-time target flag or a snippet of code to execute to detect the platform is Ipad and make it display the window full-size.
Has someone succeeded in doing this and if so, how did you achieve it?
This isn't really how things work ... you're trying to create a workaround that will probably take you longer to get to work (if at all possible) than it would if you just commit to making iPad friendly layouts.
If you just make the project a universal binary, then it would run "natively" on the ipad rather than in iphone compatibility mode. After that, the simplest thing you could do is just make sure your view's resize masks are set correctly so they stretch. Depending on the complexity and makeup of your app, many times this is enough to get you through. However, in many cases it would behoove you to just make an ipad specific layout as usability is oftentimes greatly improved.

How to make my iphone app work on an iPad?

It is my understanding (i have seen it) that some apps can be opened and viewed in an iPad. Although, the iPad keeps the screen small, or pixelated if doubled the screen size.
I am attempting to do the same thing with my app, however when I attempt to run it on an iPad it crashes with the error
'Could not find a storyboard named 'MainStoryboard_iPad'
This is obvious, as I do no have a storyboard for the iPad, but currently I don't want one. I just want the iPad to run the app as an iPhone app in a smaller version. So my question is, how do I stop it from looking for the iPad storyboard? Its my understanding I must adjust something in the plist.info but I don't know how to access that in xcode. its my understanding you select the project in the navigator then select 'info' but I don't see any information that people say should be in the plist.info.
Thanks
You seem to have made your application universal. You want to set your "devices" to iPhone. This can be done on the target summary page (No need to interact with your .plist directly).
Only target iPhone platform, and do not call any iPad interface objects in your code. You should look in your Main xib file to make sure there are no references to an iPad interface object.
iPhone only apps should natively run in double-pixel mode. In order to resolve the pixelated / grainy issue you see, use #2x (for iPhone) size images. This will reduce the pixelation you see, but will still contain some.
Ok, I found the final issue. After editing the summary to 'iPhone' I also had to go into the Info tab and change the line that says
'Main storyboard file base name (iPad) to MainStoryboard_iPhone. It was currently set to MainStoryboard_iPad. That second step fixed the issue.
Thanks guys!

Is it the same write the iPhone and iPad app?

I have a question about the objective C. I am writing the iPhone application and I want to app which can also run on iPad. Is there are some change do I need to do? As I set the element in code rather than using the Interface builder. Do I need to reset the x,y,width and height for the application? Thank you very much.
You can run exactly the same app developed for iPhone on the iPad. However, it will not use the full screen of the iPad. Look at the Facebook app for instance, you can zoom it but it doesn't look very nice. If your goal is to run an iPhone app on the iPad, you don't have to bother much. If you want to really support iPad in your application you should implement a separate UI for iPad and this is supported in XCode. The iPad has of course a larger screen but also some additional layouts and controls that make apps look great on the iPad.
Have a look at http://developer.apple.com they have more information about this.

iPhone 4 apps automatically scale up on iPad?

I thought I read/saw/heard something saying that apps built for iPhone 4's Retina Display would automatically run at 640x960 when installed on an iPad. However, can't find any documentation on that specific feature, and my app still runs at 320x480 when installed on an iPad.
Is there a step I've missed to make this happen? Or did I just imagine this being a feature?
Apps do not auto-upscale, BUT if you have an image larger than the UIImageView you are placing it in, you will get as large a version as the iPad can draw.
I don't think it knows to pull in #2x images, just ones that are actually larger than the space you are placing them into.
This is not the case; currently, apps won't auto-upscale on an iPad. Perhaps Apple will add this in iOS 4.x for iPad, but certainly there's been no indication from them that they will.

Not getting clicks in iPad version of my iPhone application

Using the latest SDK from Apple, I noticed that while running on the iPhone works fine, the iPad version of my application doesn't "accept clicks" on any view/widget that is outside the "bounds" of the standard iPhone screen.
Any idea?
Thanks,
Reuven
Vanilla iPhone apps will only accept touches within that little bounds, to reproduce that fact that the iPhone resolution is only 320×480.
To fix it, upgrade your app for iPad.
(Also, make sure you don't hard-code any numbers. For example, use [UIScreen mainScreen].bounds.)
OK - found it...
All I needed to do was to open MainWindow.xib in Interface Bulder, and in the Window Attributeds palette, to check "Full Screen at Launch".