Skip to content
View StealImages.swift
override func viewDidAppear(animated: Bool) {
flightView.hidden = false
private func stealImagesFromView(view: UIView) {
let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)
let documentsDirectory = paths.first!
View colorizeView.m
- (void)colorizeView:(UIView *)view
static CGFloat alpha = 0.1f;
view.backgroundColor = [[UIColor blueColor] colorWithAlphaComponent:alpha];
alpha += 0.1f;
for (UIView *subview in view.subviews) {
[self colorizeView:subview];
View -stealImagesFromView:
- (void)stealImagesFromView:(UIView *)view
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0]; // Get documents folder
for (UIView *subview in view.subviews) {
if ([subview isKindOfClass:[UIImageView class]]) {
UIImageView *imageView = (UIImageView *)subview;
if (imageView.image) {
NSString *filename = [NSString stringWithFormat:@"image (%f)", [NSDate timeIntervalSinceReferenceDate]];
Something went wrong with that request. Please try again.