Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2011-04-02 20:48:04 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:14:51 +0300
commitfa913f8ffa433670bdef0c1569aff10bd0c2ee5e (patch)
tree90913d60f97490443c42a100ee012a6d4c175af1
parent0bb9e03036d258ffd1a15d11690453c7a43fc792 (diff)
[iOS] Connected myPositionButton with xib
-rw-r--r--iphone/Maps/Classes/MapViewController.h4
-rw-r--r--iphone/Maps/Classes/MapViewController.mm4
-rw-r--r--iphone/Maps/MainWindow.xib111
-rw-r--r--iphone/Maps/Resources-iPad/MainWindow-iPad.xib123
4 files changed, 140 insertions, 102 deletions
diff --git a/iphone/Maps/Classes/MapViewController.h b/iphone/Maps/Classes/MapViewController.h
index d9a315ecbd..201ced8f21 100644
--- a/iphone/Maps/Classes/MapViewController.h
+++ b/iphone/Maps/Classes/MapViewController.h
@@ -25,6 +25,8 @@
size_t m_StickyThreshold;
m2::PointD m_Pt1, m_Pt2;
+
+ UIBarButtonItem * m_myPositionButton;
}
- (id) initWithCoder: (NSCoder *)coder;
@@ -51,4 +53,6 @@
- (IBAction)OnSettingsClicked:(id)sender;
- (IBAction)OnGuideClicked:(id)sender;
+@property (nonatomic, retain) IBOutlet UIBarButtonItem * m_myPositionButton;
+
@end
diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm
index ecb71ac277..6c098be379 100644
--- a/iphone/Maps/Classes/MapViewController.mm
+++ b/iphone/Maps/Classes/MapViewController.mm
@@ -17,6 +17,8 @@ typedef FrameWork<model::FeaturesFetcher, Navigator> framework_t;
@implementation MapViewController
+@synthesize m_myPositionButton;
+
// Make m_framework and m_storage MapsAppDelegate properties instead of global variables.
framework_t * m_framework = NULL;
shared_ptr<Locator> m_locator;
@@ -50,6 +52,7 @@ typedef FrameWork<model::FeaturesFetcher, Navigator> framework_t;
if (newMode == Locator::ERoughMode)
{
/// TODO : change button icon to "rough mode"(UIBarButtonItemStyleBordered);
+ m_myPositionButton.style = UIBarButtonItemStyleBordered;
}
}
@@ -61,6 +64,7 @@ typedef FrameWork<model::FeaturesFetcher, Navigator> framework_t;
if (m_isDirtyPosition)
{
/// TODO : change button icon to "precise" mode(UIBarButtonItemStyleDone).
+ m_myPositionButton.style = UIBarButtonItemStyleDone;
}
}
diff --git a/iphone/Maps/MainWindow.xib b/iphone/Maps/MainWindow.xib
index 6145d019ac..28698f03a3 100644
--- a/iphone/Maps/MainWindow.xib
+++ b/iphone/Maps/MainWindow.xib
@@ -51,7 +51,7 @@
<object class="NSPSMatrix" key="NSFrameMatrix"/>
<string key="NSFrameSize">{320, 480}</string>
<reference key="NSSuperview"/>
- <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
@@ -78,7 +78,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{90, 8}, {140, 30}}</string>
<reference key="NSSuperview" ref="353555995"/>
- <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBSegmentControlStyle">2</int>
@@ -113,7 +113,6 @@
</object>
<string key="NSFrame">{{0, 416}, {320, 44}}</string>
<reference key="NSSuperview" ref="53915144"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1010670652"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
@@ -161,7 +160,6 @@
</object>
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
<reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="353555995"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@@ -234,6 +232,14 @@
</object>
<int key="connectionID">176</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">m_myPositionButton</string>
+ <reference key="source" ref="963277495"/>
+ <reference key="destination" ref="289994617"/>
+ </object>
+ <int key="connectionID">177</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -397,20 +403,12 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">176</int>
+ <int key="maxID">177</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
- <string key="className">EAGLView</string>
- <string key="superclassName">UIView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/EAGLView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">FirstResponder</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -456,93 +454,6 @@
<string key="minorKey"/>
</object>
</object>
- <object class="IBPartialClassDescription">
- <string key="className">MapViewController</string>
- <string key="superclassName">UIViewController</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>OnGuideClicked:</string>
- <string>OnMyPositionClicked:</string>
- <string>OnSettingsClicked:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="actionInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>OnGuideClicked:</string>
- <string>OnMyPositionClicked:</string>
- <string>OnSettingsClicked:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBActionInfo">
- <string key="name">OnGuideClicked:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">OnMyPositionClicked:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">OnSettingsClicked:</string>
- <string key="candidateClassName">id</string>
- </object>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/MapViewController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">MapsAppDelegate</string>
- <string key="superclassName">NSObject</string>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>mapViewController</string>
- <string>window</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>MapViewController</string>
- <string>UIWindow</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>mapViewController</string>
- <string>window</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBToOneOutletInfo">
- <string key="name">mapViewController</string>
- <string key="candidateClassName">MapViewController</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">window</string>
- <string key="candidateClassName">UIWindow</string>
- </object>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/MapsAppDelegate.h</string>
- </object>
- </object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
diff --git a/iphone/Maps/Resources-iPad/MainWindow-iPad.xib b/iphone/Maps/Resources-iPad/MainWindow-iPad.xib
index e07f13c82f..f3c1445c9d 100644
--- a/iphone/Maps/Resources-iPad/MainWindow-iPad.xib
+++ b/iphone/Maps/Resources-iPad/MainWindow-iPad.xib
@@ -46,10 +46,12 @@
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUIWindow" id="380026005">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">1316</int>
<object class="NSPSMatrix" key="NSFrameMatrix"/>
<string key="NSFrameSize">{768, 1024}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
@@ -79,6 +81,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{7, 8}, {207, 30}}</string>
<reference key="NSSuperview" ref="353555995"/>
+ <reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBSegmentControlStyle">2</int>
@@ -113,6 +116,7 @@
</object>
<string key="NSFrame">{{0, 980}, {768, 44}}</string>
<reference key="NSSuperview" ref="53915144"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="349590326"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
@@ -154,6 +158,7 @@
</object>
<string key="NSFrameSize">{768, 1024}</string>
<reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="353555995"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@@ -225,6 +230,14 @@
</object>
<int key="connectionID">177</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">m_myPositionButton</string>
+ <reference key="source" ref="963277495"/>
+ <reference key="destination" ref="289994617"/>
+ </object>
+ <int key="connectionID">178</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -382,12 +395,20 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">177</int>
+ <int key="maxID">178</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
+ <string key="className">EAGLView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/EAGLView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">FirstResponder</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -433,6 +454,104 @@
<string key="minorKey"/>
</object>
</object>
+ <object class="IBPartialClassDescription">
+ <string key="className">MapViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>OnGuideClicked:</string>
+ <string>OnMyPositionClicked:</string>
+ <string>OnSettingsClicked:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>OnGuideClicked:</string>
+ <string>OnMyPositionClicked:</string>
+ <string>OnSettingsClicked:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">OnGuideClicked:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">OnMyPositionClicked:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">OnSettingsClicked:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">m_myPositionButton</string>
+ <string key="NS.object.0">UIBarButtonItem</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">m_myPositionButton</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">m_myPositionButton</string>
+ <string key="candidateClassName">UIBarButtonItem</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/MapViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">MapsAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>mapViewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>MapViewController</string>
+ <string>UIWindow</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>mapViewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">mapViewController</string>
+ <string key="candidateClassName">MapViewController</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">window</string>
+ <string key="candidateClassName">UIWindow</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/MapsAppDelegate.h</string>
+ </object>
+ </object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>