Skip to content

Instantly share code, notes, and snippets.

View kArTeL's full-sized avatar

Neil García kArTeL

  • Universidad de Costa Rica
  • San José
View GitHub Profile
@kArTeL
kArTeL / FRP iOS Learning resources.md
Last active September 9, 2015 18:33 — forked from JaviLorbada/FRP iOS Learning resources.md
The best FRP in iOS links.

Videos

/// Observes a run loop to detect any stalling or blocking that occurs.
///
/// This class is thread-safe.
@interface GHRunLoopWatchdog : NSObject
/// Initializes the receiver to watch the specified run loop, using a default
/// stalling threshold.
- (id)initWithRunLoop:(CFRunLoopRef)runLoop;
/// Initializes the receiver to detect when the specified run loop blocks for
-(void)webViewDidFinishLoad:(UIWebView *)webView{
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"jquery" ofType:@"js"];
NSData *fileData = [NSData dataWithContentsOfFile:filePath];
NSString *jsString = [[NSMutableString alloc] initWithData:fileData encoding:NSUTF8StringEncoding];
[webView stringByEvaluatingJavaScriptFromString:jsString];
NSString *filePath2 = [[NSBundle mainBundle] pathForResource:@"spritely" ofType:@"js" inDirectory:nil];
NSData *fileData2 = [NSData dataWithContentsOfFile:filePath2];
NSString *jsString2 = [[NSMutableString alloc] initWithData:fileData2 encoding:NSUTF8StringEncoding];