p:fileUpload on iPad uploads Images upside down - ipad

For my current project I have built an input mask with which I can upload pictures and display them. For this I use the FileUpload in multiple and advanced mode and the graphicImage component. The normal browser on my PC it works very well.
Now I have tried the same dialogue on my iPad. If I hold the iPad horizontal (home button on the right), it also works very well on the iPad.
If I hold the iPad the other way around (home button on the left), the images are displayed upside down (in the preview). When I now go to the dialoque via Browser (PC) the Image is shown updside down (graphicImage Component).
Is it possible that the image information to orientation the image is incorrectly read and processed? How can I correct or correct this error?

Related

copy iPhone simulator to clipboard not working

I am trying to copy the iPhone simulator to use in photoshop for a website. I want to create a static image from one of my apps pages with the iPhone casing.
When I try to go to the simulator menu and select edit-copy screen, the screen contents are copied and can be pasted in photoshop.
However when I select edit - copy, for some reason the entire simulator including the bevel is not copied to the clipboard or perhaps copied in a format that is not recognized. The clipboard remains empty.
I can do a screen shot and then do some work in photoshop to remove everything beyond the boundary but just wondering if anyone has figured out a way to copy the simulator including the bevel to the clipboard for use in other apps.
Just wondering why the edit - copy is not working.
You can use the normal macOS screenshot shortcuts for that: press ⌃⇧⌘4 to start the screenshot-to-clipboard and then press Space to change to the window selection. Move the mouse over the simulator window (which turns blue) and press the mouse/touch pad button. This copies the window including its shadow (but without any background). Use ⇧⌘4 to save to a file on the desktop instead.
You may need to enable the shortcuts: open the system preferences, go to Keyboard > Shortcuts > Screen Shots.

How to force universal app on iPad into scale mode?

I created an universal iOS app. On all iPhone variants I want native resolution without scaling, so I created splash screen images for all available sizes in images.xcassets/LaunchImage.launchimage and set them all in Xcode:
Now, this works very well for all iPhone versions up to the biggest iPhone 6 Plus.
On iPad (with high pixel density) though I don't want native resolution. Instead I want it to scale the app (even if it looks a bit blurry then, but that's ok).
How would I do that?
In image assets you have to provide proper size for each launch screen, You can not use the same image for two devices in launch-images ( unless you have two copies of the same image ).
If you want to make app-size smaller, implement launch screen, set its background color to your desired background color and put your logo in the center of it. You can now remove iPhone 6,6Plus images from image assets, but you still have to provide launch images for iOS 7 devices (old iPhones / iPad ).
Don't use the Asset Catalogue. Create a LaunchScreen.xib , add a UIImage inside the view. Open the attribute inspector in the right hand panel and set the view mode to Aspect Fill.
The solution was quite easy, I simply changed project type from "universal" to "iphone" and that did the trick!

Do I need iPhone/iPad specific button images in my case?

Here is my situation: I have a simple app with some buttons that are images. I have the image set in xcode using the menu on the right (i simply click the button and pick the image I want from the dropdown). I created them using a simple image program so they look somewhat glossy and nice, but nothing crazy. I also sized them for an iphone screen.
Using some auto layout, I've been able to ensure the layout stays the same and the buttons change size with the size of the iphone. I would like this to be the case with the iPad as well, but I'm worried if they size too big, I'll lose image quality with the button images. I'm very new to layout and coding and have only been doing this development stuff for a little while. What are my options? I figure they are...(and these might not even be possible, throwing them out there):
1) Create two version of the app, one only for iPad and one only for iPhone with different size/quality images for each.
2) Code swift to identify the device and assign the different image accordingly
3) Pick a resolution for the iphone image that when expanded on iPad won't lose much quality
4) I'm overreacting and this isn't a big deal whatsoever since it's just a basic glossy button with some shadowing.
Thank you! Advice/links appreciated.
The better option to add images for both iPhone(retina/non-retina) and iPad(retina/non-retina). Put the high-resolution and original versions of your image in the same location in your application bundle.
Ones you added images same as the below naming format in to your application resources, the application will automatically pick the right one for you.
MyImage.png - Default version of an image resource.
MyImage#2x.png - High-resolution version of an image resource for devices with Retina displays.
MyImage~iphone.png - Version of an image for iPhone and iPod touch.
MyImage#2x~iphone.png - High-resolution version of an image for iPhone and iPod touch devices with Retina displays.
MyImage~ipad.png - Version of an image for iPad.
MyImage#2x~ipad.png - High-resolution version of an image for iPad devices with Retina displays.

PDF being squeezed and losing aspect ratio in IOS 8 on Iphone

I have a website that allows users to view PDF documents. In mobile safari in iOS 8 I am having issues with landscape oriented PDF's being squeezed to fit the window. This pdf should have a landscape orientation (it looks like the browser is forcing it into portrait). The user is being directly linked to the pdf file they wish to view aka: http://whatever.com/anygivenpdf.pdf
Here is a screenshot of the issue in the IOS simulator (Iphone 5, IOS 8.1). I do not have this issue in IOS 7. Any thoughts on a fix or where the issue is originating from? I'm thinking it's either way the PDF's are saved or something must be fixed for the browser itself.
I regard this primarily as a Safari bug in iOS 8.
However, I have found a way to modify a PDF document to avoid this problem. My method works only on a Mac:
Open the existing PDF doc by the Preview app.
Select "Export as PDF..." from the File menu.
In the pop-up box where you select the new file name, click first on the button "Show details" in the lower left corner.
Select the icon for landscape orientation!
Give the document a new filename.
Click Save.
(I run a Swedish version of Mac OS X, so I am not 100% sure that I have used exactly the correct terms used in the menus of the English version, but I think you will find your way based on my description.)
Credits to these posts, putting me on the right track:
https://discussions.apple.com/thread/6540211
and
http://www.appligent.com/my-pdf-document-is-rotated-how-do-i-fix-that/
In the second one, you will find a specific description on how to fix the problem using Acrobat Distiller, if you happens to have that application installed. That should be a way forward if you run Windows, I believe.

iPhone app loading

When I load my iPhone app it always loads a black screen first then pops up the main window. This happens even with a simple empty app with a single window loaded.
I've noticed that when loading, most apps zoom in on the main window (or scale it to fit the screen, however you want to think about it) and then load the content of the screen, with no black screen (see the Contacts app for an example).
How do I achieve this effect?
Add a Default.png to your project. This should be the image you want shown instead of the black launch screen.
Also just to save you some time, there is no way to change this image during the runtime of your application. If you look at Apple's Clock application you can see how depending on the last state of the application, the Default.png changes. You cannot do this in your own app because of permission limits. Also, make sure to read the iPhone HIG for best practices on Default.png use, in short, dont use it as a splash screen like Twitteriffic.
You can also take a screenshot of your app as an aid to creating the Default.png - while holding the Home button, press and release the Lock Sleep/Wake button. The screenshot can be find in your Camery Roll library in the Photos app and can be synced back to your desktop.
When the app transitions from the launch image to the actual app content, it should not be jarring to a user - content (text/images) can be added to the screen, but content should never change. If all this leaves you with is an empty blue header, a white body, and a blue footer - then that's all you should have. If you have a persistent tab bar on the bottom & a localized app (different text descriptions), then then launch image should appear with icons but no text. (See Clock.app & Facebook.app for examples.)
Screenshots can also be taken in XCode using the Screenshot tab in the Organizer window and a plugged-in device.

Resources