forked from organicmaps/organicmaps
[ios] My position iOS5 PP fix
This commit is contained in:
parent
1f4623f4db
commit
a20a017c28
2 changed files with 14 additions and 10 deletions
|
@ -94,9 +94,8 @@
|
|||
else
|
||||
MeasurementUtils::FormatMercator(point, lat, lon, dac);
|
||||
|
||||
self.longitudeLabel.text = [NSString stringWithUTF8String:lon.c_str()];
|
||||
|
||||
self.latitudeLabel.text = [NSString stringWithUTF8String:lat.c_str()];
|
||||
self.longitudeLabel.text = [NSString stringWithUTF8String:lon.c_str()];
|
||||
}
|
||||
|
||||
- (void)setPinPoint:(m2::PointD)pinPoint
|
||||
|
|
|
@ -24,9 +24,6 @@ typedef NS_ENUM(NSUInteger, CellRow)
|
|||
};
|
||||
|
||||
@interface PlacePageView () <UIGestureRecognizerDelegate, UITableViewDataSource, UITableViewDelegate, PlacePageShareCellDelegate, PlacePageInfoCellDelegate, ColorPickerDelegate, UIAlertViewDelegate, PlacePageRoutingCellDelegate>
|
||||
{
|
||||
BOOL m_hasSpeed;
|
||||
}
|
||||
|
||||
@property (nonatomic) UIImageView * backgroundView;
|
||||
@property (nonatomic) UIView * headerView;
|
||||
|
@ -60,6 +57,7 @@ typedef NS_ENUM(NSUInteger, CellRow)
|
|||
|
||||
BOOL needUpdateAddressInfo;
|
||||
search::AddressInfo m_addressInfo;
|
||||
BOOL m_hasSpeed;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
|
@ -809,11 +807,18 @@ typedef NS_ENUM(NSUInteger, CellRow)
|
|||
{
|
||||
if (!_types)
|
||||
{
|
||||
NSString * types = [NSString stringWithUTF8String:[self addressInfo].GetPinType().c_str()];
|
||||
if ([NSString instancesRespondToSelector:@selector(capitalizedStringWithLocale:)]) // iOS 6 and higher
|
||||
_types = [types capitalizedStringWithLocale:[NSLocale currentLocale]];
|
||||
else // iOS 5
|
||||
_types = [types capitalizedString];
|
||||
if ([self isMyPosition])
|
||||
{
|
||||
_types = [[MapsAppDelegate theApp].m_locationManager formattedSpeedAndAltitude:m_hasSpeed];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSString * types = [NSString stringWithUTF8String:[self addressInfo].GetPinType().c_str()];
|
||||
if ([NSString instancesRespondToSelector:@selector(capitalizedStringWithLocale:)]) // iOS 6 and higher
|
||||
_types = [types capitalizedStringWithLocale:[NSLocale currentLocale]];
|
||||
else // iOS 5
|
||||
_types = [types capitalizedString];
|
||||
}
|
||||
}
|
||||
return _types;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue