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)action:(UIButton *)sender; | |
{ | |
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:nil | |
delegate:self | |
cancelButtonTitle:@"Cancel" | |
destructiveButtonTitle:nil | |
otherButtonTitles:@"Take Picture", @"Choose from Library", nil]; | |
[sheet showInView:self.view]; | |
} |
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
@interface Class : Class <UIActionSheetDelegate, UIImagePickerControllerDelegate> | |
@end |
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)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { | |
/** | |
* Interesting enough, this method is called sometimes when authenticating with Facebook - but the page continuous to load, and | |
* does so sucessfully. The user can actually login. Other time though, the request may fail and be an actual failure. | |
* | |
* Because we don't really know the nature of this error, nor can we assume, we need to call the delegate and inform them of the error. | |
*/ | |
NSLog(@"WebView error. This sometimes happens when the User is logging into a social network where cookies have been stored and is already logged in. %@", [error description]); | |
if ([self.delegate respondsToSelector:@selector(cmSocialLoginViewController:hadError:)]) { | |
[self.delegate cmSocialLoginViewController:self hadError:error]; |
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)openMenu:(CCMenuItem *)item; | |
{ | |
// UI KITTTTTTTTTT | |
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"DMMainMenu_iPhone" bundle:nil]; | |
UIViewController *menu = [storyboard instantiateViewControllerWithIdentifier:@"DMMainMenuNavigationController"]; | |
menu.modalPresentationStyle = UIModalPresentationFullScreen; | |
menu.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; | |
if (menu) { | |
[[CCDirector sharedDirector] presentViewController:menu animated:YES completion:^{ | |
[[CCDirector sharedDirector] pause]; |
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
// | |
// KPUser.h | |
// Header File | |
// | |
#import <CloudMine/CloudMine.h> | |
@interface KPUser : CMUser | |
@property (nonatomic, copy) NSString *firstName; |
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
81883A97-D747-42C9-A005-136F44B0A2DC - String file contents |
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
b0d5853a-7265-4de6-9121-058d2f7eca93 - String file contents |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.Testing" | |
android:versionCode="1" | |
android:versionName="1.0"> | |
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/> | |
<!-- GCM connects to Google Services. --> | |
<uses-permission android:name="android.permission.INTERNET" /> |
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
(require 'ido) | |
; ido settings | |
(setq ido-enable-flex-matching t) | |
(setq ido-everywhere t) | |
(ido-mode 1) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. |
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
// In MyLoginViewController.m | |
- (IBAction)loginWithSocial { | |
[_user loginWithSocialNetwork:CMSocialNetworkGithub viewController:self params:@{@"scope" : @"gist"} callback:^(CMUserAccountResult resultCode, NSArray *messages) { | |
if (resultCode == CMUserAccountLoginSucceeded) { | |
NSLog(@"We have successfully logged in!"); | |
} | |
}]; | |
} |