Is there a way to change the image loading animation in KivyMD - kivy

I'm using FitImage to display an image as such:
FitImage:
source: "image_to_display.jpg"
where image_to_display.jpg comes from a django_rest API.
The default loading animation for KivyMD images doesn't fit the look I'm going for. Is there any way to change this loading animation? I'd prefer using the FitImage class if possible.

Related

Dynamic button with Lottie

I want to create button with three different states namely Initial, Loading, Completed.
UI for button state:
Initial -> TextLabel
Loading -> Loading indicator/multiple images
Completed -> TextLabel
It will be in Initial state normally when user clicks it then It will change its state to Loading with transforming itself to show loading indicator inside it. Once completed it will animate and transform to show the label.
How can I achieve it with Lottie?
I need to set initial and completed state texts dynamically but as per the docs I couldn't find out a way to change text into Lottie.
With Lottie I can use progress animation to handle different states of button but how can I change texts programatically without new json file.
Lottie doesn't support text layer in iOS. Any workaround for that except using shape layer?
You can modify the text for the Button in the JSON, via directly modifying the JSON itself programmatically. As Lottie animation and views are governed by JSON, it's not possible.
There's no proper API support in Lottie for this, but this thread has a discussion on possible ways you can change the text via the json file:
https://github.com/airbnb/lottie-web/issues/238

Is it possible to use a tracing image for view design within Interface Builder?

The UI for many iOS applications are either wireframed or fully designed prior to implementation.
The process of building a UI within IB is generally visually mimicking placement and design, but isn't there an easier and more accurate way to to this? Can't the design be loaded as a temporary background to aid placement?
Does IB support the ability to load an image as a temporary view background so that UI elements can be placed and scaled using the image as a guideline?
If not, is there a trick to this? Using an UIImageView, perhaps? Devoting a new layer to it? If so, what's the best way to incorporate a tracing image that without creating problems getting rid of it later?
The best way to do this, as you mentioned, is adding a UIImageView to your view controllers’ views with the frame of the view’s bounds. To prevent unintentional focusing/replacing, lock it.
To ensure maximal accuracy, set the size of your VC in Interface Builder to the size of the reference design.
For a third-party solution, you can also try out Flawless, although it only works in the iOS Simulator.

Which framework to use to make simple animations over a camera view

in my Application I like to use the frontcamera to display the user on the iPad/iPhone. This is already working. Now I like to have a simple transparent "HUD" floating over the cameradisplay. It's just a circle which should fill itself, so it is quite a simple animation. Since I am new to iOS Developing I am not sure which framework to use. Unfortunately there is no canvas like in android/html.
Can you please recommend a framework for doing the animations?
I would be very happy for a nice start into my next assignment!
Ios creating simple camera overlay in Xcode how?
The above question provides an answer which should help you add your own view over the top of the camera feed.
Make this an instance of a custom UIView subclass of your own which has the desired functionality.
UIKit has plenty of functionality for an animation as basic as the one you are describing. Look at setting the corner radius of your view.layer object and maybe animating a view from bottom to top using [UIView animateWithDuration:].

Get the default back indicator image of a Navigation bar

I want to use the default image of the back button of a navigation controller in
IOS7 elsewhere in my application.
How can i obtain that image?
Programmatically in runtime, you can't.
What you can is
Use extracted elements, e.g. from these sites:
http://avexdesigns.com/ios7-psd-templates/
http://www.teehanlax.com/tools/
Extract it yourself, using Resource extractor
Snapshot the screen and cut it out yourself (most inconvenient option).

How to create a see through button with "blurred" background in iOS 7

I am updating my app to iOS 7 and wanted to improve the UI. I want to create a see through background like Control Center. So basically I have a button, which I would like to have a see through and "blurred" background like control center. Thanks!
There's nothing to stop you using a UIToolbar.
Create a UIView as a base view with clear background, add a UIToolbar anchored to it's edges so it fills the view and then add your other controls to your base view above the toolbar.
It'll look for example like this:
The blurring effect is not available as a public API. There are third party implementations available, such as FXBlurView, which I can recommend.
You shouldn't really be using a toolbar. It's called toolbar for a reason.
One way to go would be to take a snapshot image of your background and blur it (you can use UIImage+ImageEffects category included in Apple samples to achieve consistent effect).
You can then just crop the image to desired frame and use it as a background of your button.
Are you looking to have a 'dynamic' blur effect (like in Control Center)? It's still doable, but it makes things more complicated.
You can also create blur effects with GUPImage Framework here is a full tutorial about it iOS blur effect tutorial. The tutorial also explains why you shouldn't use toolbar for blur effect creation

Resources