I hereby claim:
- I am srm on github.
- I am mcsam (https://keybase.io/mcsam) on keybase.
- I have a public key ASAW8uJGGQWjiWZ8kEEWv5elGhR4KYhNE9vT9pkIjoHrowo
To claim this, I am signing this object:
-(void)webViewDidFinishLoad:(UIWebView *)webView{ | |
//Get the height of the web view, and change it's size to fit the content it's displaying. | |
[webView setFrame:CGRectMake(webView.frame.origin.x, | |
webView.frame.origin.y, | |
320, | |
[webView stringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight;"].intValue)]; | |
//Change the scrollview's contentSize to accommodate the new height of the webView. | |
self.scrollView.contentSize = CGSizeMake(320, webView.frame.size.height+webView.frame.origin.y); | |
} |
self.webView.scrollView.scrollEnabled = NO; | |
self.webView.scalesPageToFit = NO; |
-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{ | |
BOOL someOtherCondition = [request.URL.scheme isEqualToString:@"http"]; | |
if((navigationType == UIWebViewNavigationTypeLinkClicked)&&(someOtherCondition)){ | |
return NO; | |
} | |
else { | |
return YES; | |
} |
#import "FLOCow.h" | |
@interface FLOCow (isMilkable) | |
- (BOOL) milkable; | |
- (void) setMilkable:(BOOL)canMilk; | |
@end | |
FLOCow+isMilkable |
-(BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer{ | |
if ([gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]]){ | |
NSLog(@"Velocity: %f",[(UIPanGestureRecognizer*)gestureRecognizer velocityInView:self.pageViewController.view].x); | |
if ([(UIPanGestureRecognizer*)gestureRecognizer velocityInView:self.pageViewController.view].x > 0.0) { | |
return [self isThereAPrevArticle]; | |
} | |
else if ([(UIPanGestureRecognizer*)gestureRecognizer velocityInView:self.pageViewController.view].x < 0.0) { | |
return [self isThereANextArticle]; |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<dartKeyBindings version="1"> | |
<!--The format is straightforward, consisting of two attributes plus one that is optional. | |
The required attributes are the command name, which is the same as it appears in | |
menus, and the key sequence, which is all uppercase. The optional attribute is the | |
name of the platform to which the binding applies if it is not universal.--> | |
<keyBinding commandName="Backward History" keySequence="ALT+ARROW_LEFT"/> | |
<keyBinding commandName="Backward History" keySequence="ALT+COMMAND+ARROW_LEFT" platform="cocoa"/> | |
<keyBinding commandName="Backward History" keySequence="COMMAND+[" platform="cocoa"/> | |
<keyBinding commandName="Close" keySequence="COMMAND+W"/> |
body { margin: 30px; } | |
hr { | |
border: none; | |
border-top: 1px solid #eee; | |
height: 5px; | |
background: -webkit-radial-gradient(50% 0%, 50% 5px, #aaa 0%, white 100%); | |
} |
I hereby claim:
To claim this, I am signing this object: