Black temporary alert box in iOS - 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

Related

Appirater doesn't work

I'd like to show Appirater when I click some button.
here is my setting in appdelegate
Appirater.setAppId("...")
Appirater.setDaysUntilPrompt(0)
Appirater.setUsesUntilPrompt(0)
Appirater.setTimeBeforeReminding(30)
Appirater.setSignificantEventsUntilPrompt(10)
Appirater.userDidSignificantEvent(true))
Appirater.appLaunched(true)
and then I put below code in my view controller
Appirater.tryToShowPrompt()
I don't any idea how to call correct method in action.
You will be able to use forceShowPrompt method. However by forcing the prompt consider the side effects. By the way if you want to see the Appirater on the debug mode always, you can use Appirater.setDebug(true) method.

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

iOS error message tooltip

I need to show error message as a tooltip in iOS 8 but i don't know how to do it. What I want is something similar to the one shown in below image (I'm referring to the tooltip with messages Select and Select All):
There is a great collection of libraries which already target your problem.
For example have a look at: AMPopTip.
Then you could show the popover like:
self.popTip = [AMPopTip popTip];
[self.popTip showText:errorMessage direction:AMPopTipDirectionUp maxWidth:200 inView:self.view fromFrame:textField.frame];
and hide it:
[self.popTip hide];
Have a look at the github repo there are more examples for customizing this control.
You can find more which might suit your needs better here: cocoacontrols.com
I had a similar problem and wrote my own custom tooltip.
You can init with your custom view (i assume you write some delegations to detect actions within.) and present from anywhere.
Maybe not the best replacement of UIPopoverController but still works great. And a lifesaver for iPhone. Also highly customisable.
https://github.com/akeara/AKETooltip
Hope this helps.

What are black rounded rectangles in iPhone apps called

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];

FBProfilePictureView loading with delay

I'm setting the FBProfilePictureView with the user id but it takes a while, so i'd like to know if there is anything that indicates when the loading is done, so i can show an ActivityIndicator
You should take a look at SDWebImage librabry, you will be able to put a placeholder while loading your picture or add a progress indicator. I think everything you need is there.
Hope it helps.
There is no delegate or something similar in FBProfilePictureView that indicates when the image finished loading. Looking at the source code (https://github.com/facebook/facebook-ios-sdk/blob/master/src/UI/FBProfilePictureView.m) it seems like it should be fairly easy to fork the repo and add a few changes to notify you when the HTTP request has finished.

Resources