What are black rounded rectangles in iPhone apps called - ios

A lot of apps use a little center black rounded rectangle when an action is being called to save something to the network and normally contains a throbber.
What are they called in ios? UIActionSheets?
How do I create one when I want to save something?

Sounds like MBProgressHUD. You can find it here https://github.com/jdg/MBProgressHUD

Are you asking for loader?
If yes you can use UIActivityIndicatorView
or If you want to use some third party loader, MBProgressHUD will be a great option.
MBProgressHUD download from here

Try using UIAlert
you can customise it if needed

enter link description here
to show progress use code:
[SVProgressHUD showWithMaskType:SVProgressHUDMaskTypeBlack];
to stop progress use:
[SVProgressHUD dismiss];

Related

how to change MBProgressHUD activity indicator style?

I have integrated MBProgressHUD. It was previously showing small indicator but in swift 4 update or pod update, it is now changed large indicator. They might have changed UIActivityIndicatorViewStyleWhiteLarge in new pods. So my question is that how can I initialise using UIActivityIndicatorViewStyleWhite. I can't see any method to change indicator style. You can check both screenshot after and before.
Any idea how to change?
Write an extension for MBProgessHUD. Then customise the properties that are needed.
The MBProgressHUD is in cocoapods. so you have to fork their code from github and make the changes that you want.
You can then use the forked code in your project. MBProgressHUD’s MIT license allows you to do so.
In order to get the smaller indicator use:
UIActivityIndicatorViewStyleWhite
That's it!

Swift 3 iOS 10 - Apply the "Slide to Unlock" animation to a label

I want to use the "slide to unlock" animation from iOS for a button. I just want the animation not the function behind it.
To be honest I have no idea how to start. I googled this a while, but I found nothing for Swift 3.
Here is what I want in my app
Try out Shimmer from Facebook. They use it for loading but its usable on labels. Looks very similar to the iOS “Slide to Unlock”.
Shimmer

Change iOS System Keyboard Background Image and Buttons Image

Rather than creating a custom keyboard...how can I change the ios keyboard background image and get reference of the keyboard button or just the keyboard view programatically?
I do not want to replicate the whole ios keyboard, just tweak the keyboard here and there.
Solution Update:
You cannot update only the background or the buttons of the iOS System Keyboard! This is dues to the reason that Apple has limited the access to the Keyboard API. The most you can do is change the keyboard background color i.e. dark or light.
If you need to change the background to an image like me, you need to extend the ios keyboard i.e. make your own custom keyboard!
Please check below for accepted answer!
Hope this helps!
You can do something like this,
myTextField.keyboardType = UIKeyboardTypeDecimalPad; // many other options
myTextField.keyboardAppearance = UIKeyboardAppearanceDark; //many other options
If you want totally customize keyboard then refer this tutorial.
Hope this will help :)
For dark background you can use
mytextfield.keyboardAppearance = UIKeyboardAppearanceAlert;
For more customisation follow this link:
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextInputTraits_Protocol/index.html

Is it possible to customize application icon badge: Xcode?

This may be a foolish question. But I'm asking it because of my curiosity. Is there is any possible way to customize an iOS application icon badge image(as below:)..?
Thanks in advance...
Not possible at all. You have to use Default. After the app launch you can show custom badge icon of the UITabbar.
All the best !!!
If you mean the badge number that can be shown on an app icon, in white text over a red circle, then no, it cannot be set to a custom image. You can only control the number that is shown. It is set using the -[UIApplication setApplicationIconBadgeNumber:] method, i.e., the applicationIconBadgeNumber property on UIApplication:
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:99];
I have a possible solution, instead of using the OS to add a badge, what if you programmatically replace the app icon with a version that has the badge built into it.
You can use libraries such as:
https://github.com/skb1129/react-native-change-icon
The only question is, does anyone know if Apple would have any objections?

Black temporary alert box in iOS

I need a black temporary transparent box that must show something like "Loading...." with a spinner it. We can see such a view in twitter when "Tweeting" an update - it says "Sending tweet..." kinda thing.
Is this an inbuilt behavior in UIKit. How do I get this box to show up on screen for a few seconds and disappear.
please help.
You need to use DSActivityView. All this is handled there. Instead of doing your own thing I suggest you use this.
For what you need this is how you need to go -
#import "DSActivityView.h"
[DSActivityView activityViewForView:self.view withLabel:#"Tweeting"]; //to show spinner with label
[DSActivityView removeView]; //once its done
You can also try using MBProgressHud

Resources