Menu animation based on the work of CreativeDash. http://dribbble.com/shots/1239862-iPad-Mini-Showcase-Template
A Pen by Matt Hoiland on CodePen.
// Create CustomView.xib, set File's Owner to CustomView. | |
// Link the top level view in the XIB to the contentView outlet. | |
class CustomView : UIView { | |
@IBOutlet weak private var contentView:UIView! | |
// other outlets | |
override init(frame: CGRect) { // for using CustomView in code | |
super.init(frame: frame) | |
self.commonInit() |
<?php | |
$target_path = "uploads/"; | |
$uploadedFiles = array(); | |
/*** check if a file has been submitted ***/ | |
if(isset($_FILES['userfile']['tmp_name'])) | |
{ | |
/** loop through the array of files ***/ | |
for($i=0; $i < count($_FILES['userfile']['tmp_name']);$i++) | |
{ |
#import "AFHTTPRequestOperationManager.h" | |
#import "AFURLSessionManager.h" | |
- (void)uploadImage | |
{ | |
NSError *error; | |
NSMutableDictionary *param = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"$2y$1UW3CKMNTe",@"TOKEN_KEY", | |
@"1",@"userId", | |
@"lovely dog",@"animalName", | |
@"2",@"categoryId", |
+ (NSDictionary*)getParamFromURL:(NSString*)str | |
{ | |
NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; | |
NSString *url=str; | |
NSArray *comp1 = [url componentsSeparatedByString:@"?"]; | |
NSString *query = [comp1 lastObject]; | |
NSArray *queryElements = [query componentsSeparatedByString:@"&"]; | |
for (NSString *element in queryElements) { | |
NSArray *keyVal = [element componentsSeparatedByString:@"="]; | |
if (keyVal.count > 0) { |
<html> | |
<head> | |
<meta name = "viewport" content = "user-scalable=no, initial-scale=1.0, maximum-scale=1.0, width=device-width"> | |
</head> | |
<body> | |
<script> | |
var TimerInterval = 3000; | |
var isMobile = { |
#pragma mark - UIImage | |
/* | |
* ScrollView must use only TopLeft AutoResizing Option | |
*/ | |
+ (void)displayImageInFixedHeightScrollView:(UIScrollView*)imgScrollView imageView:(UIImageView*)imageView image:(UIImage*)image | |
{ | |
CGSize finalSize = image.size; | |
// Adjust ImageVieww Size |
- (UIWebView*)createWebViewContent:(NSString*)content frame:(CGRect)frame | |
{ | |
NSString * webContent = [NSString stringWithFormat:@"<html><head><meta name = \"viewport\" content = \"initial-scale = 1.0, user-scalable = no\"><style type='text/css'> body {color:black; margin:0 0 0 7pt; font-family: %@ !important; font-size:13; background-color: transparent;} .label{color:red} </style></head><body face=\"Bookman Old Style, Book Antiqua, Garamond\" size=\"5\"><div>%@</div></body></html>",WEBVIEW_FONT,content]; | |
UIWebView *webView = [[UIWebView alloc] initWithFrame:frame]; | |
webView.delegate = self; | |
webView.tag = 444; | |
webView.backgroundColor = [UIColor clearColor]; | |
[webView loadHTMLString:webContent baseURL:nil]; |
<li class="picasa-image"> | |
<a class="picasa-image-large" href="http://lh6.ggpht.com/-f_ywI3XJxmg/SxqjI5ZAWBI/AAAAAAAAD18/ByMLDXTzxVA/DSC_5180.JPG"> | |
<img class="picasa-image-thumb lazy" src="http://lh6.ggpht.com/-f_ywI3XJxmg/SxqjI5ZAWBI/AAAAAAAAD18/ByMLDXTzxVA/s144/DSC_5180.JPG"> | |
</a> | |
</li> | |
<style> | |
.picasa-image{ | |
border: 3px solid white; |
<!-- @Reference : http://www.abeautifulsite.net/blog/2011/11/detecting-mobile-devices-with-javascript/ --> | |
<html> | |
<head> | |
<!-- For Syntax Highlighting --> | |
<script src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css"></link> | |
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"></script> | |
<script> | |
function styleCode() { | |
if (typeof disableStyleCode != 'undefined') { return; } |