Fix lot of issue

This commit is contained in:
Yann Diorcet 2013-01-29 14:22:34 +01:00
parent 8036208089
commit 00f6db90e6
27 changed files with 733 additions and 420 deletions

View file

@ -41,6 +41,7 @@
<int key="NSvFlags">-2147483374</int>
<string key="NSFrameSize">{320, 480}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="935863454"/>
<string key="NSReuseIdentifierKey">_NS:196</string>
<object class="NSColor" key="IBUIBackgroundColor" id="732745065">
@ -54,6 +55,7 @@
<int key="NSvFlags">289</int>
<string key="NSFrame">{{266, 20}, {34, 34}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="903884486"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -95,6 +97,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{73, 58}</string>
<reference key="NSSuperview" ref="903884486"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="842436331"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<object class="NSColor" key="IBUIBackgroundColor" id="666829842">
@ -119,6 +122,7 @@
<int key="NSvFlags">-2147483356</int>
<string key="NSFrameSize">{73, 58}</string>
<reference key="NSSuperview" ref="903884486"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1031602630"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<reference key="IBUIBackgroundColor" ref="666829842"/>
@ -140,6 +144,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{207, 0}, {73, 58}}</string>
<reference key="NSSuperview" ref="903884486"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="33985418"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<reference key="IBUIBackgroundColor" ref="666829842"/>
@ -166,6 +171,7 @@
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{207, 0}, {73, 58}}</string>
<reference key="NSSuperview" ref="903884486"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<reference key="IBUIBackgroundColor" ref="666829842"/>
<bool key="IBUIOpaque">NO</bool>
@ -187,6 +193,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{73, 0}, {67, 58}}</string>
<reference key="NSSuperview" ref="903884486"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="762727327"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<reference key="IBUIBackgroundColor" ref="666829842"/>
@ -213,6 +220,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{140, 0}, {67, 58}}</string>
<reference key="NSSuperview" ref="903884486"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="889522260"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<reference key="IBUIBackgroundColor" ref="666829842"/>
@ -242,6 +250,7 @@
</array>
<string key="NSFrame">{{20, 399}, {280, 58}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="910162139"/>
<string key="NSReuseIdentifierKey">_NS:196</string>
<reference key="IBUIBackgroundColor" ref="666829842"/>
@ -256,8 +265,11 @@
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{320, 42}</string>
<reference key="NSSuperview" ref="935863454"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="317702958"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="666829842"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
@ -287,17 +299,17 @@
</array>
<string key="NSFrameSize">{320, 42}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="810603278"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MSAwLjQAA</bytes>
</object>
<reference key="IBUIBackgroundColor" ref="666829842"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<string key="NSFrame">{{0, 20}, {320, 480}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1051556672"/>
<reference key="IBUIBackgroundColor" ref="732745065"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
@ -563,7 +575,152 @@
<nil key="sourceID"/>
<int key="maxID">91</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">BuschJaegerCallView</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="doCameraSwipe:">UISwipeGestureRecognizer</string>
<string key="onSnapshotClick:">id</string>
<string key="takeCall:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="doCameraSwipe:">
<string key="name">doCameraSwipe:</string>
<string key="candidateClassName">UISwipeGestureRecognizer</string>
</object>
<object class="IBActionInfo" key="onSnapshotClick:">
<string key="name">onSnapshotClick:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="takeCall:">
<string key="name">takeCall:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="cameraLeftSwipeGestureRecognizer">UISwipeGestureRecognizer</string>
<string key="cameraRightSwipeGestureRecognizer">UISwipeGestureRecognizer</string>
<string key="contactLabel">UILabel</string>
<string key="declineButton">UIHangUpButton</string>
<string key="endOrRejectCallButton">UIHangUpButton</string>
<string key="incomingView">UIView</string>
<string key="lightsButton">UIDigitButton</string>
<string key="microButton">UIToggleButton</string>
<string key="openDoorButton">UIDigitButton</string>
<string key="snapshotButton">UIButton</string>
<string key="takeCallButton">UIButton</string>
<string key="videoView">UIView</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="cameraLeftSwipeGestureRecognizer">
<string key="name">cameraLeftSwipeGestureRecognizer</string>
<string key="candidateClassName">UISwipeGestureRecognizer</string>
</object>
<object class="IBToOneOutletInfo" key="cameraRightSwipeGestureRecognizer">
<string key="name">cameraRightSwipeGestureRecognizer</string>
<string key="candidateClassName">UISwipeGestureRecognizer</string>
</object>
<object class="IBToOneOutletInfo" key="contactLabel">
<string key="name">contactLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="declineButton">
<string key="name">declineButton</string>
<string key="candidateClassName">UIHangUpButton</string>
</object>
<object class="IBToOneOutletInfo" key="endOrRejectCallButton">
<string key="name">endOrRejectCallButton</string>
<string key="candidateClassName">UIHangUpButton</string>
</object>
<object class="IBToOneOutletInfo" key="incomingView">
<string key="name">incomingView</string>
<string key="candidateClassName">UIView</string>
</object>
<object class="IBToOneOutletInfo" key="lightsButton">
<string key="name">lightsButton</string>
<string key="candidateClassName">UIDigitButton</string>
</object>
<object class="IBToOneOutletInfo" key="microButton">
<string key="name">microButton</string>
<string key="candidateClassName">UIToggleButton</string>
</object>
<object class="IBToOneOutletInfo" key="openDoorButton">
<string key="name">openDoorButton</string>
<string key="candidateClassName">UIDigitButton</string>
</object>
<object class="IBToOneOutletInfo" key="snapshotButton">
<string key="name">snapshotButton</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="takeCallButton">
<string key="name">takeCallButton</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="videoView">
<string key="name">videoView</string>
<string key="candidateClassName">UIView</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/BuschJaegerCallView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIDigitButton</string>
<string key="superclassName">UILongTouchButton</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">addressField</string>
<string key="NS.object.0">UITextField</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">addressField</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">addressField</string>
<string key="candidateClassName">UITextField</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/UIDigitButton.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIHangUpButton</string>
<string key="superclassName">UIButton</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/UIHangUpButton.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UILongTouchButton</string>
<string key="superclassName">UIButton</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/UILongTouchButton.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIMicroButton</string>
<string key="superclassName">UIToggleButton</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/UIMicroButton.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIToggleButton</string>
<string key="superclassName">UIButton</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/UIToggleButton.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">

View file

@ -422,9 +422,9 @@ static NSString *const CONFIGURATION_HOME_AP_KEY = @"CONFIGURATION_HOME_AP_KEY";
});
}
}
[[NSUserDefaults standardUserDefaults] synchronize];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"ipgateway_preference"];
[[NSUserDefaults standardUserDefaults] setObject:[[NSURL URLWithString:urlString] host] forKey:@"ipgateway_preference"];
[[NSUserDefaults standardUserDefaults] synchronize];
} else {
dispatch_async(dispatch_get_main_queue(), ^{
[delegate buschJaegerConfigurationError:[NSString stringWithFormat:@"Request not succeed (Status code:%d)", urlResponse.statusCode]];

View file

@ -34,6 +34,7 @@
@property (nonatomic, retain) IBOutlet UILabel *stationLabel;
@property (nonatomic, retain) IBOutlet UILabel *dateLabel;
@property (nonatomic, retain) IBOutlet UITableView *tableView;
@property (nonatomic, retain) IBOutlet UIView *fullscreenView;
@property (nonatomic, retain) IBOutlet UIButton *saveButton;
@property (nonatomic, retain) IBOutlet UIRemoteImageView *imageView;

View file

@ -30,6 +30,7 @@
@synthesize backButton;
@synthesize stationLabel;
@synthesize dateLabel;
@synthesize tableView;
@synthesize imageView;
@synthesize saveButton;
@synthesize fullscreenView;
@ -73,6 +74,7 @@
- (void)dealloc {
[tableController release];
[tableView release];
[history release];
[backButton release];
[stationLabel release];
@ -116,6 +118,10 @@
[detailsTapGestureRecognizer setNumberOfTapsRequired:1];
[detailsTapGestureRecognizer setNumberOfTouchesRequired:1];
[imageView addGestureRecognizer:detailsTapGestureRecognizer];
if([LinphoneManager runningOnIpad]) {
[tableView setRowHeight:[tableView rowHeight]*2.5];
}
}
- (void)viewWillAppear:(BOOL)animated {
@ -172,7 +178,9 @@
#pragma mark - Action Functions
- (IBAction)onBackClick:(id)sender {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
if([BuschJaegerMainView instance].navigationController.topViewController == self) {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
}
}
- (IBAction)onDeleteClick:(id)sender {
@ -212,9 +220,9 @@
return [history.images count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- (UITableViewCell *)tableView:(UITableView *)atableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *kCellId = @"UIHistoryCell";
UIHistoryDetailsCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
UIHistoryDetailsCell *cell = [atableView dequeueReusableCellWithIdentifier:kCellId];
if (cell == nil) {
cell = [[[UIHistoryDetailsCell alloc] initWithIdentifier:kCellId] autorelease];
@ -233,8 +241,8 @@
#pragma mark - UITableViewDelegate Functions
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:NO];
- (void)tableView:(UITableView *)atableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[atableView deselectRowAtIndexPath:indexPath animated:NO];
currentIndex = [indexPath row];
[fullscreenView setHidden:FALSE];
[imageView setImage:nil];
@ -244,8 +252,10 @@
#pragma mark - BuschJaegerConfigurationDelegate Functions
- (void)buschJaegerConfigurationSuccess {
[[BuschJaegerMainView instance].historyView reload];
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
if([BuschJaegerMainView instance].navigationController.topViewController == self) {
[[BuschJaegerMainView instance].historyView reload];
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
}
}
- (void)buschJaegerConfigurationError:(NSString *)error {

View file

@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">12C60</string>
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
<string key="IBDocument.AppKitVersion">1187.34</string>
<string key="IBDocument.HIToolboxVersion">625.00</string>
<string key="IBDocument.SystemVersion">11G63</string>
<string key="IBDocument.InterfaceBuilderVersion">2840</string>
<string key="IBDocument.AppKitVersion">1138.51</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">1930</string>
<string key="NS.object.0">1926</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
@ -44,12 +44,9 @@
<int key="NSvFlags">274</int>
<string key="NSFrame">{{0, 34}, {320, 368}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="794939656"/>
<string key="NSReuseIdentifierKey">_NS:10</string>
<object class="NSColor" key="IBUIBackgroundColor" id="541094472">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
@ -57,7 +54,7 @@
<bool key="IBUIAlwaysBounceVertical">YES</bool>
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
<float key="IBUIRowHeight">110</float>
<float key="IBUIRowHeight">220</float>
<float key="IBUISectionHeaderHeight">22</float>
<float key="IBUISectionFooterHeight">22</float>
</object>
@ -66,6 +63,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{5, 5}, {152, 21}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="251393705"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -74,7 +72,10 @@
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Station 1</string>
<reference key="IBUITextColor" ref="541094472"/>
<object class="NSColor" key="IBUITextColor" id="541094472">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
@ -93,6 +94,7 @@
<int key="NSvFlags">289</int>
<string key="NSFrame">{{168, 5}, {112, 21}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1041038771"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -120,6 +122,7 @@
<int key="NSvFlags">289</int>
<string key="NSFrame">{{286, 0}, {34, 34}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="420803874"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -158,6 +161,7 @@
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{280, 40}</string>
<reference key="NSSuperview" ref="794939656"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="390128791"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -186,6 +190,7 @@
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{280, 40}</string>
<reference key="NSSuperview" ref="794939656"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor" id="372315597">
<int key="NSColorSpace">3</int>
@ -204,6 +209,7 @@
</array>
<string key="NSFrame">{{20, 410}, {280, 40}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="380982191"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="372315597"/>
@ -218,6 +224,7 @@
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview" ref="899524222"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="802025467"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor" id="76823613">
@ -234,6 +241,7 @@
<int key="NSvFlags">265</int>
<string key="NSFrame">{{266, 406}, {34, 34}}</string>
<reference key="NSSuperview" ref="899524222"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="33010100"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -256,6 +264,7 @@
</array>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="322407382"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
@ -270,6 +279,7 @@
</array>
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="899524222"/>
<reference key="IBUIBackgroundColor" ref="76823613"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
@ -343,6 +353,14 @@
</object>
<int key="connectionID">39</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">tableView</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="420803874"/>
</object>
<int key="connectionID">42</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
@ -525,9 +543,116 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">41</int>
<int key="maxID">42</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">BuschJaegerHistoryDetailsView</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="doDetailsSwipe:">UISwipeGestureRecognizer</string>
<string key="hideImage:">id</string>
<string key="onBackClick:">id</string>
<string key="onDeleteClick:">id</string>
<string key="saveImage:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="doDetailsSwipe:">
<string key="name">doDetailsSwipe:</string>
<string key="candidateClassName">UISwipeGestureRecognizer</string>
</object>
<object class="IBActionInfo" key="hideImage:">
<string key="name">hideImage:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="onBackClick:">
<string key="name">onBackClick:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="onDeleteClick:">
<string key="name">onDeleteClick:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="saveImage:">
<string key="name">saveImage:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="backButton">UIView</string>
<string key="dateLabel">UILabel</string>
<string key="detailsLeftSwipeGestureRecognizer">UISwipeGestureRecognizer</string>
<string key="detailsRightSwipeGestureRecognizer">UISwipeGestureRecognizer</string>
<string key="detailsTapGestureRecognizer">UITapGestureRecognizer</string>
<string key="fullscreenView">UIView</string>
<string key="imageView">UIRemoteImageView</string>
<string key="saveButton">UIButton</string>
<string key="stationLabel">UILabel</string>
<string key="tableController">UITableViewController</string>
<string key="tableView">UITableView</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="backButton">
<string key="name">backButton</string>
<string key="candidateClassName">UIView</string>
</object>
<object class="IBToOneOutletInfo" key="dateLabel">
<string key="name">dateLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="detailsLeftSwipeGestureRecognizer">
<string key="name">detailsLeftSwipeGestureRecognizer</string>
<string key="candidateClassName">UISwipeGestureRecognizer</string>
</object>
<object class="IBToOneOutletInfo" key="detailsRightSwipeGestureRecognizer">
<string key="name">detailsRightSwipeGestureRecognizer</string>
<string key="candidateClassName">UISwipeGestureRecognizer</string>
</object>
<object class="IBToOneOutletInfo" key="detailsTapGestureRecognizer">
<string key="name">detailsTapGestureRecognizer</string>
<string key="candidateClassName">UITapGestureRecognizer</string>
</object>
<object class="IBToOneOutletInfo" key="fullscreenView">
<string key="name">fullscreenView</string>
<string key="candidateClassName">UIView</string>
</object>
<object class="IBToOneOutletInfo" key="imageView">
<string key="name">imageView</string>
<string key="candidateClassName">UIRemoteImageView</string>
</object>
<object class="IBToOneOutletInfo" key="saveButton">
<string key="name">saveButton</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="stationLabel">
<string key="name">stationLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="tableController">
<string key="name">tableController</string>
<string key="candidateClassName">UITableViewController</string>
</object>
<object class="IBToOneOutletInfo" key="tableView">
<string key="name">tableView</string>
<string key="candidateClassName">UITableView</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/BuschJaegerHistoryDetailsView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIRemoteImageView</string>
<string key="superclassName">UIImageView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/UIRemoteImageView.h</string>
</object>
</object>
</array>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
@ -540,6 +665,6 @@
<string key="bj_save.png">{34, 35}</string>
<string key="trash.png">{26, 26}</string>
</dictionary>
<string key="IBCocoaTouchPluginVersion">1930</string>
<string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>

View file

@ -90,7 +90,11 @@
}
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
return UITableViewCellEditingStyleDelete;
// Detemine if it's in editing mode
if (self.editing) {
return UITableViewCellEditingStyleDelete;
}
return UITableViewCellEditingStyleNone;
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {

View file

@ -21,15 +21,13 @@
#import "BuschJaegerHistoryTableViewController.h"
#import "BuschJaegerConfiguration.h"
@interface BuschJaegerHistoryView : UIViewController<BuschJaegerConfigurationDelegate> {
@interface BuschJaegerHistoryView : UIViewController<BuschJaegerConfigurationDelegate, UIGestureRecognizerDelegate> {
}
@property (nonatomic, retain) IBOutlet UIView *backButton;
@property (nonatomic, retain) IBOutlet UIView *waitView;
@property (nonatomic, retain) IBOutlet BuschJaegerHistoryTableViewController *tableController;
- (IBAction)onBackClick:(id)sender;
@property (nonatomic, retain) IBOutlet UISwipeGestureRecognizer *backRightSwipeGestureRecognizer;
- (void)reload;

View file

@ -24,17 +24,16 @@
@implementation BuschJaegerHistoryView
@synthesize backButton;
@synthesize waitView;
@synthesize tableController;
@synthesize backRightSwipeGestureRecognizer;
#pragma mark - Lifecycle Functions
- (void)dealloc {
[backButton release];
[waitView release];
[tableController release];
[backRightSwipeGestureRecognizer release];
[super dealloc];
}
@ -49,12 +48,12 @@
[waitView setHidden:TRUE];
/* init gradients */
{
UIColor* col1 = BUSCHJAEGER_NORMAL_COLOR;
UIColor* col2 = BUSCHJAEGER_NORMAL_COLOR2;
[BuschJaegerUtils createGradientForView:backButton withTopColor:col1 bottomColor:col2 cornerRadius:BUSCHJAEGER_DEFAULT_CORNER_RADIUS];
// Swipe back for iphone devices
if(![LinphoneManager runningOnIpad]) {
backRightSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(doBackSwipe:)];
[backRightSwipeGestureRecognizer setDirection:UISwipeGestureRecognizerDirectionRight];
[backRightSwipeGestureRecognizer setDelegate:self];
[self.view addGestureRecognizer:backRightSwipeGestureRecognizer];
}
}
@ -74,14 +73,20 @@
}
}
#pragma mark - Action Functions
- (IBAction)onBackClick:(id)sender {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
#pragma mark - Actions Functions
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES;
}
- (IBAction)doBackSwipe:(UISwipeGestureRecognizer *)sender {
if([BuschJaegerMainView instance].navigationController.topViewController == self) {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
}
}
#pragma mark -
#pragma mark -
- (void)reload {
[self view]; // Force view load
@ -103,7 +108,7 @@
#pragma mark - BuschJaegerConfigurationDelegate Functions
- (void)buschJaegerConfigurationSuccess {
[[BuschJaegerMainView instance] updateIconBadge:nil];
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
[waitView setHidden:TRUE];
[self update];
}

View file

@ -2,19 +2,17 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">12C60</string>
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
<string key="IBDocument.AppKitVersion">1187.34</string>
<string key="IBDocument.HIToolboxVersion">625.00</string>
<string key="IBDocument.SystemVersion">11G63</string>
<string key="IBDocument.InterfaceBuilderVersion">2840</string>
<string key="IBDocument.AppKitVersion">1138.51</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">1930</string>
<string key="NS.object.0">1926</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIActivityIndicatorView</string>
<string>IBUIButton</string>
<string>IBUILabel</string>
<string>IBUITableView</string>
<string>IBUITableViewController</string>
<string>IBUIView</string>
@ -39,94 +37,25 @@
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIView" id="275032897">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">269</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUILabel" id="776304479">
<reference key="NSNextResponder" ref="275032897"/>
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{280, 40}</string>
<reference key="NSSuperview" ref="275032897"/>
<reference key="NSNextKeyView" ref="1064793733"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<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">Back</string>
<object class="NSColor" key="IBUITextColor" id="801879819">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">1</int>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">24</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">24</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUIButton" id="1064793733">
<reference key="NSNextResponder" ref="275032897"/>
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{280, 40}</string>
<reference key="NSSuperview" ref="275032897"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor" id="727928588">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<reference key="IBUIHighlightedTitleColor" ref="801879819"/>
<reference key="IBUINormalTitleColor" ref="801879819"/>
<object class="NSColor" key="IBUINormalTitleShadowColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">2</int>
<double key="pointSize">15</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">15</double>
<int key="NSfFlags">16</int>
</object>
</object>
</array>
<string key="NSFrame">{{20, 410}, {280, 40}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSNextKeyView" ref="776304479"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="727928588"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUITableView" id="575120815">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{334, 392}</string>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="664811608"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="801879819"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<bool key="IBUIClipsSubviews">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIAlwaysBounceVertical">YES</bool>
<int key="IBUIIndicatorStyle">2</int>
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
<float key="IBUIRowHeight">44</float>
<float key="IBUIRowHeight">60</float>
<float key="IBUISectionHeaderHeight">22</float>
<float key="IBUISectionFooterHeight">22</float>
</object>
@ -139,7 +68,8 @@
<int key="NSvFlags">301</int>
<string key="NSFrame">{{142, 211}, {37, 37}}</string>
<reference key="NSSuperview" ref="664811608"/>
<reference key="NSNextKeyView" ref="275032897"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@ -150,6 +80,7 @@
</array>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="294663888"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
@ -161,6 +92,7 @@
</array>
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="575120815"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
@ -189,14 +121,6 @@
</object>
<int key="connectionID">3</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">backButton</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="275032897"/>
</object>
<int key="connectionID">18</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">tableController</string>
@ -213,15 +137,6 @@
</object>
<int key="connectionID">24</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">onBackClick:</string>
<reference key="source" ref="1064793733"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">10</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">dataSource</string>
@ -267,7 +182,6 @@
<int key="objectID">1</int>
<reference key="object" ref="191373211"/>
<array class="NSMutableArray" key="children">
<reference ref="275032897"/>
<reference ref="575120815"/>
<reference ref="664811608"/>
</array>
@ -284,26 +198,6 @@
<reference key="object" ref="975951072"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="275032897"/>
<array class="NSMutableArray" key="children">
<reference ref="776304479"/>
<reference ref="1064793733"/>
</array>
<reference key="parent" ref="191373211"/>
<string key="objectName">Back Button View</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="776304479"/>
<reference key="parent" ref="275032897"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="1064793733"/>
<reference key="parent" ref="275032897"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="575120815"/>
@ -343,10 +237,6 @@
<string key="13.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="23.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<real value="0.0" key="8.IBUIButtonInspectorSelectedEdgeInsetMetadataKey"/>
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
@ -354,15 +244,71 @@
<nil key="sourceID"/>
<int key="maxID">25</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">BuschJaegerHistoryTableViewController</string>
<string key="superclassName">UITableViewController</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">waitView</string>
<string key="NS.object.0">UIView</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">waitView</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">waitView</string>
<string key="candidateClassName">UIView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/BuschJaegerHistoryTableViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">BuschJaegerHistoryView</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">doBackSwipe:</string>
<string key="NS.object.0">UISwipeGestureRecognizer</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">doBackSwipe:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">doBackSwipe:</string>
<string key="candidateClassName">UISwipeGestureRecognizer</string>
</object>
</object>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="backRightSwipeGestureRecognizer">UISwipeGestureRecognizer</string>
<string key="tableController">BuschJaegerHistoryTableViewController</string>
<string key="waitView">UIView</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="backRightSwipeGestureRecognizer">
<string key="name">backRightSwipeGestureRecognizer</string>
<string key="candidateClassName">UISwipeGestureRecognizer</string>
</object>
<object class="IBToOneOutletInfo" key="tableController">
<string key="name">tableController</string>
<string key="candidateClassName">BuschJaegerHistoryTableViewController</string>
</object>
<object class="IBToOneOutletInfo" key="waitView">
<string key="name">waitView</string>
<string key="candidateClassName">UIView</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/BuschJaegerHistoryView.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1536" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">1930</string>
<string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>

View file

@ -45,8 +45,6 @@
@property (nonatomic, retain) IBOutlet BuschJaegerHistoryView *historyView;
@property (nonatomic, retain) IBOutlet BuschJaegerHistoryDetailsView *historyDetailsView;
- (void)updateIconBadge:(id)info;
+ (BuschJaegerMainView*) instance;
@end

View file

@ -183,7 +183,14 @@ static BuschJaegerMainView* mainViewInstance=nil;
selector:@selector(textReceivedEvent:)
name:kLinphoneTextReceived
object:nil];
// set observer
// Set observer
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(dtmfReceivedEvent:)
name:kLinphoneDtmfReceived
object:nil];
// Set observer
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(networkUpdateEvent:)
name:kLinphoneNetworkUpdate
@ -202,6 +209,16 @@ static BuschJaegerMainView* mainViewInstance=nil;
[[NSNotificationCenter defaultCenter] removeObserver:self
name:kLinphoneTextReceived
object:nil];
// Remove observer
[[NSNotificationCenter defaultCenter] removeObserver:self
name:kLinphoneDtmfReceived
object:nil];
// Remove observer
[[NSNotificationCenter defaultCenter] removeObserver:self
name:kLinphoneNetworkUpdate
object:nil];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@ -238,6 +255,9 @@ static BuschJaegerMainView* mainViewInstance=nil;
[self callUpdate:call state:state animated:TRUE];
}
- (void)dtmfReceivedEvent: (NSNotification*) notif {
[self displayDtmf:notif];
}
- (void)textReceivedEvent: (NSNotification*) notif {
[self displayMessage:notif];
@ -323,6 +343,19 @@ static BuschJaegerMainView* mainViewInstance=nil;
AudioServicesPlaySystemSound([LinphoneManager instance].sounds.call);
}
}
- (void)displayDtmf:(id)message {
if (![[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
|| [UIApplication sharedApplication].applicationState == UIApplicationStateActive) {
UIAlertView* error = [[UIAlertView alloc] initWithTitle:@"Welcome"
message: [NSString stringWithFormat:@"%@", [LinphoneManager instance].configuration.levelPushButton.name]
delegate:nil
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
otherButtonTitles:nil,nil];
[error show];
[error release];
AudioServicesPlayAlertSound([LinphoneManager instance].sounds.level);
}
}
- (void)displayMessage:(id)message {
if (![[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]

View file

@ -106,13 +106,17 @@
- (IBAction)onValidClick:(id)sender {
if([[addressField text] length] && [[usernameField text] length] && [[passwordField text] length]) {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
[[BuschJaegerMainView instance].settingsView reloadConfiguration];
if([BuschJaegerMainView instance].navigationController.topViewController == self) {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
[[BuschJaegerMainView instance].settingsView reloadConfiguration];
}
}
}
- (IBAction)onBackClick:(id)sender {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
if([BuschJaegerMainView instance].navigationController.topViewController == self) {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
}
}

View file

@ -21,6 +21,23 @@
#import "BuschJaegerUtils.h"
#import "BuschJaegerMainView.h"
@interface ZBarReaderViewControllerEx : ZBarReaderViewController {
}
@end
@implementation ZBarReaderViewControllerEx
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return interfaceOrientation == UIInterfaceOrientationPortrait;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}
@end
@implementation BuschJaegerSettingsView
@synthesize scanButton;
@ -32,8 +49,8 @@
#pragma mark - Lifecycle Functions
- (void)initBuschJaegerSettingsView {
scanController = [[ZBarReaderViewController alloc] init];
scanController.supportedOrientationsMask = ZBarOrientationMaskAll;
scanController = [[ZBarReaderViewControllerEx alloc] init];
scanController.supportedOrientationsMask = ZBarOrientationMask(UIInterfaceOrientationPortrait);
[scanController setReaderDelegate:self];
}
@ -121,7 +138,9 @@
}
- (IBAction)onBackClick:(id)sender {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
if([BuschJaegerMainView instance].navigationController.topViewController == self) {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
}
}
@ -162,13 +181,17 @@
}
}
if(handled) {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
if([BuschJaegerMainView instance].navigationController.topViewController == self) {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
}
}
}
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
if([BuschJaegerMainView instance].navigationController.topViewController == scanController) {
[[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
}
}
#pragma mark - BuschJaegerConfigurationDelegate Functions

View file

@ -68,8 +68,10 @@
+ (void)resizeGradientLayer:(CALayer*)layer {
if(layer.name != nil && [layer.name compare:@"BuschJaegerLayer" options:0] == NSOrderedSame) {
if(layer.superlayer != nil) {
if(layer.delegate == nil) {
[layer setFrame:layer.superlayer.bounds];
} else if([layer.delegate isKindOfClass:[UIView class]]) {
[layer setFrame:((UIView *)layer.delegate).bounds];
}
}
if([layer respondsToSelector:@selector(sublayers)]) {
@ -81,9 +83,6 @@
+ (void)resizeGradient:(UIView*)view {
[BuschJaegerUtils resizeGradientLayer:view.layer];
for(UIView *subView in view.subviews) {
[BuschJaegerUtils resizeGradient:subView];
}
}
@end

View file

@ -21,17 +21,17 @@
#import "BuschJaegerStationTableViewController.h"
#import "BuschJaegerHistoryTableViewController.h"
@interface BuschJaegerWelcomeView : UIViewController<BuschJaegerConfigurationDelegate> {
@interface BuschJaegerWelcomeView : UIViewController<BuschJaegerConfigurationDelegate, UIGestureRecognizerDelegate> {
}
@property (nonatomic, retain) IBOutlet UIButton* settingsButton;
@property (nonatomic, retain) IBOutlet UIButton* historyButton;
@property (nonatomic, retain) IBOutlet BuschJaegerStationTableViewController *stationTableController;
@property (nonatomic, retain) IBOutlet UIView *waitView;
@property (nonatomic, retain) IBOutlet BuschJaegerHistoryTableViewController *historyTableController;
@property (nonatomic, retain) IBOutlet UISwipeGestureRecognizer *historyLeftSwipeGestureRecognizer;
- (IBAction)settingsClick:(id)sender;
- (IBAction)historyClick:(id)sender;
- (void)reloadHistory;

View file

@ -23,19 +23,18 @@
@implementation BuschJaegerWelcomeView
@synthesize settingsButton;
@synthesize historyButton;
@synthesize stationTableController;
@synthesize historyTableController;
@synthesize waitView;
@synthesize historyLeftSwipeGestureRecognizer;
#pragma mark - Lifecycle Functions
- (void)dealloc {
[settingsButton release];
[historyButton release];
[stationTableController release];
[historyTableController release];
[historyLeftSwipeGestureRecognizer release];
// Remove all observer
[[NSNotificationCenter defaultCenter] removeObserver:self];
@ -48,15 +47,19 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Swipe history gesture for iphone devices
if(![LinphoneManager runningOnIpad]) {
historyLeftSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(doHistorySwipe:)];
[historyLeftSwipeGestureRecognizer setDirection:UISwipeGestureRecognizerDirectionLeft];
[historyLeftSwipeGestureRecognizer setDelegate:self];
[self.view addGestureRecognizer:historyLeftSwipeGestureRecognizer];
}
[historyTableController.view setBackgroundColor:[UIColor clearColor]];
[stationTableController.view setBackgroundColor:[UIColor clearColor]];
[waitView setHidden:TRUE];
if([LinphoneManager runningOnIpad]) {
[historyButton setHidden:TRUE];
}
}
- (void)viewWillAppear:(BOOL)animated {
@ -71,8 +74,8 @@
selector:@selector(applicationWillEnterForeground:)
name:UIApplicationWillEnterForegroundNotification
object:nil];
[self performSelector:@selector(reloadHistory) withObject:self afterDelay:1.0];
[self reloadHistory];
// Wait a bit for the gateway update
[self performSelector:@selector(reloadHistory) withObject:self afterDelay:2.0];
}
- (void)viewWillDisappear:(BOOL)animated{
@ -120,7 +123,6 @@
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"ID" ascending:YES];
NSArray *sortDescriptors = [NSArray arrayWithObjects:sortDescriptor, nil];
[stationTableController setStations:[configuration.outdoorStations sortedArrayUsingDescriptors:sortDescriptors]];
[historyButton setEnabled: configuration.network.localAddress != nil];
}
@ -148,15 +150,23 @@
[[BuschJaegerMainView instance].navigationController pushViewController:[BuschJaegerMainView instance].settingsView animated:FALSE];
}
- (IBAction)historyClick:(id)sender {
#pragma mark - Actions Functions
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES;
}
- (IBAction)doHistorySwipe:(UISwipeGestureRecognizer *)sender {
[[BuschJaegerMainView instance].historyView reload];
[[BuschJaegerMainView instance].navigationController pushViewController:[BuschJaegerMainView instance].historyView animated:FALSE];
}
#pragma mark - BuschJaegerConfigurationDelegate Functions
- (void)buschJaegerConfigurationSuccess {
[[BuschJaegerMainView instance] updateIconBadge:nil];
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
[waitView setHidden:TRUE];
[self update];
}

View file

@ -2,17 +2,18 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">12C60</string>
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
<string key="IBDocument.AppKitVersion">1187.34</string>
<string key="IBDocument.HIToolboxVersion">625.00</string>
<string key="IBDocument.SystemVersion">11G63</string>
<string key="IBDocument.InterfaceBuilderVersion">2840</string>
<string key="IBDocument.AppKitVersion">1138.51</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">1930</string>
<string key="NS.object.0">1926</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIButton</string>
<string>IBUIImageView</string>
<string>IBUILabel</string>
<string>IBUITableView</string>
<string>IBUITableViewController</string>
@ -95,7 +96,7 @@
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleShadowColor" id="1070279191">
<object class="NSColor" key="IBUINormalTitleShadowColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
@ -103,44 +104,16 @@
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">bj_settings.png</string>
</object>
<object class="IBUIFontDescription" key="IBUIFontDescription" id="1009838602">
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">2</int>
<double key="pointSize">15</double>
</object>
<object class="NSFont" key="IBUIFont" id="124919505">
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">15</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUIButton" id="432301954">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{10, 10}, {64, 64}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSNextKeyView" ref="324231259"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<double key="IBUIContentEdgeInsets.top">10</double>
<double key="IBUIContentEdgeInsets.bottom">10</double>
<double key="IBUIContentEdgeInsets.left">10</double>
<double key="IBUIContentEdgeInsets.right">10</double>
<reference key="IBUIHighlightedTitleColor" ref="866892554"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
<reference key="IBUINormalTitleShadowColor" ref="1070279191"/>
<object class="NSCustomResource" key="IBUINormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">bj_history.png</string>
</object>
<reference key="IBUIFontDescription" ref="1009838602"/>
<reference key="IBUIFont" ref="124919505"/>
</object>
<object class="IBUITableView" id="312564754">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">274</int>
@ -158,10 +131,24 @@
<float key="IBUISectionHeaderHeight">22</float>
<float key="IBUISectionFooterHeight">22</float>
</object>
<object class="IBUIImageView" id="99435286">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{30, 25}, {27, 36}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSNextKeyView" ref="324231259"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">bj_station.png</string>
</object>
</object>
</array>
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
<reference key="NSSuperview"/>
<reference key="NSNextKeyView" ref="432301954"/>
<reference key="NSNextKeyView" ref="99435286"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xMTc2NDcwNTg4IDAuMTY0NzA1ODgyNCAwLjIxOTYwNzg0MzEAA</bytes>
@ -197,14 +184,6 @@
</object>
<int key="connectionID">6</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">historyButton</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="432301954"/>
</object>
<int key="connectionID">20</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">stationTableController</string>
@ -246,15 +225,6 @@
</object>
<int key="connectionID">13</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">historyClick:</string>
<reference key="source" ref="432301954"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">19</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@ -270,8 +240,8 @@
<array class="NSMutableArray" key="children">
<reference ref="312564754"/>
<reference ref="606095570"/>
<reference ref="432301954"/>
<reference ref="324231259"/>
<reference ref="99435286"/>
</array>
<reference key="parent" ref="0"/>
</object>
@ -309,10 +279,9 @@
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">17</int>
<reference key="object" ref="432301954"/>
<int key="objectID">22</int>
<reference key="object" ref="99435286"/>
<reference key="parent" ref="191373211"/>
<string key="objectName">Button - History</string>
</object>
</array>
</object>
@ -322,7 +291,7 @@
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="17.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@ -333,21 +302,17 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">21</int>
<int key="maxID">22</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1536" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="bj_history.png">{55, 43}</string>
<string key="bj_settings.png">{55, 57}</string>
<string key="bj_station.png">{27, 36}</string>
</dictionary>
<string key="IBCocoaTouchPluginVersion">1930</string>
<string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>

View file

@ -2,17 +2,18 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">12C60</string>
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
<string key="IBDocument.AppKitVersion">1187.34</string>
<string key="IBDocument.HIToolboxVersion">625.00</string>
<string key="IBDocument.SystemVersion">11G63</string>
<string key="IBDocument.InterfaceBuilderVersion">2840</string>
<string key="IBDocument.AppKitVersion">1138.51</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">1930</string>
<string key="NS.object.0">1926</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIButton</string>
<string>IBUIImageView</string>
<string>IBUILabel</string>
<string>IBUITableView</string>
<string>IBUITableViewController</string>
@ -38,6 +39,21 @@
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIImageView" id="195617616">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">293</int>
<string key="NSFrame">{{271, 28}, {27, 36}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="312564754"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">bj_station.png</string>
</object>
</object>
<object class="IBUILabel" id="324231259">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">293</int>
@ -97,7 +113,7 @@
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleShadowColor" id="1070279191">
<object class="NSColor" key="IBUINormalTitleShadowColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
@ -105,51 +121,23 @@
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">bj_settings.png</string>
</object>
<object class="IBUIFontDescription" key="IBUIFontDescription" id="1009838602">
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">2</int>
<double key="pointSize">15</double>
</object>
<object class="NSFont" key="IBUIFont" id="124919505">
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">15</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUIButton" id="432301954">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{10, 10}, {64, 64}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="324231259"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<double key="IBUIContentEdgeInsets.top">10</double>
<double key="IBUIContentEdgeInsets.bottom">10</double>
<double key="IBUIContentEdgeInsets.left">10</double>
<double key="IBUIContentEdgeInsets.right">10</double>
<reference key="IBUIHighlightedTitleColor" ref="866892554"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
<reference key="IBUINormalTitleShadowColor" ref="1070279191"/>
<object class="NSCustomResource" key="IBUINormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">bj_history.png</string>
</object>
<reference key="IBUIFontDescription" ref="1009838602"/>
<reference key="IBUIFont" ref="124919505"/>
</object>
<object class="IBUITableView" id="312564754">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">275</int>
<string key="NSFrame">{{384, 85}, {384, 939}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="866892554"/>
<bool key="IBUIClipsSubviews">YES</bool>
@ -168,7 +156,7 @@
<string key="NSFrame">{{0, 85}, {384, 939}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="312564754"/>
<reference key="NSNextKeyView" ref="195617616"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="866892554"/>
<bool key="IBUIClipsSubviews">YES</bool>
@ -177,7 +165,7 @@
<int key="IBUIIndicatorStyle">2</int>
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
<float key="IBUIRowHeight">44</float>
<float key="IBUIRowHeight">60</float>
<float key="IBUISectionHeaderHeight">22</float>
<float key="IBUISectionFooterHeight">22</float>
</object>
@ -185,7 +173,7 @@
<string key="NSFrame">{{0, 20}, {768, 1024}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="432301954"/>
<reference key="NSNextKeyView" ref="324231259"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xMTc2NDcwNTg4IDAuMTY0NzA1ODgyNCAwLjIxOTYwNzg0MzEAA</bytes>
@ -251,14 +239,6 @@
</object>
<int key="connectionID">6</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">historyButton</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="432301954"/>
</object>
<int key="connectionID">20</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">stationTableController</string>
@ -308,15 +288,6 @@
</object>
<int key="connectionID">13</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">historyClick:</string>
<reference key="source" ref="432301954"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">19</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">dataSource</string>
@ -356,9 +327,9 @@
<array class="NSMutableArray" key="children">
<reference ref="312564754"/>
<reference ref="606095570"/>
<reference ref="432301954"/>
<reference ref="324231259"/>
<reference ref="492428473"/>
<reference ref="195617616"/>
</array>
<reference key="parent" ref="0"/>
</object>
@ -396,12 +367,6 @@
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">17</int>
<reference key="object" ref="432301954"/>
<reference key="parent" ref="191373211"/>
<string key="objectName">Button - History</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">22</int>
<reference key="object" ref="492428473"/>
@ -414,6 +379,11 @@
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">34</int>
<reference key="object" ref="195617616"/>
<reference key="parent" ref="191373211"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@ -422,10 +392,10 @@
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="17.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="26.CustomClassName">BuschJaegerHistoryTableViewController</string>
<string key="26.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="34.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@ -436,7 +406,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">33</int>
<int key="maxID">34</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -470,31 +440,28 @@
<object class="IBPartialClassDescription">
<string key="className">BuschJaegerWelcomeView</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="historyClick:">id</string>
<string key="settingsClick:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="historyClick:">
<string key="name">historyClick:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="settingsClick:">
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">settingsClick:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">settingsClick:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">settingsClick:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
</object>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="historyButton">UIButton</string>
<string key="historyLeftSwipeGestureRecognizer">UISwipeGestureRecognizer</string>
<string key="historyTableController">BuschJaegerHistoryTableViewController</string>
<string key="settingsButton">UIButton</string>
<string key="stationTableController">BuschJaegerStationTableViewController</string>
<string key="waitView">UIView</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="historyButton">
<string key="name">historyButton</string>
<string key="candidateClassName">UIButton</string>
<object class="IBToOneOutletInfo" key="historyLeftSwipeGestureRecognizer">
<string key="name">historyLeftSwipeGestureRecognizer</string>
<string key="candidateClassName">UISwipeGestureRecognizer</string>
</object>
<object class="IBToOneOutletInfo" key="historyTableController">
<string key="name">historyTableController</string>
@ -522,16 +489,12 @@
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1536" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="bj_history.png">{55, 43}</string>
<string key="bj_settings.png">{55, 57}</string>
<string key="bj_station.png">{27, 36}</string>
</dictionary>
<string key="IBCocoaTouchPluginVersion">1930</string>
<string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>

View file

@ -38,6 +38,7 @@ extern const char *const LINPHONERC_APPLICATION_KEY;
extern NSString *const kLinphoneCoreUpdate;
extern NSString *const kLinphoneDisplayStatusUpdate;
extern NSString *const kLinphoneTextReceived;
extern NSString *const kLinphoneDtmfReceived;
extern NSString *const kLinphoneCallUpdate;
extern NSString *const kLinphoneRegistrationUpdate;
extern NSString *const kLinphoneMainViewChange;

View file

@ -50,6 +50,7 @@ const char *const LINPHONERC_APPLICATION_KEY = "app";
NSString *const kLinphoneCoreUpdate = @"LinphoneCoreUpdate";
NSString *const kLinphoneDisplayStatusUpdate = @"LinphoneDisplayStatusUpdate";
NSString *const kLinphoneTextReceived = @"LinphoneTextReceived";
NSString *const kLinphoneDtmfReceived = @"LinphoneDtmfReceived";
NSString *const kLinphoneCallUpdate = @"LinphoneCallUpdate";
NSString *const kLinphoneRegistrationUpdate = @"LinphoneRegistrationUpdate";
/* MODIFICATION: Add buschjaeger configuration event */
@ -575,6 +576,15 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
#pragma mark - Text Received Functions
- (void)onDtmfReceived:(LinphoneCore *)lc call:(LinphoneCall *)call dtmf:(int)dtmf {
// Post event
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSValue valueWithPointer:call], @"call",
[NSNumber numberWithInt:dtmf], @"dtmf",
nil];
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneDtmfReceived object:self userInfo:dict];
}
- (void)onMessageReceived:(LinphoneCore *)lc room:(LinphoneChatRoom *)room message:(LinphoneChatMessage*)msg {
char *fromStr = linphone_address_as_string_uri_only(linphone_chat_message_get_from(msg));
@ -641,6 +651,10 @@ static void linphone_iphone_message_received(LinphoneCore *lc, LinphoneChatRoom
[(LinphoneManager*)linphone_core_get_user_data(lc) onMessageReceived:lc room:room message:message];
}
static void linphone_iphone_dtmf_received(LinphoneCore *lc, LinphoneCall *call, int dtmf) {
[(LinphoneManager*)linphone_core_get_user_data(lc) onDtmfReceived:lc call:call dtmf:dtmf];
}
#pragma mark - Network Functions
@ -796,7 +810,7 @@ static LinphoneCoreVTable linphonec_vtable = {
.display_url=NULL,
.text_received=NULL,
.message_received=linphone_iphone_message_received,
.dtmf_received=NULL,
.dtmf_received=linphone_iphone_dtmf_received,
.transfer_state_changed=linphone_iphone_transfer_state_changed
};

View file

@ -37,14 +37,15 @@
options:nil];
if ([arrayOfViews count] >= 1) {
[self addSubview:[[arrayOfViews objectAtIndex:0] retain]];
UIView *view = [[arrayOfViews objectAtIndex:0] retain];
[view setFrame:[self bounds]];
[self addSubview:view];
}
NSLocale *local = [NSLocale currentLocale];
NSString *strFormatter = [[NSDateFormatter dateFormatFromTemplate:@"yyyyMMMMdd\nkms" options:0 locale:local] retain];
dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setTimeStyle:NSDateFormatterMediumStyle];
[dateFormatter setDateStyle:NSDateFormatterMediumStyle];
NSLocale *locale = [NSLocale currentLocale];
[dateFormatter setLocale:locale];
[dateFormatter setDateFormat:strFormatter];
}
return self;
}
@ -81,6 +82,12 @@
OutdoorStation *station = [[set allObjects] objectAtIndex:0];
stationName = station.name;
}
if(history.incoming) {
stationName = [NSString stringWithFormat:@"%@ \U00002199\U0000FE0E", stationName];
} else {
stationName = [NSString stringWithFormat:@"%@ \U00002197\U0000FE0E", stationName];
}
// Station
[stationLabel setText:stationName];
@ -96,6 +103,10 @@
}
}
-(void) layoutSubviews {
[super layoutSubviews];
}
#pragma mark - Action Functions

View file

@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">12C60</string>
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
<string key="IBDocument.AppKitVersion">1187.34</string>
<string key="IBDocument.HIToolboxVersion">625.00</string>
<string key="IBDocument.SystemVersion">11G63</string>
<string key="IBDocument.InterfaceBuilderVersion">2840</string>
<string key="IBDocument.AppKitVersion">1138.51</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">1930</string>
<string key="NS.object.0">1926</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
@ -40,7 +40,7 @@
<object class="IBUIImageView" id="171265463">
<reference key="NSNextResponder" ref="1038390791"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{5, 5}, {32, 32}}</string>
<string key="NSFrame">{{5, 5}, {50, 50}}</string>
<reference key="NSSuperview" ref="1038390791"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="942147892"/>
@ -51,7 +51,7 @@
<object class="IBUILabel" id="942147892">
<reference key="NSNextResponder" ref="1038390791"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{45, 10}, {120, 21}}</string>
<string key="NSFrame">{{59, 20}, {130, 21}}</string>
<reference key="NSSuperview" ref="1038390791"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="661666265"/>
@ -71,18 +71,18 @@
<float key="IBUIMinimumFontSize">10</float>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">17</double>
<double key="pointSize">18</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">17</double>
<double key="NSSize">18</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUILabel" id="661666265">
<reference key="NSNextResponder" ref="1038390791"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{173, 10}, {103, 21}}</string>
<string key="NSFrame">{{183, 11}, {93, 42}}</string>
<reference key="NSSuperview" ref="1038390791"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="509979453"/>
@ -97,6 +97,8 @@
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUINumberOfLines">2</int>
<int key="IBUITextAlignment">1</int>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">11</double>
@ -106,14 +108,19 @@
<double key="NSSize">11</double>
<int key="NSfFlags">16</int>
</object>
<double key="preferredMaxLayoutWidth">93</double>
</object>
<object class="IBUIButton" id="509979453">
<reference key="NSNextResponder" ref="1038390791"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{276, 0}, {44, 44}}</string>
<string key="NSFrame">{{276, 9}, {44, 44}}</string>
<reference key="NSSuperview" ref="1038390791"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor" id="664315025">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
@ -142,15 +149,12 @@
</object>
</object>
</array>
<string key="NSFrameSize">{320, 42}</string>
<string key="NSFrameSize">{320, 60}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="171265463"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
<reference key="IBUIBackgroundColor" ref="664315025"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
@ -271,6 +275,17 @@
<object class="IBPartialClassDescription">
<string key="className">UIHistoryCell</string>
<string key="superclassName">UITableViewCell</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">onDeleteClick:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">onDeleteClick:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">onDeleteClick:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="dateLabel">UILabel</string>
<string key="iconImage">UIRemoteImageView</string>
@ -307,16 +322,12 @@
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1536" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NS.key.0">trash.png</string>
<string key="NS.object.0">{26, 26}</string>
</object>
<string key="IBCocoaTouchPluginVersion">1930</string>
<string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>

View file

@ -34,7 +34,9 @@
options:nil];
if ([arrayOfViews count] >= 1) {
[self addSubview:[[arrayOfViews objectAtIndex:0] retain]];
UIView *view = [[arrayOfViews objectAtIndex:0] retain];
[view setFrame:[self bounds]];
[self addSubview:view];
}
}
return self;

View file

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1296</int>
<string key="IBDocument.SystemVersion">11E53</string>
<string key="IBDocument.InterfaceBuilderVersion">2549</string>
<string key="IBDocument.AppKitVersion">1138.47</string>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">11G63</string>
<string key="IBDocument.InterfaceBuilderVersion">2840</string>
<string key="IBDocument.AppKitVersion">1138.51</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">1498</string>
<string key="NS.object.0">1926</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
@ -37,8 +37,8 @@
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIImageView" id="171265463">
<reference key="NSNextResponder" ref="1038390791"/>
<int key="NSvFlags">298</int>
<string key="NSFrame">{{5, 5}, {310, 100}}</string>
<int key="NSvFlags">274</int>
<string key="NSFrame">{{5, 5}, {310, 210}}</string>
<reference key="NSSuperview" ref="1038390791"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
@ -47,15 +47,11 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<string key="NSFrameSize">{320, 110}</string>
<string key="NSFrameSize">{320, 220}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="171265463"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
@ -155,10 +151,10 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1296" key="NS.object.0"/>
<real value="1536" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">1498</string>
<string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>

View file

@ -38,7 +38,9 @@
options:nil];
if ([arrayOfViews count] >= 1) {
[self addSubview:[[arrayOfViews objectAtIndex:0] retain]];
UIView *view = [[arrayOfViews objectAtIndex:0] retain];
[view setFrame:[self bounds]];
[self addSubview:view];
}
CALayer *layer = cellBackgroundView.layer;
@ -46,8 +48,6 @@
CAGradientLayer *overlayButtonShineLayer;
[cellBackgroundView makeRoundWithCorner:(UIRectCornerBottomLeft|UIRectCornerBottomRight) radius:7.0];
overlayButtonShineLayer = [CAGradientLayer layer];
overlayButtonShineLayer.name = @"BuschJaegerLayer";
overlayButtonShineLayer.frame = layer.bounds;
@ -70,12 +70,13 @@
[layer addSublayer:overlayButtonShineLayer];
UIView * shadow = [[UIView alloc] initWithFrame:cellBackgroundView.frame];
shadow.autoresizingMask = cellBackgroundView.autoresizingMask;
shadow.userInteractionEnabled = NO; // Modify this if needed
shadow.layer.shadowColor = [[UIColor blackColor] CGColor];
shadow.layer.shadowOffset = CGSizeMake(2, 2);
shadow.layer.shadowRadius = 5.0f;
shadow.layer.masksToBounds = NO;
// shadow.layer.name = @"BuschJaegerLayer";
shadow.layer.name = @"BuschJaegerLayer";
shadow.clipsToBounds = NO;
shadow.layer.shadowOpacity = 0.9f;
[cellBackgroundView.superview insertSubview:shadow belowSubview:cellBackgroundView];
@ -96,6 +97,7 @@
- (void)layoutSubviews {
[super layoutSubviews];
[BuschJaegerUtils resizeGradient:self];
[cellBackgroundView makeRoundWithCorner:(UIRectCornerBottomLeft|UIRectCornerBottomRight) radius:7.0];
}
#pragma mark - Property Functions

View file

@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">12C60</string>
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
<string key="IBDocument.AppKitVersion">1187.34</string>
<string key="IBDocument.HIToolboxVersion">625.00</string>
<string key="IBDocument.SystemVersion">11G63</string>
<string key="IBDocument.InterfaceBuilderVersion">2840</string>
<string key="IBDocument.AppKitVersion">1138.51</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">1930</string>
<string key="NS.object.0">1926</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
@ -34,16 +34,17 @@
</object>
<object class="IBUIView" id="909827972">
<reference key="NSNextResponder"/>
<int key="NSvFlags">290</int>
<int key="NSvFlags">274</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIView" id="826575037">
<reference key="NSNextResponder" ref="909827972"/>
<int key="NSvFlags">274</int>
<string key="NSFrame">{{10, 0}, {300, 90}}</string>
<reference key="NSSuperview" ref="909827972"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="751205060"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<object class="NSColor" key="IBUIBackgroundColor" id="331566240">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
@ -51,9 +52,11 @@
</object>
<object class="IBUIImageView" id="50205585">
<reference key="NSNextResponder" ref="909827972"/>
<int key="NSvFlags">301</int>
<int key="NSvFlags">293</int>
<string key="NSFrame">{{147, 44}, {27, 36}}</string>
<reference key="NSSuperview" ref="909827972"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@ -67,6 +70,7 @@
<int key="NSvFlags">290</int>
<string key="NSFrame">{{20, 5}, {280, 36}}</string>
<reference key="NSSuperview" ref="909827972"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="50205585"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -98,8 +102,10 @@
</array>
<string key="NSFrameSize">{320, 100}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="826575037"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="331566240"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
@ -194,7 +200,37 @@
<nil key="sourceID"/>
<int key="maxID">13</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">UIStationCell</string>
<string key="superclassName">UITableViewCell</string>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="cellBackgroundView">UIView</string>
<string key="stationImage">UIImageView</string>
<string key="stationLabel">UILabel</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="cellBackgroundView">
<string key="name">cellBackgroundView</string>
<string key="candidateClassName">UIView</string>
</object>
<object class="IBToOneOutletInfo" key="stationImage">
<string key="name">stationImage</string>
<string key="candidateClassName">UIImageView</string>
</object>
<object class="IBToOneOutletInfo" key="stationLabel">
<string key="name">stationLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/UIStationCell.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
@ -203,6 +239,6 @@
<string key="NS.key.0">bj_station.png</string>
<string key="NS.object.0">{27, 36}</string>
</object>
<string key="IBCocoaTouchPluginVersion">1930</string>
<string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>

View file

@ -12,8 +12,7 @@
@implementation UIView (RoundUIView)
- (void)makeRoundWithCorner:(UIRectCorner)rectCorner radius:(float)radius
{
- (void)makeRoundWithCorner:(UIRectCorner)rectCorner radius:(float)radius {
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds
byRoundingCorners:rectCorner
cornerRadii:CGSizeMake(radius, radius)];