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
- override func activityType() -> String? { | |
- return "XXXX" | |
+ override var activityType : UIActivityType { | |
+ return UIActivityType(rawValue: "XXXX") | |
} |
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
import UIKit | |
import TwitterKit | |
class LoginViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let logInButton = TWTRLogInButton { (session, error) in |
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
import UIKit | |
import TwitterKit | |
class LoginViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
/* | |
let logInButton = TWTRLogInButton { (session, error) in |
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)doImagePickerController | |
{ | |
UIImagePickerController* imagePicker = [[UIImagePickerController alloc] init]; | |
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; | |
imagePicker.allowsEditing = NO; | |
imagePicker.delegate = self; | |
[[NSOperationQueue mainQueue] addOperationWithBlock:^{ | |
[self presentViewController:imagePicker animated:YES completion:nil]; | |
}]; |
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
Shader "Sprites/Sepia" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_Color ("Tint", Color) = (1,1,1,1) | |
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 | |
} | |
SubShader |
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
Shader "Sprites/Monochrome" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_Color ("Tint", Color) = (1,1,1,1) | |
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 | |
} | |
SubShader |
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
public Handler(Callback callback, boolean async) { | |
if (FIND_POTENTIAL_LEAKS) { | |
final Class<? extends Handler> klass = getClass(); | |
if ((klass.isAnonymousClass() || klass.isMemberClass() || klass.isLocalClass()) && | |
(klass.getModifiers() & Modifier.STATIC) == 0) { | |
Log.w(TAG, "The following Handler class should be static or leaks might occur: " + | |
klass.getCanonicalName()); | |
} | |
} |
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)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view from its nib. | |
self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; | |
} | |
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
- (IBAction)close:(id)sender | |
{ | |
[UIView animateWithDuration:0.2f | |
animations:^{ | |
self.view.alpha = 0.2f; | |
} | |
completion:^(BOOL finished){ | |
[self.view removeFromSuperview]; | |
self.view.alpha = 1.f; |
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)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
//... | |
if (editingStyle == UITableViewCellEditingStyleDelete) { | |
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; | |
} | |
} |
NewerOlder