Skip to content

Commit c98139b

Browse files
author
dzenbot
committed
Adds a third target to the sample project for swift example
1 parent ceaeef7 commit c98139b

File tree

17 files changed

+1978
-2315
lines changed

17 files changed

+1978
-2315
lines changed

Examples/Messenger/Messenger/Info.plist renamed to Examples/Messenger/Messenger-Programatic/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<key>CFBundleDevelopmentRegion</key>
66
<string>en</string>
77
<key>CFBundleDisplayName</key>
8-
<string>${PRODUCT_NAME}</string>
8+
<string>Programatic</string>
99
<key>CFBundleExecutable</key>
1010
<string>${EXECUTABLE_NAME}</string>
1111
<key>CFBundleIdentifier</key>
12-
<string>com.slack.${PRODUCT_NAME:rfc1034identifier}</string>
12+
<string>com.slack.$(PRODUCT_NAME:rfc1034identifier)-Programatic</string>
1313
<key>CFBundleInfoDictionaryVersion</key>
1414
<string>6.0</string>
1515
<key>CFBundleName</key>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//
2+
// Use this file to import your target's public headers that you would like to expose to Swift.
3+
//
4+
5+
#import "SLKTextViewController.h"

Examples/Messenger/Messenger-Shared/MessageViewController.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ - (id)init
3636
self.users = @[@"Anna", @"Alicia", @"Arnold", @"Armando", @"Antonio", @"Brad", @"Catalaya", @"Christoph", @"Emerson", @"Eric", @"Everyone"];
3737
self.channels = @[@"General", @"Random", @"iOS", @"Bugs", @"Sports", @"Android", @"UI", @"SSB"];
3838
self.emojis = @[@"m", @"man", @"machine", @"block-a", @"block-b", @"bowtie", @"boar", @"boat", @"book", @"bookmark", @"neckbeard", @"metal", @"fu", @"feelsgood"];
39-
40-
UIBarButtonItem *editItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icn_editing"] style:UIBarButtonItemStylePlain target:self action:@selector(editRandomMessage:)];
41-
42-
UIBarButtonItem *typeItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icn_typing"] style:UIBarButtonItemStylePlain target:self action:@selector(simulateUserTyping:)];
43-
UIBarButtonItem *appendItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icn_append"] style:UIBarButtonItemStylePlain target:self action:@selector(fillWithText:)];
44-
45-
self.navigationItem.rightBarButtonItems = @[editItem, appendItem, typeItem];
4639
}
4740
return self;
4841
}
@@ -105,6 +98,13 @@ - (void)viewDidLoad
10598
- (void)viewWillAppear:(BOOL)animated
10699
{
107100
[super viewWillAppear:animated];
101+
102+
UIBarButtonItem *editItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icn_editing"] style:UIBarButtonItemStylePlain target:self action:@selector(editRandomMessage:)];
103+
104+
UIBarButtonItem *typeItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icn_typing"] style:UIBarButtonItemStylePlain target:self action:@selector(simulateUserTyping:)];
105+
UIBarButtonItem *appendItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icn_append"] style:UIBarButtonItemStylePlain target:self action:@selector(fillWithText:)];
106+
107+
self.navigationItem.rightBarButtonItems = @[editItem, appendItem, typeItem];
108108
}
109109

110110
- (void)viewDidAppear:(BOOL)animated

Examples/Messenger/Messenger-Storyboard/AppDelegate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// AppDelegate.h
33
// Messenger-Storyboard
44
//
5-
// Created by Ignacio Romero Z. on 10/16/14.
5+
// Created by Ignacio Romero Zurbuchen on 10/16/14.
66
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
77
//
88

Examples/Messenger/Messenger-Storyboard/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// AppDelegate.m
33
// Messenger-Storyboard
44
//
5-
// Created by Ignacio Romero Z. on 10/16/14.
5+
// Created by Ignacio Romero Zurbuchen on 10/16/14.
66
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
77
//
88

Examples/Messenger/Messenger-Storyboard/Info.plist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>
14-
<string>$(PRODUCT_NAME)</string>
14+
<string>Storyboard</string>
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
@@ -35,7 +35,6 @@
3535
<string>UIInterfaceOrientationPortrait</string>
3636
<string>UIInterfaceOrientationLandscapeLeft</string>
3737
<string>UIInterfaceOrientationLandscapeRight</string>
38-
<string>UIInterfaceOrientationPortraitUpsideDown</string>
3938
</array>
4039
<key>UISupportedInterfaceOrientations~ipad</key>
4140
<array>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// AppDelegate.swift
3+
// Messenger-Swift
4+
//
5+
// Created by Ignacio Romero Zurbuchen on 10/16/14.
6+
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
@UIApplicationMain
12+
13+
class AppDelegate: UIResponder, UIApplicationDelegate {
14+
15+
var window: UIWindow?
16+
17+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18+
window?.backgroundColor = UIColor.whiteColor()
19+
return true
20+
}
21+
}
22+

0 commit comments

Comments
 (0)