Skip to content

Instantly share code, notes, and snippets.

View marchampson's full-sized avatar

Marc Hampson marchampson

View GitHub Profile
@marchampson
marchampson / ios popup alert
Last active August 29, 2015 14:11
IOS popup alert
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No network connection"
message:@"You must be connected to the internet to use this app."
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
let animationImages:[UIImage] = [UIImage(named: "img_01")!, UIImage(named: "img_02")!, UIImage(named: "img_03")!]
loadingImageView.animationImages = animationImages
loadingImageView.animationDuration = 1.5
loadingImageView.animationRepeatCount = 0
loadingImageView.startAnimating()
self.addSubview(loadingImageView)