Scroll screen in IOS - ios

I have been trying to find a way to use a background image so that it is larger than the device screen size, IE: the user can scroll from top to bottom and side to side to view the entire image.
This is something I'm looking at in gaming. I just haven't found any way to do this, I know its because I'm looking in the wrong place or asking the question in an incorrect manner, so any help would be appreciated.

For this problem you can use scrollView and insert in it a content view , and give it say 3 times widths/heights of screen , see demo here ScrollAnyway

Related

Flutter: Scroll, move widget, everything in the same screen

I'm trying to implement the following screen in Flutter.
It seems trivial to do so, but I couldn't find a way to achieve the same results. This is what I have so far:
My solution without scrolling
Solution following the Flutter demo but placing a map as a SliderAppBar
As you can see, I have a few problems:
This is the most accurate solution (don't look at the small blue widget moving up and down). I can move on the map and scroll through the ListView but I can't move the divider to expand the ListView. Notice that I don't want the ListView to move to the top, but until the user stops.
This one seems the correct solution but, as you can see, there are more problems: The map seems to resize instead of stay the same but just resize its container, and when I scroll down, I see the background of the Scafold.
Any ideas? This is the link to the solution 1.
PD: Sorry for the links to the GIFs. Their size was about 10MB each and I couldn't upload here.

swift 4 and Xcode autoLayout and UIImageview as Button

I am working on auto layout and making those UIIMages as Button.
I would like to make those button to be clicked and switch the images
as well as showing some words in the label.
In this case what should I do?
In addition, as it is shown, the auto layout ratio is different only from the iPhone SE. In. this case What should I consider?
Many thanks,
The first thing you need to learn is auto layout. Start with basic Always go with Apple's doc first
This one I likes he is good and you will also find how to use buttons as image view, using card game example, check other tutorials also very helpfull.
Stanford university autolayout by Michel Deiman
As far, your question just gives your label Horizontal in the container constraints(open storyboard in the right bottom third from last (allin) click on it popUp will open), and 20 bottom to the buttons and it will be in the centre. Every elements need x,y height and width so it knows exactly where to place, so you also need to give constraints to the buttons, Learn stackView to understand how to place your button without giving many constraints to each button and stack view will handle it for you, try hide and show to one of the button and magically stack view will adjust all adjustment. I suggest before staring Do read apple's doc first.
And Your question is too broad to answer, so read and try adding different constraints based on your need and ask a specific question(after trying by yourself) like why this label getting cut what constraints should i add so people know exactly what you want to achieve, people are always ready to help, just ask the right question.
happyCoding

Detail Text and Accessory Don't show [duplicate]

I'm trying to use Auto Layout for a custom Table View Cell in my app.
I can't seem to get the constraints quite right.
I layed the labels out in the custom Table View Cell, but the labels are still getting cut off. Any ideas?
Thanks! Will post anything else needed. Tried to show needed info in picture below:
Debugging in Xcode. Somehow what shows in Simulator looks different than in Xcode debug.
Here's the width of my TableView shown:
UPDATE:
The problem here was related to what user matt said in the accepted answer, but I wanted to make the Q&A a bit clearer now that I have it figured out for anyone else that comes across this.
In his initial comment, he mentioned the Xcode View debugging, which was great and I was able to dig into a little bit more. Its called the Assistant Editor: Device Preview, where you are able to see the layout and layers of what is onscreen to see if maybe you have labels overlapping or going offscreen based on the device it is running on. If you want to check multiple device sized, just hit the plus icon in the lower left hand corner of this picture.
This helped me find overlapping layers and sizing issues with the TableView. I was able to see how it looked on each device size.
What also helps here sometimes to use the Pin menu. Sometimes the labels can run off screen because it doesn't know where the constraints of the cell are based on the device size. So your label can run offscreen if the label is based off of a landscape layout but the device is an iPhone 5 and is in Portrait for example. This is the Pin menu:
Hope that makes sense and gives some more color to the problem. Let me know if you have any questions at all, thanks for the help everyone!
The problem is that you are using auto layout but you have not done anything about sizing the table view. The table view here is not your view controller's view; it is a subview. Your view controller's view is automatically sized to the size of the device / window, but its subviews are not automatically resized. So you are ending up with the table view much too wide for the device; the whole table is sticking off into space on the right side.
Use a trailing space from the right side of your labels to the edge of their superview, and set it to greater than instead of equals with a value of ~ 5
Review the constraints of your tableview with the View. Draw cell border, label border and tableview border with different colors to know which elements do not display correctly.
Ex:
#import <QuartzCore/QuartzCore.h>
...
cell.layer.border.width = 1;
cell.layer.border.color = [UIColor blackColor].CGColor;
The thing that worked for me to solve views being clipped was to uncheck "Constrain to margins" in Auto Layout.

Creating uicollectionview layout 3x3 and horizontal paging

I have a UICollectionView and I want to make it to show at most 9 images on the screen at a time... 3x3 and I want to load 9 at a time by scrolling from the right to the left (and being able to see the ones already loaded, without reloading be scrolling from left to right).
I've been doing some research and I don't think I know how to even ask the correct question.
Does anyone have any idea where I can start to look?
Thanks.
I think this is a good place to start.

Horizontel Overlap on iPad

I have two column site current set up using wordpress but an having trouble figuring out how to fix the right side column so that it does not allow it to scroll over the right side on the iPad. On desktops the page behaves as it should, however on iOS the div is able to scroll over the nav bar. My problem is the right column needs to be able to scroll vertically, so if I give it a fixed position I loose that functionality. Here is the link http://www.adamheimer.com, thanks to anyone who can help me out!.
Not entirely certain about what you're after, but have you looked at overflow-y:scroll style? It allows you ensure an element is a certain height, and if the element exceeds that height, the user is able to scroll it.

Resources