Animation in iOS 14 widget - swift

I can't find solution to implement kind of ProgressBar in Widget. I see, that Text component should be changed if has type .timer for example. I see default widget Clock, with nice animation of moving arrow. But am I able to implement custom animation in widget?

According to a Frameworks Engineer on Developer Apple Forum:
Animations and pan/zoom gesture do not work in widgets built with WidgetKits. Checkout https://developer.apple.com/videos/play/wwdc2020/10028/, where what works and doesn't.
Throughout the WWDC20 Meet WidgetKit video mentioned above, Apple stresses that Widgets are not mini-apps, so they don't support gesture based views (like scroll views) or animations. Widgets are meant to only have glanceable information. From WWDC20 Meet WidgetKit Video Transcript:
These widgets are not mini-apps. We do not support scrolling within the widget, interactive elements like switches and other system controls, nor videos or animated images.

Related

Build a stack of segmented views

I was looking at the official Apple Healthcare documentation, when I noticed that they have a really nice UI design that I've also seen in other apps. I attached the photo to this post.
As you can see, on the left, they have a stack of organized almost cards with titles and coloration. Is there a SwiftUI framework to display a stack such as this, or would I have to custom design a view to display each little piece? Is this a list view?

Flutter Splash Screen Animation

I want to create a custom animated splash screen like the splash screen of Uber iOS App:
I tried to create two containers and animate them but not even close to what Uber did.
Is there any way to do it programmatically instead of creating the animation and import it within the app?
Your question is not detailed so all I can do is giving a topic to you to train.
Flutter has a nice capability of animating things, but if the animation is too complicated, I prefer pre-built animations like AfterEffect or sth like that.
You can possibly do what you want using AnimatedContainer. But first, you need to gather more than basic animation knowledge in this area, so, here is the topic you need to dig..
One way is using CustomPainter, but it is also possible to use other built-in flutter widgets like explained here: https://flutter.dev/docs/development/ui/animations

How to make dart Widgets fully transparent to see platform native view under FlutterView?

I want to create a video chat app, using some platform native SDK like WebRTC to implement the video part, using flutter to implement other interactivity, how could I achieve that?
In Android, I try to hook the createFlutterView method, create a FrameLayout to hold the FlutterView and other native views under FlutterView, and make it as Activity's content view by setContentView.
FlutterView is a subclass of SurfaceView, so I can make it transparent like this:
flutterView.setZOrderOnTop(true);
flutterView.getHolder().setFormat(PixelFormat.TRANSPARENT);
To make FlutterView's surface background transparent, I declare android:colorBackground as #00000000 in my theme, according to FlutterView's source code.
With those setup, I can see the view under FlutterView for a short period, after that it's covered by Widgets declared in dart code. I think that short period is the dart code load time.
To verify that, I create a pure Android project with the same views as above, but without any dart code. In that project, views under FlutterView show well all the time.
So, my question is, how to make dart Widgets fully transparent to see platform native view under FlutterView?

How to implement Spotify-like iOS app sidebar feature

I've already implemented a sidebar like that in Facebook/Path apps with ECSlidingViewController but I've noticed that Spotify app it's a bit different and has a very slick effect. The sidebar is not already full visible but it slides and show the icons as more as you swipe with your finger. How to animate the sidebar in this way?
Here an image for a better explanation.
Take a look at MMDrawerController https://github.com/mutualmobile/MMDrawerController
It has nice sample app and allows custom sliding effects, including the one you are looking for
There are many such libraries available to implement the behaviour you have asked for. I would recommend ECSlidingViewController since its easy to use plus it supports StoryBoards:
ECSlidingViewController
As i said there are a lot of different libraries to implement the same thing. You can also check the link HERE that contains a whole list of similar libraries.

best approach for modal text popup, after user clicks on "assistance" icon?

In terms of providing a nice text popup for users in an iPhone application, after they click on a help icon, what approach/style do people recommend?
In my view (re User Experience) I would have thought something that say:
has a thin border with rounded edges around it
takes up most of the screen
has a vertical scroll bar if there is more text than can fit on one screen
has a way for the user to dismiss
Interested in:
recommended approach re UI design
how to implement (which IOS UI objects to use)
nice to have - example code
The thing about designing iPhone UI elements, including popups, is that you're very strongly recommended to do it "Apple's way" - follow their Human Interface Guidelines and use standard UI controls. The two ways I can think to do this offhand:
Use a UIAlertView for a single chunk of text - it includes buttons for dismissal, properly shaded and colored for consistency with the rest of the OS and other apps. This is a quick, one- or two-line way of putting text on the screen and taking it off again. The downside: there's no scrolling capability, and the box scales with the text you put in it (i.e. you can't fix a size for the view).
Use a new view (in a UIViewController) presented modally. This option gives you more flexibility and the capability to scroll, but at the cost of greater setup.
If you decide to go the second route, follow your existing instincts for how to lay it out - you'll take over the entire screen on an iPhone, so you have some wiggle room. Your rounded-edges guess and vertical scrolling are right on (consider a UIScrollView for implementation).