Could the screen of apple watch be scrolling/paging style? - watchkit

If I want to design things on the Apple Watch with many contents then exceeds the screen, could it be scroll or paged?

Yes. It does. WKInterface allows you to scroll to bottom/up when content is more than the screen size. As you keep on adding the content to interface, Watchkit will automatically create scroll that allows you to view the content to the bottom. Second one is horizontal scrolling page by page. In WatchKit there is only one way to do horizontal page based scrolling. You have to set up a page based UI. You will have to have a new instance of a controller for each page. See link for more info.

Related

Allow the user to collapse the mobile browser's address bar on website that adjusts to viewport size

Mobile browsers like Chrome on iOS usually collapse the address bar when the user scrolls down. However, I have a page that adjusts the size of its content to the viewport (basically the content has CSS height:100vh). It's an image gallery so there is no point in it being any bigger than the viewport. Consequently, there is no possibility for the user to scroll. Yet, the page of course can make use of additional space, as this allows displaying the content bigger, providing a better user experience (especially since mobile phone screens are already so tiny).
I wonder if there is a way to maintain the ability to collapse the address bar to the user also on a page that cannot be scrolled. Alternatively, it would be a workaround if the collapsing could be triggered programmatically for example using JavaScript.

NSSplitView with toolbars

I'm trying to make an application that looks like the Messages app from Apple.
The NSSplitView has toolbars on both subviews of the NSSplitView. They blend in with the top toolbar. It's similar to the NSToolBar but that doesn't work in NSSplitView's. Is there any way to make this work?
I tried the CNSplitView but it doesn't provide the proper effect. Is there another way of doing this that I'm missing?
The interface i'm going for is here:
Instead of using NSToolbar, you can add your own views to the top of subviews in the NSSplitView to achieve this after hiding the existing titlebar.
NSWindow's titleVisibility can be used to hide the built-in titlebar, and by setting the window's styleMask to include NSFullSizeContentViewWindowMask you can cause the split view to take up the full height of the window.
To get the blur effect like toolbars/Messages you can use NSVisualEffectView in the top views. Setting the material NSVisualEffectMaterialTitlebar will give the same look as standard titlebars.
And finally, you can put NSStackViews inside the visual effect views, and then place the titlebar controls in there.
(And depending on the content that is below your fake toolbars, you might want to look into NSScrollView's contentInsets property to allow the scroll view to show all of the content, but still be able to scroll under your toolbar).

iPad SplitView Master View shows but with minor (and incorrect) variation

I'm practicing development of a simple iPad Split View app (Stanford's Hegarty online class). And everything works for the most part. However, the Master side ('left side), although working in landscape mode looks a little different than what I expect it to as a 'popover' in portrait mode. The 'popover' covers the left side of the screen including the toolbar button item that triggered it where normally it should not cover that button.
Unfortunately I can't post images so I'll try my best to describe in more detail. Normally the 'proper' popover will be hovering right below the bar item button that triggered it with a thick arrow-ish thingie (the 'anchor') pointing to the button and not covering that button. The popover can be dismissed by clicking on that button again (or elsewhere on the screen).
What's happening to me, however, is that when I click the bar item button to show the popover, the resulting popover 'covers' the button and essentially fills up the left portion of the screen (the detail view is under it and most of it is showing) with its designated width (so, again, it doesn't cover the entire detail view). The is no 'anchor' arrow pointing to the bar item button since it is obviously covering it instead. The popover is dismissed normally once I click anywhere else on the screen.
So why is my popover covering the button and not simply hovering under it with an 'anchor' pointing to it as it should?
I don't think it it makes much sense to post code at this point because I don't think it'll help and more importantly not sure what portion to post considering this might be a problem with how I wired it in the Builder. Any thoughts will be greatly appreciated!
Thanks!
Mo
I believe its a change that came in IOS5.1
If you want the same behaviour you probably need to set the master up as a popover segue, from a toolbar button or similar in the detail view, and set the split view delegate to not show the master in portrait.
I'm on the move now but if you want any more info let me know and I'll try and get back to you later.

Pause the playing video when switch to another div

I have 2 div's, one div has swf object & other has tabular data. Both are on same page. I would like to toggle them, if video display table div is hide, and if table then video div will hide.
This is working fine, but when toggle to table div video get started from start. I want to pause the existing video.
So please let me know how can I pause it without restart it.
If you are hiding the div with CSS (display:none;) the SWF file will start rendering as if you are opening the page for the first time or reloading it. First try to use (visibility:hidden;) but you will have to set the position to absolute because this way will preserve div's space on the page.
If this didn't help there is a bridge between javascript in the page and SWF files where you can ask for where the video is playing now before you hide the div, store this on the page, then when you restore the div you can tell SWF to seek to the stored time.
check this as a sample for javascript/AS3 interactions:
http://circlecube.com/2010/12/actionscript-as3-javascript-call-flash-to-and-from-javascript/

How to dynamically show number of products in a row according to browser size?

In an ecommerce site, I would like to display number of items in a row according to browser width, but minimum will be 4 items. Just like what has been done in Amozon site, if you try to browse amozon.com, try to maximize and shrink your browser, you will find that number of items display in [More Items to Consider] section is according to your browser size. It is smart enough to know when it should fully hide or show an item, no partially visible item forever.
Anyone know what is this technology called? Any idea how this can be done? Thanks in advance.
You can do this with float elements in a div with overflow:hidden. I'll jsfiddle a proof of concept for you.
JSFiddle:
http://jsfiddle.net/WLEzw/
Make your browser window bigger and smaller and you will see more and less pears.
That is just CSS based.
An example of what you want to accomplish from a friend website redesign
shrink and wide the browser so you can see the effect
You can also use JQuery to moniter whether browser window is resized, through $(window).resize function. And you'll have to call details of the products shown either using Ajax or with iframe by reloading the page within iframe with more products.
The code to be written inside browser's resize method will be as follows.
$(window).resize(function() {
//Your code on resizing the browser.
});

Resources