This file contains 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
NSString *a = @"bar"; | |
NSString *aSelector = @"uppercaseString"; | |
NSString *b = [a performSelector:NSSelectorFromString(aSelector)]; | |
//NSString *b = objc_msgSend(a, NSSelectorFromString(aSelector)); | |
NSLog(@"b: %@", b); | |
//=> b: "BAR" |
This file contains 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
// | |
// ExtendNSLogFunctionality.m | |
// ExtendNSLog | |
#import "ExtendNSLog.h" | |
#define NSLOG_DEFAULT_COLOR "\033[fg200,200,200;\033[bg10,10,10;" // Colors for the plugin XCodeColors | |
#define NSLOG_ERROR_COLOR "\033[fg255,0,0;\033[bg255,255,255;" |
This file contains 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
// | |
// ExtendNSLogFunctionality.h | |
// ExtendNSLog | |
#import <Foundation/Foundation.h> | |
#define EXTENDEDNSLOGVERSION @"1.0 beta" | |
#ifdef DEBUG | |
#define NSLog(args...) ExtendNSLog(__FILE__,__LINE__,__PRETTY_FUNCTION__,args); |
This file contains 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 *)circularScaleAndCropImage:(UIImage *)image frame:(CGRect)frame { | |
// This function returns a newImage, based on image, that has been: | |
// - scaled to fit in (CGRect) rect | |
// - and cropped within a circle of radius: rectWidth/2 | |
//Create the bitmap graphics context | |
UIGraphicsBeginImageContextWithOptions(CGSizeMake(frame.size.width, frame.size.height), NO, 0.0); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
//Get the width and heights |
This file contains 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
// handy tool for troubleshooting Core Data using X-Code scheme | |
1. select project file in X-Code | |
2. choose Edit Scheme... from the menu | |
3. Click the “Run yourapp.app” option | |
4. In the Arguments Passed On Launch section, add the following : -com.apple.CoreData.SQLDebug 1 | |
5. Press OK and run the app | |
// Now you see lot's of information in the Debug Area |
This file contains 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
// | |
// API Walkthrough 1 - Signature Request via Template (Objective-C) | |
// | |
// To run this sample: | |
// 1. Copy the below code into your iOS project | |
// 2. Enter email, password, integrator key, name, templateId, and roleName and save | |
// 3. Compile and Run | |
// | |
// Enter your info: |
This file contains 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
Redirect 301 /oldpage http://www.yoursite.com/newpage |
This file contains 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
- (void)viewDidLayoutSubviews | |
{ | |
[super viewDidLayoutSubviews]; | |
self.imageView.layer.masksToBounds = YES; | |
self.imageView.layer.cornerRadius = self.imageView.bounds.size.width / 2.; | |
} |
- AngularJS is not a library, it's a framework that embraces extending HTML into a more expressive and readable format
- AngularJS is a structural framework for dynamic web apps
- A framework that lets you use HTML as your template language and extend HTML's syntax to express your application's components clearly and succinctly
- Angular is an opinionated framework on how a CRUD application should be built
- Angular was built for the CRUD application in mind. Games and GUI editors are examples of applications with intensive and tricky DOM manipulation. These kinds of apps are different from CRUD apps, and as a result are probably not a good fit for Angular