Last active
August 10, 2020 11:17
-
-
Save AppKidd/0c75332a6a6eb800a86fb238376a771e to your computer and use it in GitHub Desktop.
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 "AppDelegate.h" | |
#import "Intercom/intercom.h" | |
@implementation AppDelegate | |
- (void) show:(UIButton *) sender { | |
[Intercom presentMessenger]; | |
} | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
[Intercom setApiKey:@"regenerated-:(" forAppId:@"regenerated-:("]; | |
UIViewController *rootViewController = [UIViewController new]; | |
rootViewController.view.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:0.0f blue:1.0f alpha:1]; | |
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; | |
[button addTarget:self | |
action:@selector(aMethod:) | |
forControlEvents:UIControlEventTouchUpInside]; | |
[button setTitle:@"Show View" forState:UIControlStateNormal]; | |
button.frame = CGRectMake(80.0, 210.0, 160.0, 40.0); | |
[rootViewController.view addSubview:button]; | |
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | |
self.window.rootViewController = rootViewController; | |
[self.window makeKeyAndVisible]; | |
return YES; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment