Can't figure out why background picture doesn't fill all screen - swift

I can't figure out why background picture doesn't fill all screen. There some fields around where superview could be seen.
Maybe there is something with that it is presented modally via segue?
This is what I get
And this is what I want to achieve. Note that superview background fills all screen width:

There is the problem in pixels of your image , preview your image and go to adjust size then give perfect height and weight as per your background view and use it

Related

UIImageView does not fit my screen properly

I have a UIImageView that fills up the majority of my screen, with the exception of a navigationBar at the top. On my storyboard, I am using the formatting mode titled "compact width|regular height" that is supposed to work for all iPhones in portrait mode. When I attempt to run my app on an iPhone 5c, with iOS8, the imageView does not fill to fit the screen, and appears to "spill out" of the screen, based on the size and positioning of the image within the imageView. I do not have any auto-layout constraints on my imageView, because when I attempt to put them on they enlarge and distort the image even further. I have tried Scale to Fill, Aspect Fill, and Aspect Fit, and none of those work. I have also made sure that the clip to subviews selection button has been checked, so that the bounds are clipped. If anyone can help me, I would really appreciate it. Thanks!
You can disable the auto-layout and use the autoresizing mask.
I used this on images and fixed the prob like yours that I had.

UIImageView Tap Gesture Sensitivity

I have an ImageView object on my screen. When I tap it, it displays an info in a bubble style view. The problem is the imageview is very thin and small, it does not pick the tap gesture. Any suggestions about how to increase the sensitivity? Any solutions?
You need to increase the size of the screen area that is responding to the tap. So you could make the imge view bigger (but set the content mode to center so the image isn't stretched).

why is there a margin introduced at the top as I move from iPhone startup image to same image as background on UIView?

why is there a margin introduced as I move from iPhone startup image to same image as background on UIView?
So I have:
image used for background/startup on iPhone, it's size is: 320 x 480
after startup I have a UIView that displays the same image (idea is not to have any difference the user can see when transisiton from start up image to the UIView background image)
the first view is "inside" a UINavigationController, however I set the MenuBar and Toolbar to hidden
There is however blank grey margin introduced at the top of the screen, between the signal strength bar and the top of the background image? The height of this grey margin I wasn't expecting looks to be about the height of the top signal strength bar. So this margin/bar effectively drops the background image downwards...
How can I remove this?
Before (i.e. iPhone startup image):
After (background image of first view):
Your launch image contains an imitation of the status bar. The launch image takes up the whole 320x480, but the background image is placed at the top of the main view which is below the status bar. So you can see the imitation status bar still.
Just decrease the y of the background image view to -20.
found two things required to fix it:
setting the View Mode to "bottom" and
found the imageview was slightly off positioned within the XIB designer itself

iPhone - Make a small image fill a custom larger button

I have a UIButton in which I want to insert an image that would stretch to the button size. The button property allow it to stretch "down" the included image to fit the button size, but I want to do the opposite : the thing is that my image is small, and I want it to grow if the button is bigger than the image.
How may I do this ?
Set the image as the background image of the button.
you can use property value Aspect Fit or something related to it.
I had same problem and after searching i found a good thread.
How do I scale a UIButton's imageView?
I will suggest you to set background image of button which will solve your problem.
And be careful if you are resizing image programatically it will take time to resize. If you have multiple images and you are resizing programatically do it on different background thread which will protect your main thread and GUI will not hang and set resized image on main thread.

Obj-C, how to handle a background image which is squashed on some views and not others?

I've got a background image with a radial gradient, on some views it looks fine.
But on others where I have extra controls at the top of the view its squashed as it has less room to be show.
I guess I'm going to have to take account of the where the images starts at the top or the bottom, so one end will loose a section. But if I can do this via a property, rather than stretch ? or if I have to chop the image some how ?
What can I do?
Are you showing with UIImageView? Default contentmode is set to UIViewContentModeScaleToFill, which is to stretch in all directions to fit frame.
Change contentMode property to get the effect you want, ie UIViewContentModeScaleAspectFill.