Skip to content

Commit

Permalink
CHANGED: UI Adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ochs committed Sep 16, 2012
1 parent 0a530da commit 0c9409e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 32 deletions.
14 changes: 7 additions & 7 deletions REDLEDClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
4C3028051605D853004AC24C /* UIPRangeSelector.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C3028041605D853004AC24C /* UIPRangeSelector.m */; };
4C3028091605EB4B004AC24C /* Highlight.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C3028071605EB4B004AC24C /* Highlight.png */; };
4C30280A1605EB4B004AC24C /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4C3028081605EB4B004AC24C /* [email protected] */; };
4CE04F02160606C40072D906 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4CE04F04160606C40072D906 /* Localizable.strings */; };
50288CAD16025874005F6F3A /* HSBColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50288CA916025874005F6F3A /* HSBColor.cpp */; };
50288CAE16025874005F6F3A /* RGBColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50288CAB16025874005F6F3A /* RGBColor.cpp */; };
50A27AD915FB900600B0D39B /* RGBSCBonjourBrowserViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 50A27AD815FB900600B0D39B /* RGBSCBonjourBrowserViewController.m */; };
Expand All @@ -19,7 +20,6 @@
50AF0CC515F8D39B00BB3C5F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50AF0CC415F8D39B00BB3C5F /* UIKit.framework */; };
50AF0CC715F8D39B00BB3C5F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50AF0CC615F8D39B00BB3C5F /* Foundation.framework */; };
50AF0CC915F8D39B00BB3C5F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50AF0CC815F8D39B00BB3C5F /* CoreGraphics.framework */; };
50AF0CCF15F8D39B00BB3C5F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 50AF0CCD15F8D39B00BB3C5F /* InfoPlist.strings */; };
50AF0CD115F8D39B00BB3C5F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 50AF0CD015F8D39B00BB3C5F /* main.m */; };
50AF0CD515F8D39B00BB3C5F /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50AF0CD415F8D39B00BB3C5F /* AppDelegate.mm */; };
50AF0CD815F8D39B00BB3C5F /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 50AF0CD615F8D39B00BB3C5F /* MainStoryboard.storyboard */; };
Expand All @@ -33,6 +33,7 @@
4C3028041605D853004AC24C /* UIPRangeSelector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIPRangeSelector.m; sourceTree = "<group>"; };
4C3028071605EB4B004AC24C /* Highlight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Highlight.png; sourceTree = "<group>"; };
4C3028081605EB4B004AC24C /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
4CE04F03160606C40072D906 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
50288CA916025874005F6F3A /* HSBColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HSBColor.cpp; sourceTree = "<group>"; };
50288CAA16025874005F6F3A /* HSBColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSBColor.h; sourceTree = "<group>"; };
50288CAB16025874005F6F3A /* RGBColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RGBColor.cpp; sourceTree = "<group>"; };
Expand All @@ -50,7 +51,6 @@
50AF0CC615F8D39B00BB3C5F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
50AF0CC815F8D39B00BB3C5F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
50AF0CCC15F8D39B00BB3C5F /* REDLEDClient-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "REDLEDClient-Info.plist"; sourceTree = "<group>"; };
50AF0CCE15F8D39B00BB3C5F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
50AF0CD015F8D39B00BB3C5F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
50AF0CD215F8D39B00BB3C5F /* REDLEDClient-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "REDLEDClient-Prefix.pch"; sourceTree = "<group>"; };
50AF0CD315F8D39B00BB3C5F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -155,9 +155,9 @@
isa = PBXGroup;
children = (
50AF0CCC15F8D39B00BB3C5F /* REDLEDClient-Info.plist */,
50AF0CCD15F8D39B00BB3C5F /* InfoPlist.strings */,
50AF0CD015F8D39B00BB3C5F /* main.m */,
50AF0CD215F8D39B00BB3C5F /* REDLEDClient-Prefix.pch */,
4CE04F04160606C40072D906 /* Localizable.strings */,
);
name = "Supporting Files";
sourceTree = "<group>";
Expand Down Expand Up @@ -213,11 +213,11 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
50AF0CCF15F8D39B00BB3C5F /* InfoPlist.strings in Resources */,
50AF0CD815F8D39B00BB3C5F /* MainStoryboard.storyboard in Resources */,
50CB647715FE5051001C5999 /* Circle.png in Resources */,
4C3028091605EB4B004AC24C /* Highlight.png in Resources */,
4C30280A1605EB4B004AC24C /* [email protected] in Resources */,
4CE04F02160606C40072D906 /* Localizable.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -244,12 +244,12 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
50AF0CCD15F8D39B00BB3C5F /* InfoPlist.strings */ = {
4CE04F04160606C40072D906 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
50AF0CCE15F8D39B00BB3C5F /* en */,
4CE04F03160606C40072D906 /* en */,
);
name = InfoPlist.strings;
name = Localizable.strings;
sourceTree = "<group>";
};
50AF0CD615F8D39B00BB3C5F /* MainStoryboard.storyboard */ = {
Expand Down
2 changes: 2 additions & 0 deletions REDLEDClient/RGBSCBonjourBrowserViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ - (id)initWithCoder:(NSCoder*)coder
//[self.bonjourBrowser scheduleInRunLoop:NSRunLoop.currentRunLoop forMode:NSRunLoopCommonModes];

[self.bonjourBrowser searchForServicesOfType:@"_rgbled._udp" inDomain:nil];

self.title = NSLocalizedString(@"<BonjourBrowserTitle>", nil);
}
return self;
}
Expand Down
12 changes: 5 additions & 7 deletions REDLEDClient/RGBSCBonjourServiceCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ - (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NS

- (void)updateView
{
// self.bonjourService.name

NSDictionary* txtRecord = [NSNetService dictionaryFromTXTRecordData:self.bonjourService.TXTRecordData];
//NSLog(@"> %@", txtRecord);

#if 0
for(NSString* key in txtRecord)
{
NSData* data = [txtRecord objectForKey:key];
Expand All @@ -53,15 +52,14 @@ - (void)updateView

NSLog(@"%@ = %@", key, value);
}

// NSLog(@"%@", self.bonjourService.addresses);
#endif

NSData* ledsData = [txtRecord objectForKey:@"leds"];
NSString* ledsString = [[NSString alloc] initWithData:ledsData encoding:NSASCIIStringEncoding];

self.nameView.text = self.bonjourService.name;
self.textLabel.text = self.bonjourService.name;

self.infoView.text = [NSString stringWithFormat:@"number of leds: %@", ledsString];
self.detailTextLabel.text = ledsString;

}

Expand Down
2 changes: 2 additions & 0 deletions REDLEDClient/RGBSCViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ - (void)bindToNetService:(NSNetService*)netService
self.netService = netService;
self.netService.delegate = self;

self.title = self.netService.name;

NSData* address = [self.netService.addresses objectAtIndex:0];

self.socket = [[MCUDPSocket alloc] initWithAddress:address];
Expand Down
2 changes: 0 additions & 2 deletions REDLEDClient/en.lproj/InfoPlist.strings

This file was deleted.

9 changes: 9 additions & 0 deletions REDLEDClient/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
Localizable.strings
REDLEDClient

Created by Michael Ochs on 9/16/12.
Copyright (c) 2012 mczonk.de. All rights reserved.
*/

"<BonjourBrowserTitle>" = "Devices";
28 changes: 12 additions & 16 deletions REDLEDClient/en.lproj/MainStoryboard.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -29,34 +29,30 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="RGBSCBonjourServiceCell" id="0pX-B8-aUH" customClass="RGBSCBonjourServiceCell">
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="RGBSCBonjourServiceCell" textLabel="TyY-vP-wSg" detailTextLabel="WKE-Tl-0y9" style="IBUITableViewCellStyleValue1" id="0pX-B8-aUH" customClass="RGBSCBonjourServiceCell">
<rect key="frame" x="0.0" y="22" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="300" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="c37-uK-3MB">
<rect key="frame" x="20" y="1" width="260" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="TyY-vP-wSg">
<rect key="frame" x="10" y="11" width="35" height="21"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="LZy-kx-hYK">
<rect key="frame" x="20" y="19" width="260" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.49803921580314636" green="0.49803921580314636" blue="0.49803921580314636" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="WKE-Tl-0y9">
<rect key="frame" x="246" y="11" width="44" height="21"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.2196078431372549" green="0.32941176470588235" blue="0.52941176470588236" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<connections>
<outlet property="infoView" destination="LZy-kx-hYK" id="GQm-SU-ryj"/>
<outlet property="nameView" destination="c37-uK-3MB" id="2W6-5F-O3E"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
Expand Down

0 comments on commit 0c9409e

Please sign in to comment.