WatchOS: Panning and zooming image [closed] - zooming

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
In my little watch app (targeting watchOS3+) I need to show an image which will be fetched from a server (it is not big, let's say 600x600).
The image will be displayed alone in a modal page (only the Close button is on the top left corner)
Similar with the Photos app, I would like to be able to offer the user the possibility to pan and zoom the image.
Zooming will be done by using the Digital Crown (the events are wired up already).
Any idea how to deal with panning and zooming? Did anyone implement something like this already?
Thank you in advance!

I have solved the problem by implementing a small trick (see attached image).
Basically the zooming (Digital Crown) happens "in background" on a cached UIImage and a viewport (sized exactly as the display size) crops an area from the UIImage and shows it via the WKInterfaceImage.
Panning is done by simply moving the viewport around, following the TapGestureRecognizer data.
I think I will encapsulate this in a custom control and put it on GitHub.

Related

webpage intro video overlay and how often it plays [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I am designing a webpage with an overlay intro video. Essentially the moment you enter the webpage an intro video will play. It works and did what I wanted it to do. WHAT I DON'T WANT IT TO DO is play every time I go into this page. What I want to do is:
Have the video play the moment you enter the page (PAGE A).
Then lets say you go to page B...
After that you return to page A and the video doesn't play again until after a certain period of time (lets say 12 hours).
We did figure out a way to do this but we lost the code, so we know its possible.
Anyway you guys can help me out here?
I would look into localStorage or sessionStorage. Either of those can be used to store information in-browser - for example, whether or not the user has seen the video before. On load, check localStorage for videoPlayed (or whatever you decide to call the variable) and use that to determine whether or not to show the video.
The main difference between the two is that localStorage never expires, while sessionStorage does once the page/browser is closed.

Image sprites for website [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Is it better to use image sprites for CSS or use a lot of different image files?
Maybe it is better to use a lot of different images rather than one sprite or vice versa?
As typical website contains multiple css, java script and image files,causing browser to request multiple http requests. By using sprite it causes less http requests (good for webserver and client/user), and so page will be load fast (good for client/user)
Put everything in 1 sprite, so only 1 request is needed.
EDIT
Actually it's best to put everything that's related on the same sprite, for example a sprite with forum images, a sprite with homepage images, ...
Since you don't need the forum images on the homepage. (-> reduce size of request)

Images doesnt load on website (on iPad) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Im creating website with paralax effect. Today I heard that images just are not displayed on iPod ?!
I cant check that, because I dont have access to iPod. Can someone tell my why main pictures dont appear in iPod?
Website: http://www.badzlepszy.pl/Nebiolo2/
The images you are using are multiple images of 2000x1200px in size. There is a limit for the maximum amount of pixels allowed in an image. You can visit this website to see which devices should be capable of displaying your images.
The iOS resource limits are described on the Apple website at the heading "Know iOS Resource Limits".
Using these large images on a iPod could cause the problem of not displaying the image.
I tried it on my ipod an can confirm that it looks odd. some of the images are shown though.
You have some errors in your html. Try to fix them first e.g.
<div id="sitelanguage"> outside of body tag
<div class="pasek_suwakow" style="top: 345px;> <-- " missing after 345px
</br></br>
see http://validator.w3.org/check?uri=http%3A%2F%2Fwww.badzlepszy.pl%2FNebiolo2%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

I'm having some problems with a few images not loading but the rest are [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am working on a site and I am designing a landing page where you click on pictures and it will take you to a product page.
I have just hit a problem that I was asked to put a slider into the page above everything, I haven't yet started that and thought that i would upload the site for now to a test server to make sure everything is running OK.
Most of the page is but there are three images on one section (3/6) that just will not load. I've looked over the coding and cant seem to find any mistakes with the code.
You must provide some of your code referring to the images, then only someone can help you. Anyway there can be an issue that you were not providing the correct path for the image. Also, sometimes it happens issue with writing the format of the image in caps or small letter. It make work with image.gif but not with image.GIF for example. So, look into image property also and find the correct format.

How to make a part of Chrome "always on top"? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Edit on 20190109. Just to clarify some thinks.
1. This is quite an old question, closed and yes off-topic (and also kind of a xy-problem question), still if you feel like it go on and down-vote it, I couldn't care less.
2. When I posted the question I wasn't aware of Electron and the solution it provides to my original requirement (and not the work around I am asking on this question).
I was wondering if i could change some things in my chrome with an extension, so when i press..
1) the windows button + D
2) or the minimize button
3) or the "Show Desktop" button in windows 7
..a part of chrome would still be visible, to be more specific i want to turn to a state of "always on top" the 1) tab bar
2) the address bar
3) and the bookmark bar
so is it possible to "split" an application like chrome in two "pieces" and somehow change its visibility in one of those "pieces"? any ideas are welcomed!
The easiest way to achieve this, in my thought, is combine a third-party program with a chrome extension.
For example, if you are under windows, you can use a program like Window On Top by Skybn. This program uses the Ctrl+F8 hotkey to toggle always on top window state, then you make an extension wich manipulate the browser window position and dimensions using the same hotkey.
To get the chrome window on top of screen with only tabs, adress and boookmarks, you can use something like this:
chrome.windows.getCurrent(function(window){
chrome.windows.update(window.id,{top:0,left:0,width:screen.width,height:100})
});