This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
################################################################################ | |
# | |
# iTunes Icon Generator v 0.3 | |
# | |
# | |
# This script requires ImageMagick. | |
# See link below for more defailed information: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIWebView webView; | |
for (id subview in webView.subviews ) { | |
if([subview isKindOfClass: [UIScrollView class]]){ | |
UIScrollView *scrollView = (UIScrollView *)subview; | |
scrollView.bounces = NO; | |
scrollView.scrollEnabled = YES; | |
scrollView.minimumZoomScale = 1.0f; | |
scrollView.bouncesZoom = NO; | |
scrollView.alwaysBounceVertical = NO; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (UIImage *)viewAsImage:(UIView *)aView { | |
if (!aView) { | |
return nil; | |
} | |
UIGraphicsBeginImageContext(aView.bounds.size); | |
[aView.layer renderInContext:UIGraphicsGetCurrentContext()]; | |
UIImage *aViewAsImage = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
return aViewAsImage; | |
} |
NewerOlder