Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implemented delegate pattern - so you can now receive messages using …

…MosquittoClient.

Added second switch for Green LED.
Implemented listening to messages Marquette.
  • Loading branch information...
commit 780ed1b4ee752a9f4b7cd2a654931f47fadd5a9b 1 parent 810cc0e
@njh authored
View
5 Classes/MarquetteAppDelegate.m
@@ -38,10 +38,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
// FIXME: only if compiled in debug mode?
[mosquittoClient setLogPriorities:MOSQ_LOG_ALL destinations:MOSQ_LOG_STDERR];
-
- // Connect
- [mosquittoClient setHost: @"test.mosquitto.org"];
- [mosquittoClient connect];
+ [mosquittoClient setDelegate: self.viewController];
return YES;
}
View
19 Classes/MarquetteViewController.h
@@ -7,15 +7,26 @@
//
#import <UIKit/UIKit.h>
+#import "MosquittoClient.h"
-@interface MarquetteViewController : UIViewController {
- UISwitch *ledSwitch;
+@interface MarquetteViewController : UIViewController <MosquittoClientDeligate> {
+ UISwitch *redLedSwitch;
+ UISwitch *greenLedSwitch;
+ UITextField *hostField;
+ UIButton *connectButton;
}
-@property (nonatomic, retain) IBOutlet UISwitch *ledSwitch;
+@property (nonatomic, retain) IBOutlet UISwitch *redLedSwitch;
+@property (nonatomic, retain) IBOutlet UISwitch *greenLedSwitch;
+@property (nonatomic, retain) IBOutlet UITextField *hostField;
+@property (nonatomic, retain) IBOutlet UIButton *connectButton;
-- (IBAction) ledSwitchAction:(id)sender;
+- (IBAction) redLedSwitchAction:(id)sender;
+- (IBAction) greenLedSwitchAction:(id)sender;
+- (IBAction) connectButtonAction:(id)sender;
+
+- (void) didConnect:(NSUInteger)code;
@end
View
67 Classes/MarquetteViewController.m
@@ -12,7 +12,10 @@
@implementation MarquetteViewController
-@synthesize ledSwitch;
+@synthesize redLedSwitch;
+@synthesize greenLedSwitch;
+@synthesize hostField;
+@synthesize connectButton;
/*
@@ -61,19 +64,75 @@ - (void)viewDidUnload {
// e.g. self.myOutlet = nil;
}
-- (IBAction) ledSwitchAction:(id)sender {
+- (IBAction) redLedSwitchAction:(id)sender {
MarquetteAppDelegate *app = [[UIApplication sharedApplication] delegate];
MosquittoClient *mosq = [app mosquittoClient];
if ([sender isOn]) {
- NSLog(@"LED On");
+ NSLog(@"Red LED On");
[mosq publishString:@"1" toTopic:@"nanode/red_led" retain:YES];
}
else {
- NSLog(@"LED Off");
+ NSLog(@"Red LED Off");
[mosq publishString:@"0" toTopic:@"nanode/red_led" retain:YES];
}
}
+- (IBAction) greenLedSwitchAction:(id)sender {
+ MarquetteAppDelegate *app = [[UIApplication sharedApplication] delegate];
+ MosquittoClient *mosq = [app mosquittoClient];
+ if ([sender isOn]) {
+ NSLog(@"Green LED On");
+ [mosq publishString:@"1" toTopic:@"nanode/green_led" retain:YES];
+ }
+ else {
+ NSLog(@"Green LED Off");
+ [mosq publishString:@"0" toTopic:@"nanode/green_led" retain:YES];
+ }
+}
+
+- (IBAction) connectButtonAction:(id)sender {
+ MarquetteAppDelegate *app = [[UIApplication sharedApplication] delegate];
+ MosquittoClient *mosq = [app mosquittoClient];
+
+ // (Re-)connect
+ //[mosq disconnect]; UITextField
+ [mosq setHost: [[self hostField] text]];
+ [mosq connect];
+
+ [mosq subscribe:@"nanode/red_led"];
+ [mosq subscribe:@"nanode/green_led"];
+}
+
+- (void) didConnect:(NSUInteger)code {
+ [[self connectButton] setTitle:@"Reconnect" forState:UIControlStateNormal];
+}
+
+- (void) didDisconnect {
+ [[self connectButton] setTitle:@"Connect" forState:UIControlStateNormal];
+}
+
+- (void) didReceiveMessage: (NSString*)message topic:(NSString*)topic {
+ NSLog(@"%@ => %@", topic, message);
+
+ UISwitch *sw = nil;
+ if ([topic isEqualToString:@"nanode/red_led"]) {
+ sw = redLedSwitch;
+ } else if ([topic isEqualToString:@"nanode/green_led"]) {
+ sw = greenLedSwitch;
+ } else {
+ return;
+ }
+
+ if ([message isEqualToString:@"1"]) {
+ [sw setOn: YES];
+ } else if ([message isEqualToString:@"0"]) {
+ [sw setOn: NO];
+ }
+}
+
+- (void) didPublish: (NSUInteger)messageId {}
+- (void) didSubscribe: (NSUInteger)messageId grantedQos:(NSArray*)qos {}
+- (void) didUnsubscribe: (NSUInteger)messageId {}
- (void)dealloc {
[super dealloc];
View
24 Classes/MosquittoClient.h
@@ -13,10 +13,12 @@
unsigned short keepAlive;
BOOL cleanSession;
+ id delegate;
NSTimer *timer;
}
@property (readwrite,retain) NSString *host;
+@property (readwrite,assign) id delegate;
@property (readwrite,assign) unsigned short port;
@property (readwrite,assign) unsigned short keepAlive;
@property (readwrite,assign) BOOL cleanSession;
@@ -27,6 +29,7 @@
- (MosquittoClient*) initWithClientId: (NSString *)clientId;
- (void) setLogPriorities: (int)priorities destinations:(int)destinations;
+- (void) setMessageRetry: (NSUInteger)seconds;
- (void) connect;
//- (void) connectToHost: (NSString*) host;
- (void) reconnect;
@@ -35,7 +38,28 @@
- (void)publishString: (NSString *)payload toTopic:(NSString *)topic retain:(BOOL)retain;
//- (void)publishData
+- (void)subscribe: (NSString *)topic;
+- (void)subscribe: (NSString *)topic withQos:(NSUInteger)qos;
+- (void)unsubscribe: (NSString *)topic;
+
+
// This is called automatically when connected
- (void) loop: (NSTimer *)timer;
@end
+
+
+
+@protocol MosquittoClientDeligate
+
+- (void) didConnect: (NSUInteger)code;
+- (void) didDisconnect;
+- (void) didPublish: (NSUInteger)messageId;
+
+// FIXME: create MosquittoMessage class
+- (void) didReceiveMessage: (NSString*)message topic:(NSString*)topic;
+- (void) didSubscribe: (NSUInteger)messageId grantedQos:(NSArray*)qos;
+- (void) didUnsubscribe: (NSUInteger)messageId;
+
+@end
+
View
84 Classes/MosquittoClient.m
@@ -13,6 +13,62 @@ @implementation MosquittoClient
@synthesize port;
@synthesize keepAlive;
@synthesize cleanSession;
+@synthesize delegate;
+
+
+static void on_connect(void *ptr, int rc)
+{
+ MosquittoClient* self = (MosquittoClient*)ptr;
+ // FIXME: cache respondsToSelector
+ if ([[self delegate] respondsToSelector:@selector(didConnect:)])
+ [[self delegate] didConnect:(NSUInteger)rc];
+}
+
+static void on_disconnect(void *ptr)
+{
+ MosquittoClient* self = (MosquittoClient*)ptr;
+ // FIXME: cache respondsToSelector
+ if ([[self delegate] respondsToSelector:@selector(didDisconnect)])
+ [[self delegate] didDisconnect];
+}
+
+static void on_publish(void *ptr, uint16_t message_id)
+{
+ MosquittoClient* self = (MosquittoClient*)ptr;
+ // FIXME: cache respondsToSelector
+ if ([[self delegate] respondsToSelector:@selector(didPublish:)])
+ [[self delegate] didPublish:(NSUInteger)message_id];
+}
+
+static void on_message(void *ptr, const struct mosquitto_message *message)
+{
+ MosquittoClient* self = (MosquittoClient*)ptr;
+ NSString *topic = [NSString stringWithUTF8String: message->topic];
+ NSString *payload = [NSString stringWithCharacters:(const unichar *)message->payload
+ length:message->payloadlen];
+
+ // FIXME: cache respondsToSelector
+ if ([[self delegate] respondsToSelector:@selector(didReceiveMessage:topic:)])
+ [[self delegate] didReceiveMessage:payload topic:topic];
+}
+
+static void on_subscribe(void *ptr, uint16_t message_id, int qos_count, const uint8_t *granted_qos)
+{
+ MosquittoClient* self = (MosquittoClient*)ptr;
+ // FIXME: cache respondsToSelector
+ if ([[self delegate] respondsToSelector:@selector(didSubscribe:grantedQos:)])
+ [[self delegate] didSubscribe:message_id grantedQos:nil];
+ // FIXME: implement this
+}
+
+static void on_unsubscribe(void *ptr, uint16_t message_id)
+{
+ MosquittoClient* self = (MosquittoClient*)ptr;
+ // FIXME: cache respondsToSelector
+ if ([[self delegate] respondsToSelector:@selector(didUnsubscribe:)])
+ [[self delegate] didUnsubscribe:message_id];
+}
+
// Initialize is called just before the first object is allocated
+ (void)initialize {
@@ -34,6 +90,12 @@ - (MosquittoClient*) initWithClientId: (NSString*) clientId {
[self setCleanSession: YES];
mosq = mosquitto_new(cstrClientId, self);
+ mosquitto_connect_callback_set(mosq, on_connect);
+ mosquitto_disconnect_callback_set(mosq, on_disconnect);
+ mosquitto_publish_callback_set(mosq, on_publish);
+ mosquitto_message_callback_set(mosq, on_message);
+ mosquitto_subscribe_callback_set(mosq, on_subscribe);
+ mosquitto_unsubscribe_callback_set(mosq, on_unsubscribe);
timer = nil;
}
return self;
@@ -70,13 +132,33 @@ - (void) loop: (NSTimer *)timer {
mosquitto_loop(mosq, 0);
}
-// FIXME: add retained parameter?
+// FIXME: add QoS parameter?
- (void)publishString: (NSString *)payload toTopic:(NSString *)topic retain:(BOOL)retain {
const char* cstrTopic = [topic cStringUsingEncoding:NSUTF8StringEncoding];
const uint8_t* cstrPayload = (const uint8_t*)[payload cStringUsingEncoding:NSUTF8StringEncoding];
mosquitto_publish(mosq, NULL, cstrTopic, [payload length], cstrPayload, 0, retain);
}
+- (void)subscribe: (NSString *)topic {
+ [self subscribe:topic withQos:0];
+}
+
+- (void)subscribe: (NSString *)topic withQos:(NSUInteger)qos {
+ const char* cstrTopic = [topic cStringUsingEncoding:NSUTF8StringEncoding];
+ mosquitto_subscribe(mosq, NULL, cstrTopic, qos);
+}
+
+- (void)unsubscribe: (NSString *)topic {
+ const char* cstrTopic = [topic cStringUsingEncoding:NSUTF8StringEncoding];
+ mosquitto_unsubscribe(mosq, NULL, cstrTopic);
+}
+
+
+- (void) setMessageRetry: (NSUInteger)seconds
+{
+ mosquitto_message_retry_set(mosq, (unsigned int)seconds);
+}
+
- (void) dealloc {
if (mosq) {
mosquitto_destroy(mosq);
View
309 MarquetteViewController.xib
@@ -72,7 +72,7 @@
<object class="IBUISwitch" id="518672233">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 142}, {94, 27}}</string>
+ <string key="NSFrame">{{20, 86}, {94, 27}}</string>
<reference key="NSSuperview" ref="774585933"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -81,7 +81,7 @@
<object class="IBUILabel" id="249146888">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{122, 145}, {136, 21}}</string>
+ <string key="NSFrame">{{135, 89}, {136, 21}}</string>
<reference key="NSSuperview" ref="774585933"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -94,15 +94,92 @@
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
</object>
+ <object class="IBUITextField" id="336213979">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 201}, {148, 31}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <string key="IBUIText">test.mosquitto.org</string>
+ <int key="IBUIBorderStyle">3</int>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace" id="157298409">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIAdjustsFontSizeToFit">YES</bool>
+ <float key="IBUIMinimumFontSize">17</float>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocorrectionType">1</int>
+ <int key="IBUIKeyboardType">3</int>
+ <int key="IBUIReturnKeyType">9</int>
+ <bool key="IBUIEnablesReturnKeyAutomatically">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ <object class="IBUIButton" id="589606475">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{176, 198}, {124, 37}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">15</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Connect</string>
+ <reference key="IBUIHighlightedTitleColor" ref="74412193"/>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleShadowColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ </object>
+ <object class="IBUISwitch" id="188495567">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 126}, {94, 27}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ </object>
+ <object class="IBUILabel" id="733227742">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{135, 129}, {152, 21}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Nanode Green LED</string>
+ <reference key="IBUITextColor" ref="1044859411"/>
+ <reference key="IBUIHighlightedColor" ref="74412193"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ </object>
</object>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC43NQA</bytes>
- <object class="NSColorSpace" key="NSCustomColorSpace">
- <int key="NSID">2</int>
- </object>
+ <reference key="NSCustomColorSpace" ref="157298409"/>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
@@ -121,21 +198,63 @@
<int key="connectionID">7</int>
</object>
<object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">greenLedSwitchAction:</string>
+ <reference key="source" ref="188495567"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">13</int>
+ </object>
+ <int key="connectionID">25</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">redLedSwitchAction:</string>
+ <reference key="source" ref="518672233"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">13</int>
+ </object>
+ <int key="connectionID">26</int>
+ </object>
+ <object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">ledSwitch</string>
+ <string key="label">redLedSwitch</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="518672233"/>
</object>
- <int key="connectionID">11</int>
+ <int key="connectionID">27</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">greenLedSwitch</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="188495567"/>
+ </object>
+ <int key="connectionID">28</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">connectButton</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="589606475"/>
+ </object>
+ <int key="connectionID">29</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
- <string key="label">ledSwitchAction:</string>
- <reference key="source" ref="518672233"/>
+ <string key="label">connectButtonAction:</string>
+ <reference key="source" ref="589606475"/>
<reference key="destination" ref="372490531"/>
- <int key="IBEventType">13</int>
+ <int key="IBEventType">1</int>
</object>
- <int key="connectionID">12</int>
+ <int key="connectionID">30</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">hostField</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="336213979"/>
+ </object>
+ <int key="connectionID">31</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -166,6 +285,10 @@
<reference ref="591299183"/>
<reference ref="518672233"/>
<reference ref="249146888"/>
+ <reference ref="188495567"/>
+ <reference ref="733227742"/>
+ <reference ref="336213979"/>
+ <reference ref="589606475"/>
</object>
<reference key="parent" ref="0"/>
</object>
@@ -184,6 +307,26 @@
<reference key="object" ref="249146888"/>
<reference key="parent" ref="774585933"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">13</int>
+ <reference key="object" ref="336213979"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">15</int>
+ <reference key="object" ref="589606475"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">22</int>
+ <reference key="object" ref="188495567"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">23</int>
+ <reference key="object" ref="733227742"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -194,6 +337,14 @@
<string>-2.CustomClassName</string>
<string>10.IBPluginDependency</string>
<string>10.IBViewBoundsToFrameTransform</string>
+ <string>13.IBPluginDependency</string>
+ <string>13.IBViewBoundsToFrameTransform</string>
+ <string>15.IBPluginDependency</string>
+ <string>15.IBViewBoundsToFrameTransform</string>
+ <string>22.IBPluginDependency</string>
+ <string>22.IBViewBoundsToFrameTransform</string>
+ <string>23.IBPluginDependency</string>
+ <string>23.IBViewBoundsToFrameTransform</string>
<string>6.IBEditorWindowLastContentRect</string>
<string>6.IBPluginDependency</string>
<string>8.IBPluginDependency</string>
@@ -207,17 +358,33 @@
<string>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDEgAAwyQAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDBwAAwxsAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw3kAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDMAAAw3wAAA</bytes>
</object>
- <string>{{349, 253}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw0YAAA</bytes>
+ </object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABCXAAAwswAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDBwAAw0MAAA</bytes>
</object>
+ <string>{{479, 255}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAwycAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAwkwAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAwx4AAA</bytes>
</object>
</object>
</object>
@@ -237,7 +404,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">12</int>
+ <int key="maxID">31</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -246,25 +413,88 @@
<string key="className">MarquetteViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
- <string key="NS.key.0">ledSwitchAction:</string>
- <string key="NS.object.0">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>connectButtonAction:</string>
+ <string>greenLedSwitchAction:</string>
+ <string>redLedSwitchAction:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
- <string key="NS.key.0">ledSwitchAction:</string>
- <object class="IBActionInfo" key="NS.object.0">
- <string key="name">ledSwitchAction:</string>
- <string key="candidateClassName">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>connectButtonAction:</string>
+ <string>greenLedSwitchAction:</string>
+ <string>redLedSwitchAction:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">connectButtonAction:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">greenLedSwitchAction:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">redLedSwitchAction:</string>
+ <string key="candidateClassName">id</string>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">ledSwitch</string>
- <string key="NS.object.0">UISwitch</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>connectButton</string>
+ <string>greenLedSwitch</string>
+ <string>hostField</string>
+ <string>redLedSwitch</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIButton</string>
+ <string>UISwitch</string>
+ <string>UITextField</string>
+ <string>UISwitch</string>
+ </object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <string key="NS.key.0">ledSwitch</string>
- <object class="IBToOneOutletInfo" key="NS.object.0">
- <string key="name">ledSwitch</string>
- <string key="candidateClassName">UISwitch</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>connectButton</string>
+ <string>greenLedSwitch</string>
+ <string>hostField</string>
+ <string>redLedSwitch</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">connectButton</string>
+ <string key="candidateClassName">UIButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">greenLedSwitch</string>
+ <string key="candidateClassName">UISwitch</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">hostField</string>
+ <string key="candidateClassName">UITextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">redLedSwitch</string>
+ <string key="candidateClassName">UISwitch</string>
+ </object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -367,6 +597,14 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">UIButton</string>
+ <string key="superclassName">UIControl</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">UIControl</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -412,21 +650,26 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">UIView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="className">UITextField</string>
+ <string key="superclassName">UIControl</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="219938172">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
+ <reference key="sourceIdentifier" ref="219938172"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
@@ -482,7 +725,7 @@
<integer value="3100" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string key="IBDocument.LastKnownRelativeProjectPath">Marquette.xcodeproj</string>
+ <string key="IBDocument.LastKnownRelativeProjectPath">marquette.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">141</string>
</data>
Please sign in to comment.
Something went wrong with that request. Please try again.