would appreciate some advice. I have an app with a UIView, which contains a CALayer with animation.
Using constraints, I resize the UIView for Ipad with a bigger width and height. I noticed in simulator that the correct size would not apply unless I had the appropriate device active on storyboard. I assumed this would not be an issue in production, but now the app is published, I find that if the user firstly downloads the app on the Iphone, then when they open the app on Ipad the UIView has not resized to the larger view. I assume the opposite will be true if the app is first downloaded onto the Ipad, ie., the larger UView will appear on the Iphone.
I suspect I'm making a simple mistake here, but any opinion as to where the issue might lay would be much appreciated.
Thanks
Related
I am 2 days into iOS app development, I am quite new. The very first thing I wanted to implement in my app is a Launch Screen using Storyboards (I heard there are other ways but I found this the easier). I have a vector-based PDF file (image) because I wanted to implement a gradient background without a loss in quality that supports all device resolutions.
I created an Image View in the Interface-Builder (IB) but it does not automatically stretch vertically and horizontally to fill the device length.
I simulate my results on an iPhone 14, only thin white margins appear, but on a large iPad, the majority of the screen is white. It's like as if the the image resolution is fixed across all devices.
No matter what resizing I try, I can't get it to work.
I come from an Android app development background so something like this is very easy to implement (we have fill_parent / match_parent to stress the view to its containing parent view dimensions). Is such a behavior possible on iOS ?
You have to apply constraint on the image in launch screen.
Since Apple is requiring a storyboard launch screen in a few months I went ahead and tried to add one. Adding one is simple and it works just fine but it screws up the layout after loading the app. No longer does a larger screen automatically adjust the resolution, instead I'm left with an SE layout on an 8 Plus screen placed in the top-left corner with the background image repeating (like wallpaper from a 90s website). I'm not using constraints, but I'm not even sure if that's the issue. If so I have a feeling I have a lot of work ahead of me (keep in mind I've never had a need for constraints). A side thought though is, from what I understand, Apple wants all apps to look correctly on all devices... makes perfect sense. But my apps have always appeared correctly no matter the device. So it's ironic that adding the launch screen is breaking my apps' appearances. Is it the constraints? Is there an alternative solution? Or is there hopefully something simple in the launch screen that needs to be changed? Thank you!
I want to convert an iphone app to universal. the iphone storyboard has a UITableView. I used Auto-layout and Use Size Classes using the latest XCode and added missing constraints however I cannot make the tableView and its cells go all the way down; it's only half way of the screen. Can anyone have an idea on how to do this; Thank you very much. I attached the screenshot here:
[]
I have several custom UITextfields in my app. I started this app on Xcode 5 and ran on iphone 5 simulator. After Xcode updated to Xcode 6, I ran the app on iPhone 6 simulator. Now all the textfield positions moved up because of large screen size. I just wanted to know is there anything I could do so that the positions of textfields automatically get adjusted depending upon the iPhone models.
You need to rebuild your interface to handle the different screen sizes. In particular, you need to work with the AutoLayout feature to help determine how you want everything to scale/move/position based on multiple screen sizes. This can be done via the Storyboard (easier but sometimes frustrating) or in code (harder at first but more control later). I usually use Storyboards and it's worked great on several projects.
Do you want it centered and respecting your original layout and margins? a certain distance from the top or sides? everything scaled up appropriately? All these things can be done with AutoLayouts.
Check out the great tutorial here for more information:
http://www.raywenderlich.com/50317/beginning-auto-layout-tutorial-in-ios-7-part-1
I need your help. I have designed an app to target iPhone only and everything works fine. However, I just realised that when I run it on iPad, I get black spaces around the screen (view doesn't cover full screen of the iPad) and strangely, the bottom part of the app gets cut off when it runs on iPad. How do I get full screen iPad mode without part of the view getting cut off. Thanks
This is normal behaviour(black spaces around the screen) if the value for "Devices:" under Target/deploymentInfo is set to iPhone. In this case you can still test on iPad but with iPhone resolution. (but if it set to iPad you can not test on iPhone).
if you want to get iPad resolution you have to change "Devices:" value to universal.
for (bottom cut) check if your code uses device size for positioning buttons.
Your app must also run on iPad without modification as for
2.10 App Store Review Guidelines
At first, you have to set your the view (on Main.storyboad) to fit all size. That is `wAny hAny).
Then selected the views, add some constrains to them one by one. When you run the app, it should be right. If the position doesn't match your expectation, you can change the constrains. You should know things about AutoLayout. Find some article to read, and practise.
Thanks guys for all the comments. Using your comments and reading and testing AutoLayout features, I am able to solve the problem.