[ios] PP fix

This commit is contained in:
Igor Khmurets 2014-06-25 18:41:55 +03:00 committed by Alex Zolotarev
parent 43d1973e65
commit bcbc4aaae1
4 changed files with 12 additions and 22 deletions

View file

@ -6,5 +6,4 @@
#define BOOKMARK_CATEGORY_DELETED_NOTIFICATION @"BookmarkCategoryDeletedNotification"
#define METRICS_CHANGED_NOTIFICATION @"MetricsChangedNotification"
#define BOOKMARK_DELETED_NOTIFICATION @"BookmarkDeletedNotification"
#define LOCATION_MANAGER_STARTED_NOTIFICATION @"LocationManagerStartedNotification"
#define BOOKMARK_DELETED_NOTIFICATION @"BookmarkDeletedNotification"

View file

@ -175,7 +175,6 @@ const long long LITE_IDL = 431183278L;
[[MapsAppDelegate theApp] disableStandby];
[[MapsAppDelegate theApp].m_locationManager start:self];
[[NSNotificationCenter defaultCenter] postNotificationName:LOCATION_MANAGER_STARTED_NOTIFICATION object:nil];
return;
}

View file

@ -30,6 +30,7 @@
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
self.selectionStyle = UITableViewCellSelectionStyleNone;
self.backgroundColor = [UIColor clearColor];
[self addSubview:self.compassView];
[self addSubview:self.distanceLabel];

View file

@ -94,16 +94,9 @@ typedef NS_ENUM(NSUInteger, CellRow)
updatingTable = NO;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(startMonitoringLocation:) name:LOCATION_MANAGER_STARTED_NOTIFICATION object:nil];
return self;
}
- (void)startMonitoringLocation:(NSNotification *)notification
{
[[MapsAppDelegate theApp].m_locationManager start:self];
}
- (void)onLocationError:(location::TLocationError)errorCode
{
NSLog(@"Location error %i in %@", errorCode, [[self class] className]);
@ -284,6 +277,15 @@ typedef NS_ENUM(NSUInteger, CellRow)
[self alignAnimated:animated];
self.tableView.contentInset = UIEdgeInsetsMake([self headerHeight], 0, 0, 0);
[self.tableView setContentOffset:CGPointMake(0, -self.tableView.contentInset.top) animated:animated];
if (state == PlacePageStateOpened)
{
if ([[MapsAppDelegate theApp].m_locationManager enabledOnMap])
[[MapsAppDelegate theApp].m_locationManager start:self];
}
else
{
[[MapsAppDelegate theApp].m_locationManager stop:self];
}
}
- (void)layoutSubviews
@ -709,18 +711,7 @@ typedef NS_ENUM(NSUInteger, CellRow)
- (NSString *)types
{
if (!_types)
{
if ([self isBookmark])
{
search::AddressInfo addressInfo;
GetFramework().GetAddressInfoForGlobalPoint([self userMark]->GetOrg(), addressInfo);
_types = [NSString stringWithUTF8String:addressInfo.GetPinType().c_str()];
}
else
{
_types = [NSString stringWithUTF8String:[self addressInfo].GetPinType().c_str()];
}
}
_types = [NSString stringWithUTF8String:[self addressInfo].GetPinType().c_str()];
return _types;
}