Note: I looked at the other questions similar to this one, and they were either outdated or not useful.
Unfortunately there are so many different screen sizes and that makes auto layout really confusing for me. I want to have a simple UIImageView to cover the entire screen no matter what screen size it is. So the dimensions of the UIImageView should change accordingly.
I tried adding constraints to squish the image and it worked fine. But an error in the debugger said that there was an error: UIViewAlertForUnsatisfiableConstraints
Is this a big deal? And if it is, how do I get the Image to fill the entire screen?
Edit: The game will have squares going down the screen, which the user must tap
It might be, or it might not be a big deal, depending on what you're doing and if you know what you're trying to accomplish. In my experience, this is usually an issue if you're trying to programmatically alter the frame of a view which already has set constraints (you shouldn't alter the frame by hand unless you really need it).
Without more detail, it's hard to say what the exact issue is.
Related
I started a new Xcode project with the ARKit template and simply replaced the "ship.scn" with my "test.scn" filename asset. The object is about 16.5mm wide and 4.8mm tall. The ship worked fine of course, but my test object that reads "test" does not rotate as I move around it, or scale when I move towards or away from it, yet it does track in one location.
I compared the ship and test attribute panels, and I can't find anything that is different about them, except that the ship is textured and my test text is not. What is inherently special about scn objects that would make them behave correctly in ARKit besides their size? I've read through the documentation about anchoring, but it seems like I wouldn't have to do this in code if it's already a scn object.
In case anyone wants to test the file I'm using in the ARKit template to see how it's behaving, the file is here: https://ufile.io/ey49t
I’m answering the question because I think it could help others that are making a similar mistake, but it can be closed if it doesn’t make sense.
The problem is that the size was much too large where I could not see scaling or rotation no matter how much I moved around the room. Compare the scaled size in the last attribute panel on the ship model - not its actual size. Then get the size of your own model scaled down enough so that it is actually resonable.
Okay the Title can be misleading.
But it´s like this.
I have made an application that constantly sends Images from Client A to Client B.
When Client B receives the image, it will replace the last image.
I currently use Picturebox or Panel, so pretty much:
panel1.BackgroundImage = Image.FromStream((MemoryStream)NetSerializer.Serializer.Deserialize(tt1.GetStream()));
It looks weird though, but as you can se, it will just change the image, when it´s there.
This all goes well up to about 800x600, then it will bottleneck.
I don´t know the update frequency, but i am guessing it´s around 60fps, as i am taking screenshots from my desktop or particular windows.
The bandwidth is not the problem here as long as i don´t use .bmp at 800x600+ of course.
Anyway, my question is, what can i use to replace this way of showing images?
I am guessing something with Directx/OpenGL or something?
Sadly i haven´t found a way to even display an image with that, though then again, i have a hard time understanding it.
I am open for suggestions and examples.
EDIT:
I am thinking, maybe to use WPF to just show the image.
But i don´t know if i can change the background image from a winform, so if it´s possible then i am all ear.
Thanks
Still a n00b (sorry) and I wondered if there is a solution this rather simple quandry which I cannot find an answer for (probably because it is so simple).
Basically I have a label which is inside a custom box. When I change the box size and then hit run the box size changes back to another random annoying size. It sounds simple enough but can I change it so that it sticks to the definitions I set. I have a series of labels and it would be great if the layout were the same. Thanks.
Turn off 'Live Autoresizing' in the menu.
I have a set of really big images out of which I need to crop little snippets. These snippets are all exactly the same size but don't follow a strict pattern so I can't do this programatically.
Ideally I would like to open up one of the big files and be able to point and click on say, the top left corner of a snippet and have that automatically be saved to disk without even having to enter a file name, and then continue on with the rest. (Of course this would be the ideal way which I know is probably way off the real possible way!).
I started doing this in Photoshop CS4 but cropping a snippet, saving, undoing (to get to the full image), and starting over again takes way too long.
Maybe someone has a better way to do this in photoshop or in some other software.
Thanks for reading!
Instead of cropping and undoing, you could:
make (or resize) a selection
copy the selection to a new image
save the image
close the image
You might need to split it into two actions, I don't know enough about programming Photoshop.
Thank you everyone for your input.
I ended up doing this with a suggestion a colleague of mine came up with. It consisted of creating a Photoshop "slice" over the first region I wanted to crop and then cloning that region over the rest of the other sections. After that, using Save For Web (and ofter hitting Continue when PS complained about how that image was way beyond Save For Web's capabilities) I could save all images at once.
This was the fastest and easiest method I could find. Until then I was going with Mark Ransom's method.
I'm working on a Cocoa application which will be used for a digital-signage/kiosk style display. I've never done anything like this with Cocoa before, but I'm trying to figure out what the best approach is for building the user interface for it.
My main issue is that I need a way to have the user interface scaled up or down depending on the resolution of the display. When I say scaled, I mean that I want everything including white space to maintain the same sizing ratio. The aspect ratio of the interface needs to remain the same (16x9), but it should always fill the entire width of the display its on.
Sorry if I'm not being descriptive enough.
What are some thoughts?
If I follow you correctly, you want all buttons and views, etc. to get larger, the bigger the screen is (which has nothing to do with the dimensions of your views). If that's the case, there's no automatic way to do this.
With Quartz Debugger (part of Xcode Tools), you can set the scaling factor (see "resolution independence"), but this would need to be manually adjusted per system. What's more is I'm not sure if this tinge is persistent across reboots. I leave that for you to investigate.
As far as I know, though, there's no way to adjust this programmatically as resolution independence is still not an exposed consumer feature of OS X.
If anyone is interested, I seem to have found a solution under this post: http://cocoawithlove.com/2009/02/asteroids-style-game-in-coreanimation.html