[ios] Renamed property

This commit is contained in:
Alex Zolotarev 2012-05-08 15:34:26 +03:00 committed by Alex Zolotarev
parent ab30866236
commit 1504863de9
3 changed files with 11 additions and 18 deletions

View file

@ -14,7 +14,7 @@
@property(nonatomic, retain) NSString * title;
@property(nonatomic, retain) NSString * description;
@property(nonatomic, assign, readonly) BOOL isDisplayed;
@property(nonatomic, assign) CGPoint glbPos;
@property(nonatomic, assign) CGPoint globalPosition;
- (id) initWithTarget:(id)target andSelector:(SEL)selector;
- (void) showInView:(UIView *)view atPoint:(CGPoint)pt;

View file

@ -3,20 +3,11 @@
@implementation BalloonView
@synthesize globalPosition;
@synthesize title;
@synthesize description;
@synthesize isDisplayed;
- (void) setGlobalPos:(m2::PointD const &)pt
{
m_globalPos = pt;
}
- (m2::PointD) getGlobalPos
{
return m_globalPos;
}
- (id) initWithTarget:(id)target andSelector:(SEL)selector;
{
if ((self = [super init]))
@ -45,9 +36,11 @@
m_titleView.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
m_titleView.backgroundColor = [UIColor blackColor];
m_titleView.layer.cornerRadius = 5;
m_titleView.alpha = 0.8;
m_titleView.textLabel.backgroundColor = [UIColor clearColor];
m_titleView.detailTextLabel.backgroundColor = [UIColor clearColor];
// m_titleView.alpha = 0.8;
// m_titleView.textLabel.backgroundColor = [UIColor clearColor];
// m_titleView.detailTextLabel.backgroundColor = [UIColor clearColor];
m_titleView.textLabel.textColor = [UIColor whiteColor];
m_titleView.detailTextLabel.textColor = [UIColor whiteColor];
CGFloat const w = m_titleView.bounds.size.width / 3 * 2;
CGFloat const h = m_titleView.bounds.size.height;
m_titleView.frame = CGRectMake(pt.x - w/2, pt.y - h, w, h);

View file

@ -173,12 +173,12 @@ Framework * m_framework = NULL;
[m_bookmark hide];
CGPoint const pixelPos = [point CGPointValue];
m2::PointD const globalPos = [self viewPoint2GlobalPoint:pixelPos];
CGPoint const globalPos = [self viewPoint2GlobalPoint:pixelPos];
Framework::AddressInfo addr;
m_framework->GetAddressInfo(globalPos, addr);
m_framework->GetAddressInfo(m2::PointD(globalPos.x, globalPos.y), addr);
m_bookmark.title = [NSString stringWithUTF8String:addr.m_name.c_str()];
m_bookmark.description = [NSString stringWithUTF8String:formatAddress(addr.m_house, addr.m_street, addr.m_city, addr.m_country).c_str()];
[m_bookmark setGlobalPos:globalPos];
m_bookmark.globalPosition = globalPos;
[m_bookmark showInView:self.view atPoint:pixelPos];
}
@ -256,7 +256,7 @@ NSInteger compareAddress(id l, id r, void * context)
- (void)updateDataAfterScreenChanged
{
[m_bookmark updatePosition:self.view atPoint:[self globalPoint2ViewPoint:m_bookmark.glbPos]];
[m_bookmark updatePosition:self.view atPoint:[self globalPoint2ViewPoint:m_bookmark.globalPosition]];
}
- (void)stopCurrentAction