forked from organicmaps/organicmaps
Fixed route button displaying
This commit is contained in:
parent
6da048bcb7
commit
ba9ae1788a
2 changed files with 13 additions and 6 deletions
|
@ -38,6 +38,6 @@ typedef NS_ENUM(NSUInteger, PlacePageState) {
|
|||
@property (nonatomic, readonly) NSString * temporaryTitle;
|
||||
@property (nonatomic) BOOL statusBarIncluded;
|
||||
|
||||
- (void)showBuildingRoutingActivity:(BOOL)buiding;
|
||||
- (void)showBuildingRoutingActivity:(BOOL)show;
|
||||
|
||||
@end
|
||||
|
|
|
@ -364,7 +364,11 @@ typedef NS_ENUM(NSUInteger, CellRow)
|
|||
self.bookmarkButton.midY = 44;
|
||||
}
|
||||
self.routeButton.midY = self.bookmarkButton.midY - 1;
|
||||
self.routeButton.hidden = [self isMyPosition];
|
||||
if (self.routingActivity.isAnimating) {
|
||||
self.routeButton.hidden = YES;
|
||||
} else {
|
||||
self.routeButton.hidden = [self isMyPosition];
|
||||
}
|
||||
}
|
||||
|
||||
- (CGFloat)headerHeight
|
||||
|
@ -445,6 +449,9 @@ typedef NS_ENUM(NSUInteger, CellRow)
|
|||
CGFloat const headerHeight = [self headerHeight];
|
||||
self.tableView.frame = CGRectMake(0, headerHeight, self.superview.width, self.backgroundView.height - headerHeight);
|
||||
}
|
||||
if (self.routingActivity.isAnimating) {
|
||||
self.routingActivity.center = CGPointMake(self.routeButton.midX, self.routeButton.midY + INTEGRAL(2.5));
|
||||
}
|
||||
}
|
||||
|
||||
#define BOTTOM_SHADOW_OFFSET 18
|
||||
|
@ -811,11 +818,11 @@ typedef NS_ENUM(NSUInteger, CellRow)
|
|||
m_bookmarkData = NULL;
|
||||
}
|
||||
|
||||
- (void)showBuildingRoutingActivity:(BOOL)building
|
||||
- (void)showBuildingRoutingActivity:(BOOL)show
|
||||
{
|
||||
if (building)
|
||||
self.routeButton.hidden = show;
|
||||
if (show)
|
||||
{
|
||||
self.routeButton.hidden = YES;
|
||||
self.routingActivity = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
|
||||
self.routingActivity.center = CGPointMake(self.routeButton.midX, self.routeButton.midY + INTEGRAL(2.5));
|
||||
[self.routeButton.superview addSubview:self.routingActivity];
|
||||
|
@ -823,7 +830,7 @@ typedef NS_ENUM(NSUInteger, CellRow)
|
|||
}
|
||||
else
|
||||
{
|
||||
self.routeButton.hidden = NO;
|
||||
[self.routingActivity stopAnimating];
|
||||
[self.routingActivity removeFromSuperview];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue