forked from organicmaps/organicmaps
[ios] Deleted old code
This commit is contained in:
parent
d5f6fac2bd
commit
7cbeea245b
11 changed files with 2 additions and 1190 deletions
|
@ -1,7 +1,6 @@
|
|||
#import "BookmarksVC.h"
|
||||
#import "CustomNavigationView.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "CompassView.h"
|
||||
#import "BookmarkCell.h"
|
||||
#import "MapViewController.h"
|
||||
#import "Statistics.h"
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
#import "MessageComposeViewController.h"
|
||||
#import "MailComposeViewController.h"
|
||||
#import "ColorPickerView.h"
|
||||
#import "../../../map/bookmark.hpp"
|
||||
|
||||
typedef NS_ENUM(NSUInteger, PlacePageVCMode) {
|
||||
PlacePageVCModeEditing,
|
||||
PlacePageVCModeSaved,
|
||||
};
|
||||
|
||||
@class PlacePageVC;
|
||||
@protocol PlacePageVCDelegate <NSObject>
|
||||
|
||||
- (void)placePageVC:(PlacePageVC *)placePageVC didUpdateBookmarkAndCategory:(BookmarkAndCategory const &)bookmarkAndCategory;
|
||||
|
||||
@end
|
||||
|
||||
namespace search { struct AddressInfo; }
|
||||
namespace url_scheme { struct ApiPoint; }
|
||||
|
||||
@interface PlacePageVC : UITableViewController <UITextFieldDelegate, UITextViewDelegate, UIGestureRecognizerDelegate, ColorPickerDelegate>
|
||||
|
||||
- (id)initWithInfo:(search::AddressInfo const &)info point:(CGPoint)point;
|
||||
- (id)initWithApiPoint:(url_scheme::ApiPoint const &)apiPoint;
|
||||
- (id)initWithBookmark:(BookmarkAndCategory)bmAndCat;
|
||||
- (id)initWithName:(NSString *)name andGlobalPoint:(CGPoint)point;
|
||||
|
||||
@property (nonatomic, weak) id <PlacePageVCDelegate> delegate;
|
||||
@property (nonatomic) PlacePageVCMode mode;
|
||||
|
||||
@end
|
|
@ -1,737 +0,0 @@
|
|||
#import "PlacePageVC.h"
|
||||
#import "SelectSetVC.h"
|
||||
#import "Statistics.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "MapViewController.h"
|
||||
#import "TwoButtonsView.h"
|
||||
#import "ShareActionSheet.h"
|
||||
#import "PlaceAndCompasView.h"
|
||||
#import "CircleView.h"
|
||||
#import "UIKitCategories.h"
|
||||
|
||||
#include "Framework.h"
|
||||
#include "../../search/result.hpp"
|
||||
#include "../../platform/settings.hpp"
|
||||
|
||||
#define TEXTFIELD_TAG 999
|
||||
#define TEXTVIEW_TAG 666
|
||||
#define COORDINATE_TAG 333
|
||||
#define MARGIN 20
|
||||
#define SMALLMARGIN 10
|
||||
#define DESCRIPTIONHEIGHT 140
|
||||
#define TWOBUTTONSHEIGHT 44
|
||||
#define CELLHEIGHT 44
|
||||
#define COORDINATECOLOR 51.0/255.0
|
||||
#define BUTTONDIAMETER 18
|
||||
|
||||
@interface PlacePageVC() <UIWebViewDelegate>
|
||||
{
|
||||
int m_selectedRow;
|
||||
size_t m_categoryIndex;
|
||||
|
||||
//statistics purpose
|
||||
size_t m_categoryIndexStatistics;
|
||||
size_t m_numberOfCategories;
|
||||
UIWebView * webView;
|
||||
}
|
||||
|
||||
@property(nonatomic, copy) NSString * pinTitle;
|
||||
// Currently displays bookmark description (notes)
|
||||
@property(nonatomic, copy) NSString * pinNotes;
|
||||
// Stores displayed bookmark icon file name
|
||||
@property(nonatomic) NSString * pinColor;
|
||||
// If we clicked already existing bookmark, it will be here
|
||||
@property(nonatomic) BookmarkAndCategory pinEditedBookmark;
|
||||
|
||||
@property(nonatomic) CGPoint pinGlobalPosition;
|
||||
|
||||
@property (nonatomic) PlaceAndCompasView * placeAndCompass;
|
||||
|
||||
@property (nonatomic) UIView * pickerView;
|
||||
@property (nonatomic) ShareActionSheet * shareActionSheet;
|
||||
|
||||
@end
|
||||
|
||||
@implementation PlacePageVC
|
||||
|
||||
- (id)initWithInfo:(search::AddressInfo const &)info point:(CGPoint)point
|
||||
{
|
||||
self = [super initWithStyle:UITableViewStyleGrouped];
|
||||
if (self)
|
||||
{
|
||||
char const * pinName = info.GetPinName().c_str();
|
||||
[self initializeProperties:[NSString stringWithUTF8String:pinName ? pinName : ""]
|
||||
notes:@""
|
||||
color:@""
|
||||
category:MakeEmptyBookmarkAndCategory() point:point];
|
||||
self.mode = PlacePageVCModeEditing;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithApiPoint:(url_scheme::ApiPoint const &)apiPoint
|
||||
{
|
||||
self = [super initWithStyle:UITableViewStyleGrouped];
|
||||
if (self)
|
||||
{
|
||||
self.mode = PlacePageVCModeEditing;
|
||||
[self initializeProperties:[NSString stringWithUTF8String:apiPoint.m_name.c_str()]
|
||||
notes:@""
|
||||
color:@""
|
||||
category:MakeEmptyBookmarkAndCategory()
|
||||
point:CGPointMake(MercatorBounds::LonToX(apiPoint.m_lon), MercatorBounds::LatToY(apiPoint.m_lat))];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithBookmark:(BookmarkAndCategory)bmAndCat
|
||||
{
|
||||
self = [super initWithStyle:UITableViewStyleGrouped];
|
||||
if (self)
|
||||
{
|
||||
Framework const & f = GetFramework();
|
||||
|
||||
BookmarkCategory const * cat = f.GetBmCategory(bmAndCat.first);
|
||||
Bookmark const * bm = cat->GetBookmark(bmAndCat.second);
|
||||
search::AddressInfo info;
|
||||
|
||||
CGPoint const pt = CGPointMake(bm->GetOrg().x, bm->GetOrg().y);
|
||||
f.GetAddressInfoForGlobalPoint(bm->GetOrg(), info);
|
||||
|
||||
|
||||
[self initializeProperties:[NSString stringWithUTF8String:bm->GetName().c_str()]
|
||||
notes:[NSString stringWithUTF8String:bm->GetDescription().c_str()]
|
||||
color:[NSString stringWithUTF8String:bm->GetType().c_str()]
|
||||
category:bmAndCat
|
||||
point:CGPointMake(pt.x, pt.y)];
|
||||
|
||||
self.mode = PlacePageVCModeSaved;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithName:(NSString *)name andGlobalPoint:(CGPoint)point
|
||||
{
|
||||
self = [super initWithStyle:UITableViewStyleGrouped];
|
||||
if (self)
|
||||
{
|
||||
self.mode = PlacePageVCModeEditing;
|
||||
[self initializeProperties:name
|
||||
notes:@""
|
||||
color:@""
|
||||
category:MakeEmptyBookmarkAndCategory()
|
||||
point:point];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged) name:UIDeviceOrientationDidChangeNotification object:nil];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
// Update the table - we can display it after changing set or color
|
||||
[self.tableView reloadData];
|
||||
|
||||
// Automatically show keyboard if bookmark has default name
|
||||
if ([_pinTitle isEqualToString:NSLocalizedString(@"dropped_pin", nil)])
|
||||
[[[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]].contentView viewWithTag:TEXTFIELD_TAG] becomeFirstResponder];
|
||||
|
||||
if (IPAD)
|
||||
{
|
||||
CGSize size = CGSizeMake(320, 480);
|
||||
self.contentSizeForViewInPopover = size;
|
||||
}
|
||||
[super viewWillAppear:animated];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
self.title = NSLocalizedString(@"info", nil);
|
||||
if (self.mode == PlacePageVCModeEditing)
|
||||
[self addRightNavigationItemWithAction:@selector(save)];
|
||||
else
|
||||
[self addRightNavigationItemWithAction:@selector(edit)];
|
||||
|
||||
self.tableView.backgroundView = nil;
|
||||
self.tableView.backgroundColor = [UIColor applicationBackgroundColor];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
if (self.mode == PlacePageVCModeEditing)
|
||||
return 4;
|
||||
else
|
||||
return 2;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
if (self.mode == PlacePageVCModeEditing)
|
||||
switch (section)
|
||||
{
|
||||
//name
|
||||
case 0: return 1;
|
||||
//set
|
||||
case 1: return 1;
|
||||
//color picker
|
||||
case 2: return 1;
|
||||
//description
|
||||
case 3: return 1;
|
||||
}
|
||||
else
|
||||
switch (section)
|
||||
{
|
||||
//return zero, because want to use headers and footers
|
||||
//coordinates cell
|
||||
case 0: return 0;
|
||||
case 1: return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.section == 3 && self.mode == PlacePageVCModeEditing)
|
||||
return DESCRIPTIONHEIGHT;
|
||||
return CELLHEIGHT;
|
||||
}
|
||||
|
||||
- (void)webViewDidFinishLoad:(UIWebView *)aWebView
|
||||
{
|
||||
[webView sizeToFit];
|
||||
[self.tableView reloadData];
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
webView.alpha = 1;
|
||||
}];
|
||||
}
|
||||
|
||||
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
|
||||
{
|
||||
if (navigationType == UIWebViewNavigationTypeLinkClicked)
|
||||
{
|
||||
[[UIApplication sharedApplication] openURL:request.URL];
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
if (section == 0 && self.mode == PlacePageVCModeSaved)
|
||||
return TWOBUTTONSHEIGHT;
|
||||
return [self.tableView sectionHeaderHeight];
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
|
||||
{
|
||||
if (section == 0 && [self.pinNotes length] && self.mode == PlacePageVCModeSaved)
|
||||
return webView.scrollView.contentSize.height + 10;
|
||||
return [self.tableView sectionFooterHeight];
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
if (section == 0 && self.mode == PlacePageVCModeSaved)
|
||||
return [[TwoButtonsView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, TWOBUTTONSHEIGHT)
|
||||
leftButtonSelector:@selector(share)
|
||||
rightButtonSelector:@selector(remove)
|
||||
leftButtonTitle:NSLocalizedString(@"share", nil)
|
||||
rightButtontitle:NSLocalizedString(@"remove_pin", nil)
|
||||
target:self];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
|
||||
{
|
||||
if (self.mode == PlacePageVCModeSaved && section == 0 && [self.pinNotes length])
|
||||
{
|
||||
UIView * contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.width, 20)];
|
||||
if (!webView)
|
||||
{
|
||||
CGFloat xOffset = 7;
|
||||
CGFloat yOffset = 7;
|
||||
webView = [[UIWebView alloc] initWithFrame:CGRectMake(xOffset, yOffset, contentView.width - 2 * xOffset, contentView.height - yOffset)];
|
||||
webView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
|
||||
webView.alpha = 0;
|
||||
webView.opaque = NO;
|
||||
webView.backgroundColor = [UIColor clearColor];
|
||||
webView.delegate = self;
|
||||
NSString * text = [NSString stringWithFormat:@"<font face=\"helvetica\">%@</font>", self.pinNotes];
|
||||
[webView loadHTMLString:text baseURL:nil];
|
||||
}
|
||||
[contentView addSubview:webView];
|
||||
return contentView;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
UITableViewCell * cell = nil;
|
||||
if (self.mode == PlacePageVCModeEditing)
|
||||
cell = [self cellForEditingModeWithTable:tableView cellForRowAtIndexPath:indexPath];
|
||||
else
|
||||
cell = [self cellForSaveModeWithTable:tableView cellForRowAtIndexPath:indexPath];
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (self.mode == PlacePageVCModeEditing)
|
||||
{
|
||||
if (indexPath.section == 1)
|
||||
{
|
||||
// SelectSetVC * vc = [[SelectSetVC alloc] initWithIndex:&m_categoryIndex];
|
||||
// [self pushToNavigationControllerAndSetControllerToPopoverSize:vc];
|
||||
}
|
||||
else if (indexPath.section == 2)
|
||||
[self showPicker];
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)textFieldShouldReturn:(UITextField *)textField
|
||||
{
|
||||
if ([textField.text length] == 0)
|
||||
return YES;
|
||||
// Hide keyboard
|
||||
[textField resignFirstResponder];
|
||||
|
||||
if (![textField.text isEqualToString:_pinTitle])
|
||||
{
|
||||
self.pinTitle = textField.text;
|
||||
self.navigationController.title = textField.text;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)pushToNavigationControllerAndSetControllerToPopoverSize:(UIViewController *)vc
|
||||
{
|
||||
if (IPAD)
|
||||
[vc setContentSizeForViewInPopover:[self contentSizeForViewInPopover]];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (void)getSuperView:(double &)height width:(double &)width rect:(CGRect &)rect
|
||||
{
|
||||
if (!IPAD)
|
||||
{
|
||||
rect = [UIScreen mainScreen].bounds;
|
||||
height = self.view.window.frame.size.height;
|
||||
width = self.view.window.frame.size.width;
|
||||
if(!UIInterfaceOrientationIsPortrait(self.interfaceOrientation))
|
||||
std::swap(height, width);
|
||||
}
|
||||
else
|
||||
{
|
||||
height = self.view.superview.frame.size.height;
|
||||
width = self.view.superview.frame.size.width;
|
||||
rect = self.view.superview.frame;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)addRightNavigationItemWithAction:(SEL)selector
|
||||
{
|
||||
UIBarButtonItem * but;
|
||||
if (self.mode == PlacePageVCModeSaved)
|
||||
but = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:self action:selector];
|
||||
else
|
||||
but = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:selector];
|
||||
self.navigationItem.rightBarButtonItem = but;
|
||||
}
|
||||
|
||||
- (void)save
|
||||
{
|
||||
[self.view endEditing:YES];
|
||||
[self savePin];
|
||||
[self goToTheMap];
|
||||
GetFramework().GetBalloonManager().Hide();
|
||||
}
|
||||
|
||||
- (void)edit
|
||||
{
|
||||
self.mode = PlacePageVCModeEditing;
|
||||
[self.tableView reloadData];
|
||||
[self addRightNavigationItemWithAction:@selector(save)];
|
||||
}
|
||||
|
||||
- (void)remove
|
||||
{
|
||||
if (IsValid(_pinEditedBookmark))
|
||||
{
|
||||
BookmarkCategory * cat = GetFramework().GetBmCategory(_pinEditedBookmark.first);
|
||||
if (cat->GetBookmarksCount() > _pinEditedBookmark.second)
|
||||
[self deleteBookmarkInCategory:cat];
|
||||
}
|
||||
[self goToTheMap];
|
||||
}
|
||||
|
||||
- (void)deleteBookmarkInCategory:(BookmarkCategory *)category
|
||||
{
|
||||
category->DeleteBookmark(_pinEditedBookmark.second);
|
||||
category->SaveToKMLFile();
|
||||
NSValue * value = [NSValue valueWithBytes:&_pinEditedBookmark objCType:@encode(BookmarkAndCategory)];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:BOOKMARK_DELETED_NOTIFICATION object:value];
|
||||
}
|
||||
|
||||
- (void)share
|
||||
{
|
||||
ShareInfo * info = [[ShareInfo alloc] initWithText:self.pinTitle gX:_pinGlobalPosition.x gY:_pinGlobalPosition.y myPosition:NO];
|
||||
self.shareActionSheet = [[ShareActionSheet alloc] initWithInfo:info viewController:self];
|
||||
[self.shareActionSheet show];
|
||||
}
|
||||
|
||||
- (void)savePin
|
||||
{
|
||||
Framework & f = GetFramework();
|
||||
if (_pinEditedBookmark == MakeEmptyBookmarkAndCategory())
|
||||
{
|
||||
if ([self.pinNotes length] != 0)
|
||||
[[Statistics instance] logEvent:@"New Bookmark Description Field Occupancy" withParameters:@{@"Occupancy" : @"Filled"}];
|
||||
else
|
||||
[[Statistics instance] logEvent:@"New Bookmark Description Field Occupancy" withParameters:@{@"Occupancy" : @"Empty"}];
|
||||
|
||||
if (m_categoryIndexStatistics != m_categoryIndex)
|
||||
[[Statistics instance] logEvent:@"New Bookmark Category" withParameters:@{@"Changed" : @"YES"}];
|
||||
else
|
||||
[[Statistics instance] logEvent:@"New Bookmark Category" withParameters:@{@"Changed" : @"NO"}];
|
||||
|
||||
if (m_numberOfCategories != GetFramework().GetBmCategoriesCount())
|
||||
[[Statistics instance] logEvent:@"New Bookmark Category Set Was Created" withParameters:@{@"Created" : @"YES"}];
|
||||
else
|
||||
[[Statistics instance] logEvent:@"New Bookmark Category Set Was Created" withParameters:@{@"Created" : @"NO"}];
|
||||
|
||||
int value = 0;
|
||||
if (Settings::Get("NumberOfBookmarksPerSession", value))
|
||||
Settings::Set("NumberOfBookmarksPerSession", ++value);
|
||||
[self addBookmarkToCategory:m_categoryIndex];
|
||||
}
|
||||
else
|
||||
{
|
||||
BookmarkCategory * cat = f.GetBmCategory(_pinEditedBookmark.first);
|
||||
Bookmark * bm = cat->GetBookmark(_pinEditedBookmark.second);
|
||||
|
||||
if ([self.pinColor isEqualToString:[NSString stringWithUTF8String:bm->GetType().c_str()]])
|
||||
[[Statistics instance] logEvent:@"Bookmark Color" withParameters:@{@"Changed" : @"NO"}];
|
||||
else
|
||||
[[Statistics instance] logEvent:@"Bookmark Color" withParameters:@{@"Changed" : @"YES"}];
|
||||
|
||||
if ([self.pinNotes isEqualToString:[NSString stringWithUTF8String:bm->GetDescription().c_str()]])
|
||||
[[Statistics instance] logEvent:@"Bookmark Description Field" withParameters:@{@"Changed" : @"NO"}];
|
||||
else
|
||||
[[Statistics instance] logEvent:@"Bookmark Description Field" withParameters:@{@"Changed" : @"YES"}];
|
||||
|
||||
if (_pinEditedBookmark.first != m_categoryIndex)
|
||||
{
|
||||
[[Statistics instance] logEvent:@"Bookmark Category" withParameters:@{@"Changed" : @"YES"}];
|
||||
[self deleteBookmarkInCategory:cat];
|
||||
[self addBookmarkToCategory:m_categoryIndex];
|
||||
}
|
||||
else
|
||||
{
|
||||
[[Statistics instance] logEvent:@"Bookmark Category" withParameters:@{@"Changed" : @"NO"}];
|
||||
|
||||
BookmarkData newBm([self.pinTitle UTF8String], [self.pinColor UTF8String]);
|
||||
newBm.SetDescription([self.pinNotes UTF8String]);
|
||||
f.ReplaceBookmark(_pinEditedBookmark.first, _pinEditedBookmark.second, newBm);
|
||||
}
|
||||
[self.delegate placePageVC:self didUpdateBookmarkAndCategory:_pinEditedBookmark];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)addBookmarkToCategory:(size_t)index
|
||||
{
|
||||
BookmarkData bm([self.pinTitle UTF8String], [self.pinColor UTF8String]);
|
||||
bm.SetDescription([self.pinNotes UTF8String]);
|
||||
|
||||
_pinEditedBookmark = pair<int, int>(index, GetFramework().AddBookmark(index, m2::PointD(_pinGlobalPosition.x, _pinGlobalPosition.y), bm));
|
||||
[self.delegate placePageVC:self didUpdateBookmarkAndCategory:_pinEditedBookmark];
|
||||
}
|
||||
|
||||
- (void)initializeProperties:(NSString *)name notes:(NSString *)notes color:(NSString *)color category:(BookmarkAndCategory) bmAndCat point:(CGPoint)point
|
||||
{
|
||||
Framework & f = GetFramework();
|
||||
|
||||
self.pinTitle = name;
|
||||
self.pinNotes = notes;
|
||||
self.pinColor = (color.length == 0 ? [NSString stringWithUTF8String:f.LastEditedBMType().c_str()] : color);
|
||||
self.pinEditedBookmark = bmAndCat;
|
||||
m_categoryIndex = (bmAndCat.first == - 1 ? f.LastEditedBMCategory() : bmAndCat.first);
|
||||
self.pinGlobalPosition = point;
|
||||
|
||||
m_categoryIndexStatistics = m_categoryIndex;
|
||||
m_numberOfCategories = f.GetBmCategoriesCount();
|
||||
m_selectedRow = [ColorPickerView getColorIndex:self.pinColor];
|
||||
}
|
||||
|
||||
- (UITableViewCell *)cellForEditingModeWithTable:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
NSString * cellId;
|
||||
switch (indexPath.section)
|
||||
{
|
||||
case 0: cellId = @"EditingNameCellId"; break;
|
||||
case 1: cellId = @"EditingSetCellId"; break;
|
||||
case 2: cellId = @"EditingColorCellId"; break;
|
||||
default: cellId = @"EditingDF"; break;
|
||||
}
|
||||
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
||||
if (!cell)
|
||||
{
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellId];
|
||||
if (indexPath.section == 0)
|
||||
{
|
||||
cell.textLabel.text = NSLocalizedString(@"name", @"Add bookmark dialog - bookmark name");
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
// Temporary, to init font and color
|
||||
cell.detailTextLabel.text = @"temp string";
|
||||
// Called to initialize frames and fonts
|
||||
[cell layoutSubviews];
|
||||
CGRect const leftR = cell.textLabel.frame;
|
||||
CGFloat const padding = leftR.origin.x;
|
||||
CGRect r = CGRectMake(padding + leftR.size.width + padding, leftR.origin.y,
|
||||
cell.contentView.frame.size.width - 3 * padding - leftR.size.width, leftR.size.height);
|
||||
UITextField * f = [[UITextField alloc] initWithFrame:r];
|
||||
f.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
f.enablesReturnKeyAutomatically = YES;
|
||||
f.returnKeyType = UIReturnKeyDone;
|
||||
f.clearButtonMode = UITextFieldViewModeWhileEditing;
|
||||
f.autocorrectionType = UITextAutocorrectionTypeNo;
|
||||
f.textAlignment = UITextAlignmentRight;
|
||||
f.textColor = cell.detailTextLabel.textColor;
|
||||
f.font = [cell.detailTextLabel.font fontWithSize:[cell.detailTextLabel.font pointSize]];
|
||||
f.tag = TEXTFIELD_TAG;
|
||||
f.delegate = self;
|
||||
f.autocapitalizationType = UITextAutocapitalizationTypeWords;
|
||||
[f addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
|
||||
// Reset temporary font
|
||||
cell.detailTextLabel.text = nil;
|
||||
[cell.contentView addSubview:f];
|
||||
}
|
||||
else if (indexPath.section == 1)
|
||||
{
|
||||
cell.textLabel.text = NSLocalizedString(@"set", @"Add bookmark dialog - bookmark set");
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
}
|
||||
else if (indexPath.section == 2)
|
||||
{
|
||||
cell.textLabel.text = NSLocalizedString(@"color", @"Add bookmark dialog - bookmark color");
|
||||
}
|
||||
else if (indexPath.section == 3)
|
||||
{
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
// Temporary, to init font and color
|
||||
cell.detailTextLabel.text = @"temp string";
|
||||
// Called to initialize frames and fonts
|
||||
[cell layoutSubviews];
|
||||
UITextView * txtView = [[UITextView alloc] initWithFrame:CGRectMake(10.0, 0.0, 300.0, 142.0)];
|
||||
txtView.delegate = self;
|
||||
txtView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
|
||||
txtView.textColor = cell.detailTextLabel.textColor;
|
||||
txtView.font = [cell.detailTextLabel.font fontWithSize:[cell.detailTextLabel.font pointSize]];
|
||||
txtView.backgroundColor = [UIColor clearColor];
|
||||
txtView.tag = TEXTVIEW_TAG;
|
||||
cell.detailTextLabel.text = @"";
|
||||
[cell.contentView addSubview:txtView];
|
||||
txtView.delegate = self;
|
||||
}
|
||||
}
|
||||
switch (indexPath.section)
|
||||
{
|
||||
case 0:
|
||||
((UITextField *)[cell.contentView viewWithTag:TEXTFIELD_TAG]).text = self.pinTitle;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
cell.detailTextLabel.text = [NSString stringWithUTF8String:GetFramework().GetBmCategory(m_categoryIndex)->GetName().c_str()];
|
||||
break;
|
||||
|
||||
case 2:
|
||||
cell.accessoryView = [[UIImageView alloc] initWithImage:[CircleView createCircleImageWith:BUTTONDIAMETER andColor:[ColorPickerView buttonColor:m_selectedRow]]];
|
||||
break;
|
||||
case 3:
|
||||
UITextView * textView = (UITextView *)[cell viewWithTag:TEXTVIEW_TAG];
|
||||
textView.text = [self.pinNotes length] ? self.pinNotes : [self descriptionPlaceholderText];
|
||||
break;
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)cellForSaveModeWithTable:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
UITableViewCell * cell = nil;
|
||||
if (indexPath.section == 0)
|
||||
{
|
||||
cell = [tableView dequeueReusableCellWithIdentifier:@"CoordinatesCELL"];
|
||||
if (!cell)
|
||||
{
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CoordinatesCELL"];
|
||||
cell.textLabel.textAlignment = UITextAlignmentCenter;
|
||||
cell.textLabel.font = [UIFont fontWithName:@"Helvetica" size:26];
|
||||
cell.textLabel.textColor = [UIColor colorWithRed:COORDINATECOLOR green:COORDINATECOLOR blue:COORDINATECOLOR alpha:1.0];
|
||||
UILongPressGestureRecognizer * longTouch = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)];
|
||||
longTouch.minimumPressDuration = 0.5;
|
||||
longTouch.delegate = self;
|
||||
[cell addGestureRecognizer:longTouch];
|
||||
}
|
||||
cell.textLabel.text = [self coordinatesToString];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)orientationChanged
|
||||
{
|
||||
if (self.mode == PlacePageVCModeSaved)
|
||||
{
|
||||
[self.placeAndCompass drawView];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)goToTheMap
|
||||
{
|
||||
GetFramework().GetBalloonManager().Hide();
|
||||
if (IPAD)
|
||||
[[MapsAppDelegate theApp].m_mapViewController dismissPopover];
|
||||
else
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (CGFloat)getDescriptionHeight
|
||||
{
|
||||
return [self.pinNotes sizeWithFont:[UIFont fontWithName:@"Helvetica" size:18] constrainedToSize:CGSizeMake(self.tableView.frame.size.width - 3 * SMALLMARGIN, CGFLOAT_MAX) lineBreakMode:NSLineBreakByCharWrapping].height;
|
||||
}
|
||||
|
||||
- (void)handleLongPress:(UILongPressGestureRecognizer *)gestureRecognizer
|
||||
{
|
||||
if (gestureRecognizer.state == UIGestureRecognizerStateBegan)
|
||||
{
|
||||
CGPoint p = [gestureRecognizer locationInView:self.tableView];
|
||||
NSIndexPath * indexPath = [self.tableView indexPathForRowAtPoint:p];
|
||||
if (indexPath != nil)
|
||||
{
|
||||
[self becomeFirstResponder];
|
||||
UIMenuController * menu = [UIMenuController sharedMenuController];
|
||||
[menu setTargetRect:[self.tableView rectForRowAtIndexPath:indexPath] inView:self.tableView];
|
||||
[menu setMenuVisible:YES animated:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
|
||||
{
|
||||
if (action == @selector(copy:))
|
||||
return YES;
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)canBecomeFirstResponder
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)copy:(id)sender
|
||||
{
|
||||
[UIPasteboard generalPasteboard].string = [self coordinatesToString];
|
||||
}
|
||||
|
||||
- (NSString *)coordinatesToString
|
||||
{
|
||||
NSLocale * decimalPointLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
|
||||
return [[NSString alloc] initWithFormat:@"%@" locale:decimalPointLocale, [NSString stringWithFormat:@"%.05f %.05f", MercatorBounds::YToLat(self.pinGlobalPosition.y), MercatorBounds::XToLon(self.pinGlobalPosition.x)]];
|
||||
}
|
||||
|
||||
-(void)textFieldDidChange:(UITextField *)textField
|
||||
{
|
||||
if (textField.tag == TEXTFIELD_TAG)
|
||||
self.pinTitle = textField.text;
|
||||
}
|
||||
|
||||
- (void)textViewDidChange:(UITextView *)textView
|
||||
{
|
||||
if (textView.tag == TEXTVIEW_TAG)
|
||||
self.pinNotes = textView.text;
|
||||
}
|
||||
|
||||
- (void)textViewDidBeginEditing:(UITextView *)textView
|
||||
{
|
||||
if (![self.pinNotes length])
|
||||
textView.text = @"";
|
||||
}
|
||||
|
||||
- (void)textViewDidEndEditing:(UITextView *)textView
|
||||
{
|
||||
if (![self.pinNotes length])
|
||||
textView.text = [self descriptionPlaceholderText];
|
||||
}
|
||||
|
||||
- (NSString *)descriptionPlaceholderText
|
||||
{
|
||||
return NSLocalizedString(@"description", nil);
|
||||
}
|
||||
|
||||
- (void)showPicker
|
||||
{
|
||||
double height, width;
|
||||
CGRect rect;
|
||||
[self getSuperView:height width:width rect:rect];
|
||||
self.pickerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, width, height)];
|
||||
ColorPickerView * colorPicker = [[ColorPickerView alloc] initWithWidth:min(height, width) andSelectButton:m_selectedRow];
|
||||
colorPicker.delegate = self;
|
||||
CGRect r = colorPicker.frame;
|
||||
r.origin.x = (self.pickerView.frame.size.width - colorPicker.frame.size.width) / 2;
|
||||
r.origin.y = (self.pickerView.frame.size.height - colorPicker.frame.size.height) / 2;
|
||||
colorPicker.frame = r;
|
||||
[self.pickerView addSubview:colorPicker];
|
||||
self.pickerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
[self.pickerView setBackgroundColor:[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.5]];
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissPicker)];
|
||||
[self.pickerView addGestureRecognizer:tap];
|
||||
if (!IPAD)
|
||||
{
|
||||
[self.view endEditing:YES];
|
||||
UIWindow * window = [UIApplication sharedApplication].keyWindow;
|
||||
if (!window)
|
||||
window = [[UIApplication sharedApplication].windows objectAtIndex:0];
|
||||
[[[window subviews] objectAtIndex:0] addSubview:self.pickerView];
|
||||
}
|
||||
else
|
||||
[self.view.superview addSubview:self.pickerView];
|
||||
}
|
||||
|
||||
- (void)dismissPicker
|
||||
{
|
||||
[self.pickerView removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)colorPicked:(size_t)colorIndex
|
||||
{
|
||||
if (colorIndex != m_selectedRow)
|
||||
{
|
||||
[[Statistics instance] logEvent:@"Select Bookmark color"];
|
||||
self.pinColor = [ColorPickerView colorName:colorIndex];
|
||||
if (!IsValid(self.pinEditedBookmark))
|
||||
[[Statistics instance] logEvent:@"New Bookmark Color Changed"];
|
||||
[self.tableView reloadData];
|
||||
m_selectedRow = colorIndex;
|
||||
}
|
||||
[self dismissPicker];
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,12 +0,0 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
|
||||
// Custom view which drows an arrow
|
||||
@interface CompassView : UIView
|
||||
// Rotation angle in radians (decart system)
|
||||
@property (nonatomic) float angle;
|
||||
// NO by default - do not display anything
|
||||
// If set to YES - use angle to display the arrow
|
||||
@property (nonatomic) BOOL showArrow;
|
||||
@property (nonatomic) UIColor * color;
|
||||
|
||||
@end
|
|
@ -1,77 +0,0 @@
|
|||
#import "CompassView.h"
|
||||
|
||||
#define DEFAULTCOLOR 168.0/255.0
|
||||
|
||||
@implementation CompassView
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self)
|
||||
{
|
||||
self.opaque = NO;
|
||||
self.clearsContextBeforeDrawing = YES;
|
||||
self.showArrow = NO;
|
||||
self.color = [[UIColor alloc] initWithRed:DEFAULTCOLOR green:DEFAULTCOLOR blue:DEFAULTCOLOR alpha:1.0];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setAngle:(float)aAngle
|
||||
{
|
||||
_angle = aAngle;
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
- (void)setShowArrow:(BOOL)showOrNot
|
||||
{
|
||||
_showArrow = showOrNot;
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
if (self.showArrow)
|
||||
{
|
||||
// Draws an arrow looking to the right like this:
|
||||
// =>
|
||||
// and rotates it to given angle
|
||||
/*
|
||||
bottom
|
||||
___________
|
||||
\ | /
|
||||
\ | /
|
||||
\ |--/--- heights
|
||||
\ | /
|
||||
\|/
|
||||
|
||||
*/
|
||||
|
||||
UIBezierPath * aPath = [UIBezierPath bezierPath];
|
||||
|
||||
float const w = rect.size.width;
|
||||
float const w2 = w / 2.0;
|
||||
float const w3 = w / 3.0;
|
||||
float const heights = w * 0.85;
|
||||
float const halfBottom = (sqrt(w2 * w2 - (heights - w2) * (heights - w2)));
|
||||
float const margin = w - heights;
|
||||
|
||||
[aPath moveToPoint:CGPointMake(w3, w2)];
|
||||
[aPath addLineToPoint:CGPointMake(margin, w2 - halfBottom)];
|
||||
[aPath addLineToPoint:CGPointMake(w, w2)];
|
||||
[aPath addLineToPoint:CGPointMake(margin, w2 + halfBottom)];
|
||||
[aPath closePath];
|
||||
|
||||
CGAffineTransform matrix = CGAffineTransformMakeTranslation(w2, w2);
|
||||
matrix = CGAffineTransformRotate(matrix, -self.angle);
|
||||
matrix = CGAffineTransformTranslate(matrix, -w2 + 0.1 * w2, -w2 + 0.1 * w2);
|
||||
matrix = CGAffineTransformScale(matrix, 0.9, 0.9);
|
||||
[aPath applyTransform:matrix];
|
||||
|
||||
[self.color setFill];
|
||||
[aPath fill];
|
||||
}
|
||||
// Do not draw anything if showArrow property is not set
|
||||
}
|
||||
|
||||
@end
|
|
@ -2,7 +2,6 @@
|
|||
#import "MapsAppDelegate.h"
|
||||
#import "EAGLView.h"
|
||||
#import "BookmarksRootVC.h"
|
||||
#import "PlacePageVC.h"
|
||||
#import "UIKitCategories.h"
|
||||
#import "SettingsViewController.h"
|
||||
#import "UIViewController+Navigation.h"
|
||||
|
@ -42,7 +41,7 @@
|
|||
const long long PRO_IDL = 510623322L;
|
||||
const long long LITE_IDL = 431183278L;
|
||||
|
||||
@interface MapViewController () <PlacePageViewDelegate, PlacePageVCDelegate, ToolbarViewDelegate, BottomMenuDelegate, SelectSetVCDelegate, BookmarkDescriptionVCDelegate, BookmarkNameVCDelegate>
|
||||
@interface MapViewController () <PlacePageViewDelegate, ToolbarViewDelegate, BottomMenuDelegate, SelectSetVCDelegate, BookmarkDescriptionVCDelegate, BookmarkNameVCDelegate>
|
||||
|
||||
@property (nonatomic) ShareActionSheet * shareActionSheet;
|
||||
@property (nonatomic) UIButton * buyButton;
|
||||
|
@ -873,12 +872,6 @@ const long long LITE_IDL = 431183278L;
|
|||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
|
||||
}
|
||||
|
||||
- (void)placePageVC:(PlacePageVC *)placePageVC didUpdateBookmarkAndCategory:(BookmarkAndCategory const &)bookmarkAndCategory
|
||||
{
|
||||
UserMark const * userMark = GetFramework().GetBmCategory(bookmarkAndCategory.first)->GetBookmark(bookmarkAndCategory.second);
|
||||
[self.containerView.placePage showUserMark:userMark->Copy()];
|
||||
}
|
||||
|
||||
#pragma mark - BottomMenuDelegate
|
||||
|
||||
- (void)bottomMenuDidPressBuyButton:(BottomMenu *)menu
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
#include "LocationManager.h"
|
||||
|
||||
@class CompassView;
|
||||
|
||||
@interface PlaceAndCompasView : UIView <LocationObserver>
|
||||
|
||||
- (void)drawView;
|
||||
|
||||
- (id)initWithName:(NSString *)placeName placeSecondaryName:(NSString *)placeSecondaryName placeGlobalPoint:(CGPoint)point width:(CGFloat)width;
|
||||
|
||||
@end
|
|
@ -1,245 +0,0 @@
|
|||
#import "PlaceAndCompasView.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "CompassView.h"
|
||||
#import "CompassView.h"
|
||||
#import "Framework.h"
|
||||
#import "CircleView.h"
|
||||
|
||||
#include "../../../map/measurement_utils.hpp"
|
||||
#include "../../../geometry/distance_on_sphere.hpp"
|
||||
|
||||
#define MARGIN 20
|
||||
#define SMALLMARGIN 5
|
||||
#define COMPASSSIDE 150
|
||||
#define DISTANCEHEIGHT 20
|
||||
#define NAMEFONTSIZE 25
|
||||
#define SECONDNAMEFONTSIZE 20
|
||||
#define CIRCLEDIAMETER 190
|
||||
|
||||
|
||||
@interface PlaceAndCompasView()
|
||||
{
|
||||
double m_xGlobal, m_yGlobal;
|
||||
LocationManager * m_locationManager;
|
||||
double m_currentHeight;
|
||||
}
|
||||
|
||||
@property (nonatomic, copy) NSString * name;
|
||||
@property (nonatomic, copy) NSString * secondaryInfo;
|
||||
@property (nonatomic) CompassView * compass;
|
||||
@property (nonatomic) UITextView * nameView;
|
||||
@property (nonatomic) UITextView * secondaryInfoView;
|
||||
@property (nonatomic) UILabel * distanceLabel;
|
||||
@property (nonatomic) CircleView * circle;
|
||||
@property (nonatomic) double screenWidth;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation PlaceAndCompasView
|
||||
|
||||
- (id)initWithName:(NSString *)placeName placeSecondaryName:(NSString *)placeSecondaryName placeGlobalPoint:(CGPoint)point width:(CGFloat)width
|
||||
{
|
||||
self = [super initWithFrame:CGRectZero];
|
||||
if (self)
|
||||
{
|
||||
m_xGlobal = point.x;
|
||||
m_yGlobal = point.y;
|
||||
|
||||
_circle = [[CircleView alloc] initWithFrame:CGRectZero andColor:[UIColor colorWithRed:255.0 green:255.0 blue:255.0 alpha:0.5]];
|
||||
|
||||
_distanceLabel = [[UILabel alloc] init];
|
||||
self.distanceLabel.backgroundColor = [UIColor clearColor];
|
||||
|
||||
_compass = [[CompassView alloc] initWithFrame:CGRectZero];
|
||||
self.compass.color = [UIColor blackColor];
|
||||
|
||||
m_locationManager = [MapsAppDelegate theApp].m_locationManager;
|
||||
[m_locationManager start:self];
|
||||
|
||||
if ([placeName length] == 0)
|
||||
{
|
||||
_name = [[NSString alloc] initWithString:placeSecondaryName];
|
||||
_secondaryInfo = @"";
|
||||
}
|
||||
else
|
||||
{
|
||||
_name = [[NSString alloc] initWithString:placeName];
|
||||
_secondaryInfo = [[NSString alloc] initWithString:placeSecondaryName];
|
||||
}
|
||||
_screenWidth = width;
|
||||
|
||||
_nameView = [[UITextView alloc] initWithFrame:CGRectZero];
|
||||
self.nameView.text = self.name;
|
||||
self.nameView.editable = NO;
|
||||
self.nameView.backgroundColor = [UIColor clearColor];
|
||||
self.nameView.font = [UIFont fontWithName:@"Helvetica" size:NAMEFONTSIZE];
|
||||
self.nameView.scrollEnabled = NO;
|
||||
|
||||
_secondaryInfoView = [[UITextView alloc] initWithFrame:CGRectZero];
|
||||
|
||||
self.secondaryInfoView.text = self.secondaryInfo;
|
||||
self.secondaryInfoView.editable = NO;
|
||||
self.secondaryInfoView.backgroundColor = [UIColor clearColor];
|
||||
self.secondaryInfoView.font = [UIFont fontWithName:@"Helvetica" size:SECONDNAMEFONTSIZE];
|
||||
self.secondaryInfoView.scrollEnabled = NO;
|
||||
|
||||
[self addSubview:self.circle];
|
||||
[self addSubview:self.nameView];
|
||||
[self addSubview:self.secondaryInfoView];
|
||||
[self addSubview:self.compass];
|
||||
[self addSubview:self.distanceLabel];
|
||||
|
||||
self.compass.angle = [self getAzimut];
|
||||
|
||||
[self drawView];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[m_locationManager stop:self];
|
||||
}
|
||||
|
||||
- (void)drawView
|
||||
{
|
||||
if ([self canShowArrow])
|
||||
[self drawWithArrow];
|
||||
else
|
||||
[self drawWithoutArrow];
|
||||
}
|
||||
|
||||
- (void)drawWithoutArrow
|
||||
{
|
||||
[self.compass setShowArrow:NO];
|
||||
self.distanceLabel.frame = CGRectZero;
|
||||
self.circle.frame = CGRectZero;
|
||||
double width = [self getCurrentSuperViewWidth];
|
||||
|
||||
if ([self.name length] == 0)
|
||||
{
|
||||
self.nameView.frame = CGRectZero;
|
||||
[self.secondaryInfoView setFont:[UIFont fontWithName:@"Helvetica" size:NAMEFONTSIZE]];
|
||||
}
|
||||
else
|
||||
{
|
||||
self.nameView.frame = CGRectMake(2 * SMALLMARGIN, 2 * SMALLMARGIN, width - MARGIN, [self getTextHeight:self.name font:[UIFont fontWithName:@"Helvetica" size:NAMEFONTSIZE]]);
|
||||
}
|
||||
|
||||
if ([self.secondaryInfo length] == 0)
|
||||
self.secondaryInfoView.frame = CGRectZero;
|
||||
else
|
||||
self.secondaryInfoView.frame = CGRectMake(2 * SMALLMARGIN, SMALLMARGIN + _nameView.frame.size.height
|
||||
, width - MARGIN, [self getTextHeight:self.secondaryInfo font:[UIFont fontWithName:@"Helvetica" size:SECONDNAMEFONTSIZE]]);
|
||||
self.frame = CGRectMake(0, 0, width, [self countHeight]);
|
||||
}
|
||||
|
||||
- (void)drawWithArrow
|
||||
{
|
||||
double width = [self getCurrentSuperViewWidth];
|
||||
[self.compass setShowArrow:YES];
|
||||
self.circle.frame = CGRectMake(width/2 - CIRCLEDIAMETER/2 - SMALLMARGIN, 2 * SMALLMARGIN, CIRCLEDIAMETER, CIRCLEDIAMETER);
|
||||
self.compass.frame = CGRectMake(width/2 - COMPASSSIDE/2 - SMALLMARGIN, 2 * SMALLMARGIN + (CIRCLEDIAMETER - COMPASSSIDE)/2 , COMPASSSIDE, COMPASSSIDE);
|
||||
|
||||
self.distanceLabel.frame = CGRectMake(0, COMPASSSIDE + 5 * SMALLMARGIN, width, 20);
|
||||
[self.distanceLabel setTextAlignment:NSTextAlignmentCenter];
|
||||
|
||||
if (self.name.length == 0)
|
||||
{
|
||||
self.nameView.frame = CGRectZero;
|
||||
self.secondaryInfoView.frame = CGRectZero;
|
||||
self.frame = CGRectMake(0, 0, width - MARGIN, CIRCLEDIAMETER + 2 * SMALLMARGIN);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.nameView.frame = CGRectMake(2 * SMALLMARGIN, 4 * SMALLMARGIN + CIRCLEDIAMETER, width - MARGIN, [self getTextHeight:self.name font:[UIFont fontWithName:@"Helvetica" size:NAMEFONTSIZE]]);
|
||||
[self.secondaryInfoView setFont:[UIFont fontWithName:@"Helvetica" size:SECONDNAMEFONTSIZE]];
|
||||
}
|
||||
|
||||
if ([self.secondaryInfo length] == 0)
|
||||
self.secondaryInfoView.frame = CGRectZero;
|
||||
else
|
||||
self.secondaryInfoView.frame = CGRectMake(2 * SMALLMARGIN, self.nameView.frame.origin.y + self.nameView.frame.size.height
|
||||
, width - MARGIN, [self getTextHeight:self.secondaryInfo font:[UIFont fontWithName:@"Helvetica" size:SECONDNAMEFONTSIZE]]);
|
||||
|
||||
self.frame = CGRectMake(0, 0, width, [self countHeight]);
|
||||
}
|
||||
|
||||
#pragma mark - Location Observer Delegate
|
||||
|
||||
- (void)onLocationError:(location::TLocationError)errorCode
|
||||
{
|
||||
// Don't know what to do with this method?
|
||||
}
|
||||
|
||||
- (void)onLocationUpdate:(location::GpsInfo const &)info
|
||||
{
|
||||
double const d = ms::DistanceOnEarth(info.m_latitude, info.m_longitude,
|
||||
MercatorBounds::YToLat(m_yGlobal),
|
||||
MercatorBounds::XToLon(m_xGlobal));
|
||||
string distance = "";
|
||||
(void) MeasurementUtils::FormatDistance(d, distance);
|
||||
self.distanceLabel.text = [NSString stringWithUTF8String:distance.c_str()];
|
||||
}
|
||||
|
||||
- (void)onCompassUpdate:(location::CompassInfo const &)info
|
||||
{
|
||||
double lat, lon;
|
||||
if (![m_locationManager getLat:lat Lon:lon])
|
||||
return;
|
||||
double const northRad = (info.m_trueHeading < 0) ? info.m_magneticHeading : info.m_trueHeading;
|
||||
self.compass.angle = ang::AngleTo(m2::PointD(MercatorBounds::LonToX(lon),
|
||||
MercatorBounds::LatToY(lat)), m2::PointD(m_xGlobal, m_yGlobal)) + northRad;
|
||||
}
|
||||
|
||||
- (BOOL)canShowArrow
|
||||
{
|
||||
if ([self getAzimut] >= 0.0)
|
||||
return YES;
|
||||
else
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (double)getAzimut
|
||||
{
|
||||
double azimut = -1.0;
|
||||
double lat = 0.0, lon = 0.0;
|
||||
|
||||
if ([m_locationManager getLat:lat Lon:lon])
|
||||
{
|
||||
double north = -1.0;
|
||||
[m_locationManager getNorthRad:north];
|
||||
if (north >= 0.0)
|
||||
{
|
||||
azimut = ang::AngleTo(m2::PointD(MercatorBounds::LonToX(lon), MercatorBounds::LatToY(lat)),
|
||||
m2::PointD(m_xGlobal, m_yGlobal)) + north;
|
||||
azimut = ang::AngleIn2PI(azimut);
|
||||
}
|
||||
}
|
||||
return azimut;
|
||||
}
|
||||
|
||||
- (double)getTextHeight:(NSString *)text font:(UIFont *)font
|
||||
{
|
||||
return [text sizeWithFont:font constrainedToSize:CGSizeMake([self getCurrentSuperViewWidth] - 2 * MARGIN, CGFLOAT_MAX) lineBreakMode:NSLineBreakByCharWrapping].height + 2 * SMALLMARGIN;
|
||||
}
|
||||
|
||||
- (CGFloat) countHeight
|
||||
{
|
||||
if (self.secondaryInfo.length)
|
||||
return self.secondaryInfoView.frame.origin.y + self.secondaryInfoView.frame.size.height + SMALLMARGIN;
|
||||
else
|
||||
return self.nameView.frame.origin.y + self.nameView.frame.size.height + SMALLMARGIN;
|
||||
}
|
||||
|
||||
- (CGFloat)getCurrentSuperViewWidth
|
||||
{
|
||||
double width = self.superview.bounds.size.width;
|
||||
if (width == 0)
|
||||
width = _screenWidth;
|
||||
return width;
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ScopeView : UIView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame segmentedControl:(UISegmentedControl *)segmentedControl;
|
||||
|
||||
@property (readonly) UISegmentedControl * segmentedControl;
|
||||
|
||||
@end
|
|
@ -1,23 +0,0 @@
|
|||
|
||||
#import "ScopeView.h"
|
||||
#import "UIKitCategories.h"
|
||||
|
||||
@implementation ScopeView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame segmentedControl:(UISegmentedControl *)segmentedControl
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
|
||||
[self addSubview:segmentedControl];
|
||||
|
||||
_segmentedControl = segmentedControl;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
self.segmentedControl.center = CGPointMake(self.width / 2, self.height / 2);
|
||||
}
|
||||
|
||||
@end
|
|
@ -36,8 +36,6 @@
|
|||
9747278518338F0C006B7CB7 /* UIViewController+Navigation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9747278318338F0C006B7CB7 /* UIViewController+Navigation.m */; };
|
||||
9769D6EF1912BF3000CA6158 /* ContainerView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9769D6EE1912BF3000CA6158 /* ContainerView.mm */; };
|
||||
9769D6F01912BF3000CA6158 /* ContainerView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9769D6EE1912BF3000CA6158 /* ContainerView.mm */; };
|
||||
97719D421843AF1E00BDD815 /* ScopeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97719D411843AF1E00BDD815 /* ScopeView.m */; };
|
||||
97719D431843AF1E00BDD815 /* ScopeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97719D411843AF1E00BDD815 /* ScopeView.m */; };
|
||||
97719D451843B6DC00BDD815 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97719D441843B6DC00BDD815 /* MessageUI.framework */; };
|
||||
97719D461843B6E500BDD815 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97719D441843B6DC00BDD815 /* MessageUI.framework */; };
|
||||
97719D481843B6F200BDD815 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97719D471843B6F200BDD815 /* Security.framework */; };
|
||||
|
@ -144,8 +142,6 @@
|
|||
EDBB18B916972B3000AF0742 /* libzlib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EDBB18B716972B0600AF0742 /* libzlib.a */; };
|
||||
EDC5C543175F2CA600420E92 /* ShareActionSheet.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDC5C542175F2CA600420E92 /* ShareActionSheet.mm */; };
|
||||
EDC5C544175F2CA600420E92 /* ShareActionSheet.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDC5C542175F2CA600420E92 /* ShareActionSheet.mm */; };
|
||||
EDFC74D0177AE6C500FAF21F /* PlaceAndCompasView.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDFC74CF177AE6C500FAF21F /* PlaceAndCompasView.mm */; };
|
||||
EDFC74D1177AE6C500FAF21F /* PlaceAndCompasView.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDFC74CF177AE6C500FAF21F /* PlaceAndCompasView.mm */; };
|
||||
EE026F0611D6AC0D00645242 /* classificator.txt in Resources */ = {isa = PBXBuildFile; fileRef = EE026F0511D6AC0D00645242 /* classificator.txt */; };
|
||||
EE12020911CD464100ABDD5D /* libbase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EE1201FF11CD464100ABDD5D /* libbase.a */; };
|
||||
EE12020A11CD464100ABDD5D /* libcoding.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EE12020011CD464100ABDD5D /* libcoding.a */; };
|
||||
|
@ -230,8 +226,6 @@
|
|||
FA4135ED120A263C0062D5B4 /* SettingsManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA4135E7120A263C0062D5B4 /* SettingsManager.mm */; };
|
||||
FA459EB414327AF700B5BB3C /* WorldCoasts.mwm in Resources */ = {isa = PBXBuildFile; fileRef = FA459EB314327AF700B5BB3C /* WorldCoasts.mwm */; };
|
||||
FA46DA2C12D4166E00968C36 /* countries.txt in Resources */ = {isa = PBXBuildFile; fileRef = FA46DA2B12D4166E00968C36 /* countries.txt */; };
|
||||
FA5D4F191557F79900E7D8BB /* PlacePageVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA5D4F161557F79900E7D8BB /* PlacePageVC.mm */; };
|
||||
FA5D4F1A1557F79900E7D8BB /* PlacePageVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA5D4F161557F79900E7D8BB /* PlacePageVC.mm */; };
|
||||
FA64D9A913F975AD00350ECF /* types.txt in Resources */ = {isa = PBXBuildFile; fileRef = FA64D9A813F975AD00350ECF /* types.txt */; };
|
||||
FA7F4B0017F1FFE800FAB1B5 /* World.mwm in Resources */ = {isa = PBXBuildFile; fileRef = FAFF42291347F101009BBB14 /* World.mwm */; };
|
||||
FA85F633145DDDC20090E1A0 /* packed_polygons.bin in Resources */ = {isa = PBXBuildFile; fileRef = FA85F632145DDDC20090E1A0 /* packed_polygons.bin */; };
|
||||
|
@ -247,7 +241,6 @@
|
|||
FAAEA7D6161D8D3100CCD661 /* BookmarksRootVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAAEA7D3161D8D3100CCD661 /* BookmarksRootVC.mm */; };
|
||||
FAAFD697139D9BE2000AE70C /* categories.txt in Resources */ = {isa = PBXBuildFile; fileRef = FAAFD696139D9BE2000AE70C /* categories.txt */; };
|
||||
FAAFD699139D9C6B000AE70C /* libsearch.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FAAFD698139D9C6B000AE70C /* libsearch.a */; };
|
||||
FABF223E13FAA97A003D4D49 /* CompassView.mm in Sources */ = {isa = PBXBuildFile; fileRef = FABF223D13FAA97A003D4D49 /* CompassView.mm */; };
|
||||
FAEA8B2A1437CA80002A6737 /* libjansson.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FAEA8B291437CA80002A6737 /* libjansson.a */; };
|
||||
FAF29847146EEF4A00FF0057 /* libprotobuf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FAF29846146EEF4A00FF0057 /* libprotobuf.a */; };
|
||||
FAF30A95173AB23900818BF6 /* 00_roboto_regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FAF30A94173AB23900818BF6 /* 00_roboto_regular.ttf */; };
|
||||
|
@ -1299,7 +1292,6 @@
|
|||
FAFB08F0151215EE0041901D /* RenderContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = EE7F297E1219ECA300EB67A9 /* RenderContext.mm */; };
|
||||
FAFB08F1151215EE0041901D /* WebViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAFCB63513366E78001A5C59 /* WebViewController.mm */; };
|
||||
FAFB08F2151215EE0041901D /* CustomAlertView.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA34BEC81338D72F00FFB2A7 /* CustomAlertView.mm */; };
|
||||
FAFB08F4151215EE0041901D /* CompassView.mm in Sources */ = {isa = PBXBuildFile; fileRef = FABF223D13FAA97A003D4D49 /* CompassView.mm */; };
|
||||
FAFB08F5151215EE0041901D /* Preferences.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA29FDA9141E77F8004ADF66 /* Preferences.mm */; };
|
||||
FAFB08F6151215EE0041901D /* LocationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAA5C2A1144F135F005337F6 /* LocationManager.mm */; };
|
||||
FAFB08FB151215EE0041901D /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EE12020311CD464100ABDD5D /* libfreetype.a */; };
|
||||
|
@ -1366,8 +1358,6 @@
|
|||
9747278318338F0C006B7CB7 /* UIViewController+Navigation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+Navigation.m"; path = "Classes/UIViewController+Navigation.m"; sourceTree = "<group>"; };
|
||||
9769D6ED1912BF3000CA6158 /* ContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContainerView.h; sourceTree = "<group>"; };
|
||||
9769D6EE1912BF3000CA6158 /* ContainerView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ContainerView.mm; sourceTree = "<group>"; };
|
||||
97719D401843AF1E00BDD815 /* ScopeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScopeView.h; sourceTree = "<group>"; };
|
||||
97719D411843AF1E00BDD815 /* ScopeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScopeView.m; sourceTree = "<group>"; };
|
||||
97719D441843B6DC00BDD815 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
|
||||
97719D471843B6F200BDD815 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
97719D4A1843B86700BDD815 /* Main_iPad.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main_iPad.storyboard; sourceTree = "<group>"; };
|
||||
|
@ -1463,8 +1453,6 @@
|
|||
EDBB18B716972B0600AF0742 /* libzlib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libzlib.a; sourceTree = "<group>"; };
|
||||
EDC5C541175F2CA600420E92 /* ShareActionSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareActionSheet.h; sourceTree = "<group>"; };
|
||||
EDC5C542175F2CA600420E92 /* ShareActionSheet.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = ShareActionSheet.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
EDFC74CE177AE6C500FAF21F /* PlaceAndCompasView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaceAndCompasView.h; sourceTree = "<group>"; };
|
||||
EDFC74CF177AE6C500FAF21F /* PlaceAndCompasView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlaceAndCompasView.mm; sourceTree = "<group>"; };
|
||||
EE026F0511D6AC0D00645242 /* classificator.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = classificator.txt; path = ../../data/classificator.txt; sourceTree = SOURCE_ROOT; };
|
||||
EE1201FF11CD464100ABDD5D /* libbase.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libbase.a; sourceTree = SOURCE_ROOT; };
|
||||
EE12020011CD464100ABDD5D /* libcoding.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcoding.a; sourceTree = SOURCE_ROOT; };
|
||||
|
@ -1555,8 +1543,6 @@
|
|||
FA5940D3171C964D0045C9BB /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
FA5940D4171C964D0045C9BB /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
FA5940D5171C964D0045C9BB /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
FA5D4F151557F79900E7D8BB /* PlacePageVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = PlacePageVC.h; path = Bookmarks/PlacePageVC.h; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
FA5D4F161557F79900E7D8BB /* PlacePageVC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; name = PlacePageVC.mm; path = Bookmarks/PlacePageVC.mm; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
FA64D9A813F975AD00350ECF /* types.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = types.txt; path = ../../data/types.txt; sourceTree = SOURCE_ROOT; };
|
||||
FA85F632145DDDC20090E1A0 /* packed_polygons.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = packed_polygons.bin; path = ../../data/packed_polygons.bin; sourceTree = SOURCE_ROOT; };
|
||||
FA87151A12B1518F00592DAF /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
|
@ -1575,8 +1561,6 @@
|
|||
FAAFD698139D9C6B000AE70C /* libsearch.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libsearch.a; sourceTree = SOURCE_ROOT; };
|
||||
FAB09895148E2F1500892860 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
FAB0FC6019251E85003B396F /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
FABF223C13FAA97A003D4D49 /* CompassView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompassView.h; sourceTree = "<group>"; };
|
||||
FABF223D13FAA97A003D4D49 /* CompassView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CompassView.mm; sourceTree = "<group>"; };
|
||||
FAEA8B291437CA80002A6737 /* libjansson.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libjansson.a; sourceTree = SOURCE_ROOT; };
|
||||
FAF29846146EEF4A00FF0057 /* libprotobuf.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libprotobuf.a; sourceTree = SOURCE_ROOT; };
|
||||
FAF30A94173AB23900818BF6 /* 00_roboto_regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = 00_roboto_regular.ttf; path = ../../data/00_roboto_regular.ttf; sourceTree = "<group>"; };
|
||||
|
@ -2404,16 +2388,10 @@
|
|||
ED48BBB417C267F5003E7E92 /* ColorPickerView.mm */,
|
||||
ED48BBB817C2B1E2003E7E92 /* CircleView.h */,
|
||||
ED48BBB917C2B1E2003E7E92 /* CircleView.mm */,
|
||||
FABF223C13FAA97A003D4D49 /* CompassView.h */,
|
||||
FABF223D13FAA97A003D4D49 /* CompassView.mm */,
|
||||
F7B90CD11521E6D100C054EE /* CustomNavigationView.h */,
|
||||
F7B90CD21521E6D100C054EE /* CustomNavigationView.mm */,
|
||||
EDB811A1175E1A9C00E36BF2 /* TwoButtonsView.h */,
|
||||
EDB811A2175E1A9C00E36BF2 /* TwoButtonsView.m */,
|
||||
EDFC74CE177AE6C500FAF21F /* PlaceAndCompasView.h */,
|
||||
EDFC74CF177AE6C500FAF21F /* PlaceAndCompasView.mm */,
|
||||
97719D401843AF1E00BDD815 /* ScopeView.h */,
|
||||
97719D411843AF1E00BDD815 /* ScopeView.m */,
|
||||
97F61780183E6172009919E2 /* LocationButton.h */,
|
||||
97F6177F183E6172009919E2 /* LocationButton.mm */,
|
||||
);
|
||||
|
@ -2562,8 +2540,6 @@
|
|||
FAA614B7155F16950031C345 /* AddSetVC.mm */,
|
||||
FA054610155C465E001F4E37 /* SelectSetVC.h */,
|
||||
FA054611155C465E001F4E37 /* SelectSetVC.mm */,
|
||||
FA5D4F151557F79900E7D8BB /* PlacePageVC.h */,
|
||||
FA5D4F161557F79900E7D8BB /* PlacePageVC.mm */,
|
||||
FA36B80515403A4F004560CC /* BookmarksVC.h */,
|
||||
FA36B80615403A4F004560CC /* BookmarksVC.mm */,
|
||||
FAAEA7D4161D8D3100CCD661 /* BookmarksRootVC.h */,
|
||||
|
@ -2587,13 +2563,13 @@
|
|||
FA4135DF120A25B90062D5B4 /* Settings */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
978F924D183BB5D6000D6C7C /* Cells */,
|
||||
FA4135E1120A263C0062D5B4 /* CountriesViewController.h */,
|
||||
FA4135E2120A263C0062D5B4 /* CountriesViewController.mm */,
|
||||
FA4135E6120A263C0062D5B4 /* SettingsManager.h */,
|
||||
FA4135E7120A263C0062D5B4 /* SettingsManager.mm */,
|
||||
978F923F183B660F000D6C7C /* SettingsViewController.h */,
|
||||
978F9239183B660F000D6C7C /* SettingsViewController.mm */,
|
||||
978F924D183BB5D6000D6C7C /* Cells */,
|
||||
FA29FDA8141E77F8004ADF66 /* Preferences.h */,
|
||||
FA29FDA9141E77F8004ADF66 /* Preferences.mm */,
|
||||
);
|
||||
|
@ -4439,13 +4415,11 @@
|
|||
97F61781183E6172009919E2 /* LocationButton.mm in Sources */,
|
||||
9747264318323080006B7CB7 /* UIKitCategories.m in Sources */,
|
||||
97A0EEFC192F3B43009B2779 /* BottomMenuCell.m in Sources */,
|
||||
97719D421843AF1E00BDD815 /* ScopeView.m in Sources */,
|
||||
97D092B9190AA69700FF645B /* SmallCompassView.mm in Sources */,
|
||||
97A8001418B2140A000C07A2 /* SearchUniversalCell.m in Sources */,
|
||||
97A8002718B2741C000C07A2 /* SearchCell.m in Sources */,
|
||||
9778E9A5191A86D800AD850A /* SelectedColorView.m in Sources */,
|
||||
97D807B818A92AAB00D416E0 /* MoreAppsVC.mm in Sources */,
|
||||
FABF223E13FAA97A003D4D49 /* CompassView.mm in Sources */,
|
||||
9789DB5A188D94F9007C6FAE /* InterstitialView.mm in Sources */,
|
||||
FA29FDAA141E77F8004ADF66 /* Preferences.mm in Sources */,
|
||||
97A8000C18B21363000C07A2 /* SearchView.mm in Sources */,
|
||||
|
@ -4457,7 +4431,6 @@
|
|||
F7B90CD31521E6D200C054EE /* CustomNavigationView.mm in Sources */,
|
||||
FA36B80D15403A4F004560CC /* BookmarksVC.mm in Sources */,
|
||||
9769D6EF1912BF3000CA6158 /* ContainerView.mm in Sources */,
|
||||
FA5D4F191557F79900E7D8BB /* PlacePageVC.mm in Sources */,
|
||||
FAF457E715597D4600DCCC49 /* Framework.cpp in Sources */,
|
||||
FA054612155C465E001F4E37 /* SelectSetVC.mm in Sources */,
|
||||
FAA614B8155F16950031C345 /* AddSetVC.mm in Sources */,
|
||||
|
@ -4476,7 +4449,6 @@
|
|||
97D092B1190A681F00FF645B /* PlacePageInfoCell.mm in Sources */,
|
||||
97A8001018B21395000C07A2 /* SearchBar.mm in Sources */,
|
||||
EDC5C543175F2CA600420E92 /* ShareActionSheet.mm in Sources */,
|
||||
EDFC74D0177AE6C500FAF21F /* PlaceAndCompasView.mm in Sources */,
|
||||
9778E9A1191A663700AD850A /* BookmarkNameVC.mm in Sources */,
|
||||
ED48BBB517C267F5003E7E92 /* ColorPickerView.mm in Sources */,
|
||||
97D40C0E184E389000A1D572 /* MailComposeViewController.m in Sources */,
|
||||
|
@ -4509,8 +4481,6 @@
|
|||
FAFB08F2151215EE0041901D /* CustomAlertView.mm in Sources */,
|
||||
97F61782183E6172009919E2 /* LocationButton.mm in Sources */,
|
||||
9747264418323080006B7CB7 /* UIKitCategories.m in Sources */,
|
||||
97719D431843AF1E00BDD815 /* ScopeView.m in Sources */,
|
||||
FAFB08F4151215EE0041901D /* CompassView.mm in Sources */,
|
||||
FAFB08F5151215EE0041901D /* Preferences.mm in Sources */,
|
||||
97D807BD18A933FB00D416E0 /* MoreAppsCell.m in Sources */,
|
||||
FAFB08F6151215EE0041901D /* LocationManager.mm in Sources */,
|
||||
|
@ -4523,7 +4493,6 @@
|
|||
9778E9A2191A663700AD850A /* BookmarkNameVC.mm in Sources */,
|
||||
FA36B80E15403A4F004560CC /* BookmarksVC.mm in Sources */,
|
||||
97D807B918A92AAB00D416E0 /* MoreAppsVC.mm in Sources */,
|
||||
FA5D4F1A1557F79900E7D8BB /* PlacePageVC.mm in Sources */,
|
||||
FAF457E815597D4600DCCC49 /* Framework.cpp in Sources */,
|
||||
97A8002818B2741C000C07A2 /* SearchCell.m in Sources */,
|
||||
974386DE19373EA400FD5659 /* ToastView.m in Sources */,
|
||||
|
@ -4543,7 +4512,6 @@
|
|||
97F61795183E7445009919E2 /* LinkCell.m in Sources */,
|
||||
EDC5C544175F2CA600420E92 /* ShareActionSheet.mm in Sources */,
|
||||
9778E9A6191A86D800AD850A /* SelectedColorView.m in Sources */,
|
||||
EDFC74D1177AE6C500FAF21F /* PlaceAndCompasView.mm in Sources */,
|
||||
97A8000D18B21363000C07A2 /* SearchView.mm in Sources */,
|
||||
ED48BBBB17C2B1E2003E7E92 /* CircleView.mm in Sources */,
|
||||
97D092B2190A681F00FF645B /* PlacePageInfoCell.mm in Sources */,
|
||||
|
|
Loading…
Add table
Reference in a new issue