Swift Custom Map Callout - Resize for each device - ios

This isn't a coding question, more of in need of which way to go. I created a custom call out but the problem is that it doesn't resize to the devices. Some devices it fits perfect and others it completely zoomed in on. Will using the stack view method help with this size problem? Not sure how to go about this.

Related

how to display the zoom-in view in the standard mode of the large-screen phone

Recently I was asked to adapt to large-screen phones because the standard mode view looks too small on large-screen phones. So I thought of a simple way: display the zoom-in view in the standard mode of the large-screen phone. But i can't find a good way to realize it.
The original idea was to set the currentMode setting of UIScreen, but iOS does not support the creation of external UIScreenMode...
If you are not using a storyboard, use code with frame. You can use masonry, use multipliedBy. If you don’t change anything code and want to directly adapt, that’s unlikely.

How to get iOS app to work on all iPhones? (Constraints)

I am fairly new to developing for iOS. I have a fully functioning program written in Swift and the UI was created in the scene builder on Xcode. I created an app for my work to simplify closing out the registers and other financial aspects. The app is complete and works perfectly, but was designed on the iPhoneX. The problem is that only a few of the employees have an iPhoneX, but they all have some kind of iPhone. I have tried setting up constraints but it never works. Ive tried scaling restraints and position restraints but I can't get the layout to look right on any other phone, and when I add the constraints it affects the view on the iPhoneX as well and doesn't look good on any iPhone. I need help getting this to work on all iPhones. I would like it to look and act the exact same regardless of the size of the phone, basically just scaled down. There are a lot of things on the screen and I can't figure out how to do this. Please help!!!
I have been working on this for a long time and I really need help. Please let me know if I need to clarify anything. I have posted links to some pictures of my UI so you have an idea of whats going on.
Constraints I tried adding, although I have played around with some other options.
Here's what it looks like on the iPhoneX, this is how I want it to look.
What it looks like on iPhoneSE (with constraints).
One thing I noticed in your Xcode project that none of your features are in UIView. Without it, it will be quite challenging and somewhat always different results. In theory, if you use AutoLayout features correctly it should work without UIView, but they make life so much easier. This is something I learned the hard way at the beginning of my iOS development. First set up your UIViews without any content inside it, give them some background colour to differentiate, once they are working on all devices. You can pin your features to superviews with no difficulty.
Since you have a repetitive features, you could also consider using Stack Views. You don't have complicated features, so as long as AutoLayout is set up correctly you should have no problems seeing it ok on all devices

autolayout- different devices and rotation

I am absolutely new in iOS programming. I wonder if a View contains 4 narrow rectangle subviews where they are constraints to four sides, like a picture frame, if I can make this program works in portrait, landscape; in all devices, iPad, iPhone( different version). The reason I am asking is to find out if not possible to consider concentrating and finding out about the possible options.
thanks
Yes, auto layout will do it. you might want to take a look at this tutorial to get started:
https://www.raywenderlich.com/115440/auto-layout-tutorial-in-ios-9-part-1-getting-started-2

iOS Maps UIPopover misplaced after orientation change

we are working on a tablet app and have the following problem:
We are using popover controllers if the user touches a pin on the map but after orientation change, the popover is misplaced. But we cannot keep a reference because after orientation change, the pins are reloaded.
Did someone already have this problem and found a generic solution for this? I wonder how apple is handling this.
Generally the placement of popovers after orientation change is sometimes acting a bit strange.
thanks in advance
A common approach is closing the popover after rotation. Unfortunately there's not going to be much you can do that wouldn't require some complicated repositioning logic. Perhaps store the origin point as an iVar and calculate the new coordinates based on the new orientation. There's no generic solution for this, however.

ipad:orientation issues

Regards to everybody here I am with another problem. I have some screens which basically have several search filters and search results are displayed accordingly in a table. Now I have orientation issues cause this search screen does not cover the full screen in landscape mode.
Solutions that I came across:
Two xibs for same view but I'll loose data if I do so as this data will be in bulk so I can store it locally.
write lots of coordinate related code which is again cumbersome as there will be lots of search filters.
Autoresizemask -> not able to implement this upto expectations. (I tried this but was able to move the screen to the center but I wanted the complete view expanded resizefill something)
Can anybody enlighten me on this so that screens can be prepared in standard ways.
Thnx in advance.
Refer the screen shots
ok it finally worked.. we just have to adjust resizing mask for xibs or set autoresizemasks for the view-- as Ole Begemann mentioned

Resources