How to implement vertical scroll page on watchOS with SwiftUI - swiftui

I want to implement a vertical scroll page like system workout app.
Now I can get a similar effect with this:
    TabView {
      page1
        .rotationEffect(.degrees(90))
      page2
        .rotationEffect(.degrees(90))
    }.tabViewStyle(.page(indexDisplayMode: .automatic))
    .rotationEffect(.degrees(-90))
But not good as system workout app does. It supports digital crown and dynamic show indicator and custom color.
So , how to implement that vertical scroll effect?

https://github.com/fredyshox/PageView
This repo works well except crown supports.

Related

SwiftUI: Status bar color for specific view

I have a specific view in my application where I need the status bar to be white (dark mode).
I've tried setting the .preferredColorScheme(.dark) but as the documentation mentions, that affects all the views in my window which is not what I'm looking for.
I've taken a look at this but it seems to be done using SceneDelgate which I am not making use of.
Is there any workaround to this?
For iOS 16, you can set .toolbarColorScheme for a specific View. Unfortunately, this is not supported on older iOS Versions. As a workaround that does not involve SceneDelegate, you could manipulate UIToolBar.appearance() directly with a new tint color. This has nothing to do with the preferred color scheme (e.g., light or dark mode), but could have the same effect.

how to change apache superset's chart's background color?

Per How to Change Apache Superset Template from the Superset User Interface? , I was able to change the CSS template for Superset dashboard. But the charts inside the dashboard are not affected. e.g. most of the charts have white colored background(e.g. Piechart) and some people dislike it. How to change the chart background color? I mean change it for all charts or for one chart.
Disclaimer: This should work, but is a bit hacky and could have long-term support implications:
I've been fiddling with a "dark mode" dashboard just to kick the tires on this. Here's a screenshot just for fun:
So... what did I do?
Click "Edit Dashboard" in the top right of your screenshot
When in edit mode, the top right menu has an option to "Edit CSS"
Use your browser's inspector to hack away! That said, here are a couple of key ingredients:
.dashboard-component{ background: whatever} - sets the main background of each viz card, but you'll still see many components still have white backgrounds within these wrappers.
.slice_container svg{
background-color: transparent !important;
} - this overrides the white background of the components I ran into (including Pie charts!).
If viz components use SVG you can get pretty clever with inspecting/overriding various bits. A couple of gotchas with the above:
If a viz component contains multiple SVG elements, this may have side effects.
If a viz uses canvas instead of svg you will run into more trouble
In the worst case scenario, you may need to check out the superset-ui-plugins repo and make tweaks. This dev process isn't super straightforward, but some of us are working to improve that.
Easiest solution for me is using dark reader extension.

Any tooltip library for iOS that can point and highlight navigation items?

I have tried tooltip pods like AmToolTip and EasyToolTip(that can point to navigation items) but I need toolTip that covers the whole screen with a blur overlay and highlights a particular view in navigation bar ie. navigation item.
For example The overlay option of this android library Simple Tool Tip Demo does exactly what I want
Thanks.
You could use Instructions in iOS. It allows you to add customizable coach marks into your iOS project. Available for both iPhone and iPad. You can also customize its properties.
You can also refer this link for more similar libraries in both Swift and Objective C.

Famo.us and landscape orientation

Is famo.us currently suitable for landscape oriented development ? I'm especially concerned in making it to work on iPhone. As I saw unfortunately the iOS < 7.1 safari takes a quarter of the height just for the navigation bar. Hiding it completely involves adding the app (webpage) to the main screen.
Famo.us is most certainly suitable for landscape oriented Design. The sizing feature of 'undefined' for Famo.us surfaces and the origin constraints on modifiers allow for designs to fit any number of device sizes and orientations.
Detecting an orientation change using only Famo.us can be done using something similar to the following..
Engine.on('resize',function(){
size = context.getSize();
if (size[0] > size[1]) {
// landscape
} else {
// portrait
}
});
Right now there isn't a way to automagically hide browser chrome without saving to home screen with the proper meta tags for ios and android. Alternatively, a Famo.us app can be wrapped in Cordova and distributed on AppStore and Google's Play Store, and the app will display in full screen without browser chrome.

How do I create a slider in the GDK?

Programming the GDK a few weeks now, the CardScrollView is a pretty nice interface for displaying cards. However one issue with the UI is showing the user how far along they are in the card stack. In the Mirror API, this is nicely handled by the Slider view at the bottom of the screen as described on the Glass Design page:
https://developers.google.com/glass/design/style/metrics-grids
Unfortunately, I have not been able to get this Slider object to display on the CardScrollView and instead have resorted to a klugey 1 of n text.
Is there any way to get this Slider view to display in the GDK?
This is not yet supported by our API but is currently tracked with Issue #256.
For future reference, this feature has been already implemented as described in the original issue.
You can use the method setHorizontalScrollBarEnabled to show the bar, e.g.
mCardScrollView.setHorizontalScrollBarEnabled(true);