diff --git a/iphone/Common/CustomAlertView.h b/iphone/Common/CustomAlertView.h index 4b41b47450..ab5920b95e 100644 --- a/iphone/Common/CustomAlertView.h +++ b/iphone/Common/CustomAlertView.h @@ -3,11 +3,7 @@ /// Alert View which can automatically close when going to background /// and call CancelButtonIndex delegate @interface CustomAlertView : UIAlertView -{ -} -- (id) initWithTitle:(NSString *)title message:(NSString *)message - delegate:(id)delegate cancelButtonTitle:(NSString *)cancelButtonTitle - otherButtonTitles:(NSString *)otherButtonTitles, ...; +- (id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ...; @end diff --git a/iphone/Common/CustomAlertView.mm b/iphone/Common/CustomAlertView.mm index c18bd5310b..d09f60aa95 100644 --- a/iphone/Common/CustomAlertView.mm +++ b/iphone/Common/CustomAlertView.mm @@ -2,30 +2,26 @@ @implementation CustomAlertView -- (id) initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate - cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ... +- (id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ... { - if ((self = [super initWithTitle:title message:message delegate:delegate - cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil, nil])) + if ((self = [super initWithTitle:title message:message delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil, nil])) { va_list args; va_start(args, otherButtonTitles); for (NSString * anOtherButtonTitle = otherButtonTitles; anOtherButtonTitle != nil; anOtherButtonTitle = va_arg(args, NSString*)) [self addButtonWithTitle:anOtherButtonTitle]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) - name:UIApplicationDidEnterBackgroundNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil]; } return self; } -- (void) dealloc +- (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - [super dealloc]; } -- (void) applicationDidEnterBackground:(id) sender +- (void)applicationDidEnterBackground:(id) sender { // We should not be here when entering back to foreground state [self dismissWithClickedButtonIndex:[self cancelButtonIndex] animated:NO]; diff --git a/iphone/Common/WebViewController.h b/iphone/Common/WebViewController.h index 5f88055f3e..acdce9d30d 100644 --- a/iphone/Common/WebViewController.h +++ b/iphone/Common/WebViewController.h @@ -1,17 +1,11 @@ #import @interface WebViewController : UIViewController -{ - NSURL * m_url; - NSString * m_htmlText; -} -@property (nonatomic, retain) NSURL * m_url; -@property (nonatomic, retain) NSString * m_htmlText; +@property (nonatomic) NSURL * m_url; +@property (nonatomic) NSString * m_htmlText; -- (id) initWithUrl: (NSURL *)url andTitleOrNil:(NSString *)title; -- (id) initWithHtml: (NSString *)htmlText - baseUrl:(NSURL *)url - andTitleOrNil:(NSString *)title; +- (id)initWithUrl:(NSURL *)url andTitleOrNil:(NSString *)title; +- (id)initWithHtml:(NSString *)htmlText baseUrl:(NSURL *)url andTitleOrNil:(NSString *)title; @end diff --git a/iphone/Common/WebViewController.mm b/iphone/Common/WebViewController.mm index da0945187d..7479f86216 100644 --- a/iphone/Common/WebViewController.mm +++ b/iphone/Common/WebViewController.mm @@ -2,10 +2,7 @@ @implementation WebViewController -@synthesize m_url; -@synthesize m_htmlText; - -- (id) initWithUrl: (NSURL *)url andTitleOrNil:(NSString *)title +- (id)initWithUrl:(NSURL *)url andTitleOrNil:(NSString *)title { self = [super initWithNibName:nil bundle:nil]; if (self) @@ -17,9 +14,7 @@ return self; } -- (id) initWithHtml: (NSString *)htmlText - baseUrl:(NSURL *)url - andTitleOrNil:(NSString *)title +- (id)initWithHtml:(NSString *)htmlText baseUrl:(NSURL *)url andTitleOrNil:(NSString *)title { self = [super initWithNibName:nil bundle:nil]; if (self) @@ -36,19 +31,18 @@ - (void)loadView { - CGRect frame = [[UIScreen mainScreen] applicationFrame]; + CGRect frame = [UIScreen mainScreen].applicationFrame; UIWebView * webView = [[UIWebView alloc] initWithFrame:frame]; // webView.scalesPageToFit = YES; webView.autoresizesSubviews = YES; - webView.autoresizingMask= (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth); + webView.autoresizingMask = (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth); - if (m_htmlText) - [webView loadHTMLString:m_htmlText baseURL:m_url]; + if (self.m_htmlText) + [webView loadHTMLString:self.m_htmlText baseURL:self.m_url]; else - [webView loadRequest:[NSURLRequest requestWithURL:m_url]]; + [webView loadRequest:[NSURLRequest requestWithURL:self.m_url]]; self.view = webView; - [webView release]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation diff --git a/iphone/Maps/Bookmarks/AddSetVC.h b/iphone/Maps/Bookmarks/AddSetVC.h index 77a65fbfef..fdbc1d72c6 100644 --- a/iphone/Maps/Bookmarks/AddSetVC.h +++ b/iphone/Maps/Bookmarks/AddSetVC.h @@ -5,6 +5,6 @@ size_t * m_index; } -- (id) initWithIndex:(size_t *)index; +- (id)initWithIndex:(size_t *)index; @end diff --git a/iphone/Maps/Bookmarks/AddSetVC.mm b/iphone/Maps/Bookmarks/AddSetVC.mm index 9b4d793cd3..9b59546b58 100644 --- a/iphone/Maps/Bookmarks/AddSetVC.mm +++ b/iphone/Maps/Bookmarks/AddSetVC.mm @@ -5,13 +5,13 @@ @implementation AddSetVC -- (id) initWithIndex:(size_t *)index; +- (id)initWithIndex:(size_t *)index; { self = [super initWithStyle:UITableViewStyleGrouped]; if (self) { - self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(onSaveClicked)] autorelease]; - self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(onCancelClicked)] autorelease]; + self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(onSaveClicked)]; + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(onCancelClicked)]; self.title = NSLocalizedString(@"add_new_set", @"Add New Bookmark Set dialog title"); m_index = index; } @@ -69,8 +69,8 @@ UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"EditSetNameCell"]; if (!cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"EditSetNameCell"] autorelease]; - cell.textLabel.text = @"Temporary Name"; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"EditSetNameCell"]; + cell.textLabel.text = @"Temporary Name"; [cell layoutSubviews]; CGRect rect = cell.textLabel.frame; rect.size.width = cell.contentView.bounds.size.width - cell.textLabel.frame.origin.x; @@ -88,7 +88,6 @@ f.font = [cell.textLabel.font fontWithSize:[cell.textLabel.font pointSize]]; f.tag = TEXT_FIELD_TAG; [cell.contentView addSubview:f]; - [f release]; cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.textLabel.text = @""; } @@ -97,7 +96,7 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField { - if (textField.text.length == 0) + if ([textField.text length] == 0) return YES; [textField resignFirstResponder]; diff --git a/iphone/Maps/Bookmarks/BookmarkCell.mm b/iphone/Maps/Bookmarks/BookmarkCell.mm index 8aaa1445b6..d6458ba6b0 100644 --- a/iphone/Maps/Bookmarks/BookmarkCell.mm +++ b/iphone/Maps/Bookmarks/BookmarkCell.mm @@ -3,17 +3,14 @@ @implementation BookmarkCell -@synthesize bmName; -@synthesize bmDistance; - - (id)initWithReuseIdentifier:(NSString *)identifier { self = [super initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier]; if (self) { - bmName = [[[UILabel alloc] init] autorelease]; - bmDistance = [[[UILabel alloc] init] autorelease]; - bmDistance.textAlignment = UITextAlignmentRight; + _bmName = [[UILabel alloc] init]; + _bmDistance = [[UILabel alloc] init]; + _bmDistance.textAlignment = UITextAlignmentRight; // There is a hack below to get standart fonts and colors. self.textLabel.text = @"tmpText"; @@ -21,19 +18,19 @@ [super layoutSubviews]; - bmName.font = self.textLabel.font; - bmName.textColor = self.textLabel.textColor; - bmName.backgroundColor = [UIColor clearColor]; + _bmName.font = self.textLabel.font; + _bmName.textColor = self.textLabel.textColor; + _bmName.backgroundColor = [UIColor clearColor]; - bmDistance.font = self.detailTextLabel.font; - bmDistance.textColor = self.detailTextLabel.textColor; - bmDistance.backgroundColor = [UIColor clearColor]; + _bmDistance.font = self.detailTextLabel.font; + _bmDistance.textColor = self.detailTextLabel.textColor; + _bmDistance.backgroundColor = [UIColor clearColor]; self.detailTextLabel.text = nil; self.textLabel.text = nil; - [self.contentView addSubview:bmName]; - [self.contentView addSubview:bmDistance]; + [self.contentView addSubview:_bmName]; + [self.contentView addSubview:_bmDistance]; } return self; } @@ -64,9 +61,9 @@ CGFloat const h = r.size.height; CGFloat xDelim = (int)(r.origin.x + w / 2); - if (bmDistance.text.length) + if (_bmDistance.text.length) { - CGSize const distanceTextSize = [bmDistance.text sizeWithFont:bmDistance.font]; + CGSize const distanceTextSize = [_bmDistance.text sizeWithFont:_bmDistance.font]; if (xDelim + distanceTextSize.width < r.origin.x + w) xDelim = r.origin.x + w - distanceTextSize.width - KPaddingX; } @@ -75,8 +72,8 @@ xDelim = r.origin.x + w - KPaddingX; } - bmName.frame = CGRectMake(r.origin.x, r.origin.y, xDelim - r.origin.x, h); - bmDistance.frame = CGRectMake(xDelim, r.origin.y, r.origin.x + w - xDelim, h); + _bmName.frame = CGRectMake(r.origin.x, r.origin.y, xDelim - r.origin.x, h); + _bmDistance.frame = CGRectMake(xDelim, r.origin.y, r.origin.x + w - xDelim, h); } @end diff --git a/iphone/Maps/Bookmarks/BookmarksRootVC.h b/iphone/Maps/Bookmarks/BookmarksRootVC.h index 1bf35f328f..df7bae8a19 100644 --- a/iphone/Maps/Bookmarks/BookmarksRootVC.h +++ b/iphone/Maps/Bookmarks/BookmarksRootVC.h @@ -7,6 +7,6 @@ UIView * m_hint; } -- (id) init; +- (id)init; @end diff --git a/iphone/Maps/Bookmarks/BookmarksRootVC.mm b/iphone/Maps/Bookmarks/BookmarksRootVC.mm index a0118d2fb9..01e734e882 100644 --- a/iphone/Maps/Bookmarks/BookmarksRootVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksRootVC.mm @@ -13,7 +13,7 @@ @implementation BookmarksRootVC -- (id) init +- (id)init { self = [super initWithStyle:UITableViewStyleGrouped]; if (self) @@ -47,7 +47,7 @@ m_hint.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; m_hint.backgroundColor = [UIColor clearColor]; - UILabel * label = [[[UILabel alloc] initWithFrame:rect] autorelease]; + UILabel * label = [[UILabel alloc] initWithFrame:rect]; label.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; label.backgroundColor = [UIColor clearColor]; bool const showDetailedHint = !GetFramework().GetBmCategoriesCount(); @@ -83,7 +83,7 @@ return GetFramework().GetBmCategoriesCount(); } --(void)onEyeTapped:(id)sender +- (void)onEyeTapped:(id)sender { NSInteger row = ((UITapGestureRecognizer *)sender).view.tag; UITableViewCell * cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:0]]; @@ -103,11 +103,11 @@ UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"BookmarksRootVCSetCell"]; if (!cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"BookmarksRootVCSetCell"] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"BookmarksRootVCSetCell"]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; // Add "Eye" icon click handler to switch visibility cell.imageView.userInteractionEnabled = YES; - UITapGestureRecognizer * tapped = [[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onEyeTapped:)] autorelease]; + UITapGestureRecognizer * tapped = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onEyeTapped:)]; tapped.numberOfTapsRequired = 1; [cell.imageView addGestureRecognizer:tapped]; } @@ -164,7 +164,7 @@ [self applyCategoryRenaming]; CGRect r = cell.textLabel.frame; r.size.width = cell.contentView.bounds.size.width - r.origin.x; - UITextField * f = [[[UITextField alloc] initWithFrame:r] autorelease]; + UITextField * f = [[UITextField alloc] initWithFrame:r]; f.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; f.returnKeyType = UIReturnKeyDone; f.enablesReturnKeyAutomatically = YES; @@ -188,7 +188,6 @@ { BookmarksVC * bvc = [[BookmarksVC alloc] initWithCategory:indexPath.row]; [self.navigationController pushViewController:bvc animated:YES]; - [bvc release]; } } @@ -280,8 +279,6 @@ -(void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - [m_hint release]; - [super dealloc]; } @end diff --git a/iphone/Maps/Bookmarks/BookmarksVC.h b/iphone/Maps/Bookmarks/BookmarksVC.h index a986211ff6..8577825e9f 100644 --- a/iphone/Maps/Bookmarks/BookmarksVC.h +++ b/iphone/Maps/Bookmarks/BookmarksVC.h @@ -8,6 +8,6 @@ size_t m_categoryIndex; } -- (id) initWithCategory:(size_t)index; +- (id)initWithCategory:(size_t)index; @end diff --git a/iphone/Maps/Bookmarks/BookmarksVC.mm b/iphone/Maps/Bookmarks/BookmarksVC.mm index cde1874038..947b88e7ca 100644 --- a/iphone/Maps/Bookmarks/BookmarksVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksVC.mm @@ -104,7 +104,7 @@ cell = [tableView dequeueReusableCellWithIdentifier:@"BookmarksVCSetNameCell"]; if (!cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"BookmarksVCSetNameCell"] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"BookmarksVCSetNameCell"]; cell.textLabel.text = NSLocalizedString(@"name", nil); cell.selectionStyle = UITableViewCellSelectionStyleNone; // Temporary, to init font and color @@ -115,7 +115,7 @@ 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] autorelease]; + UITextField * f = [[UITextField alloc] initWithFrame:r]; f.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; f.enablesReturnKeyAutomatically = YES; f.returnKeyType = UIReturnKeyDone; @@ -138,9 +138,9 @@ cell = [tableView dequeueReusableCellWithIdentifier:@"BookmarksVCSetVisibilityCell"]; if (!cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"BookmarksVCSetVisibilityCell"] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"BookmarksVCSetVisibilityCell"]; cell.textLabel.text = NSLocalizedString(@"visible", nil); - cell.accessoryView = [[[UISwitch alloc] init] autorelease]; + cell.accessoryView = [[UISwitch alloc] init]; cell.selectionStyle = UITableViewCellSelectionStyleNone; } UISwitch * sw = (UISwitch *)cell.accessoryView; @@ -153,7 +153,7 @@ { cell = [tableView dequeueReusableCellWithIdentifier:@"TrackCell"]; if (!cell) - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"TrackCell"] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"TrackCell"]; Track const * tr = cat->GetTrack(indexPath.row); cell.textLabel.text = [NSString stringWithUTF8String:tr->GetName().c_str()]; string dist; @@ -170,7 +170,7 @@ { BookmarkCell * bmCell = (BookmarkCell *)[tableView dequeueReusableCellWithIdentifier:@"BookmarksVCBookmarkItemCell"]; if (!bmCell) - bmCell = [[[BookmarkCell alloc] initWithReuseIdentifier:@"BookmarksVCBookmarkItemCell"] autorelease]; + bmCell = [[BookmarkCell alloc] initWithReuseIdentifier:@"BookmarksVCBookmarkItemCell"]; Bookmark const * bm = cat->GetBookmark(indexPath.row); if (bm) { @@ -205,7 +205,7 @@ cell = [tableView dequeueReusableCellWithIdentifier:@"BookmarksExportCell"]; if (!cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BookmarksExportCell"] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BookmarksExportCell"]; cell.textLabel.textAlignment = UITextAlignmentCenter; cell.textLabel.text = NSLocalizedString(@"share_by_email", nil); } @@ -414,18 +414,18 @@ return NO; } -- (void) sendBookmarksWithExtension:(NSString *) fileExtension andType:(NSString *)mimeType andFile:(NSString *)filePath andCategory:(NSString *)catName +- (void)sendBookmarksWithExtension:(NSString *)fileExtension andType:(NSString *)mimeType andFile:(NSString *)filePath andCategory:(NSString *)catName { - MailComposeViewController * mailVC = [[[MailComposeViewController alloc] init] autorelease]; + MailComposeViewController * mailVC = [[MailComposeViewController alloc] init]; mailVC.mailComposeDelegate = self; [mailVC setSubject:NSLocalizedString(@"share_bookmarks_email_subject", nil)]; - NSData * myData = [[[NSData alloc] initWithContentsOfFile:filePath] autorelease]; + NSData * myData = [[NSData alloc] initWithContentsOfFile:filePath]; [mailVC addAttachmentData:myData mimeType:mimeType fileName:[NSString stringWithFormat:@"%@%@", catName, fileExtension]]; [mailVC setMessageBody:[NSString stringWithFormat:NSLocalizedString(@"share_bookmarks_email_body", nil), catName] isHTML:NO]; [self presentModalViewController:mailVC animated:YES]; } --(void)calculateSections +- (void)calculateSections { size_t index = 1; BookmarkCategory * cat = GetFramework().GetBmCategory(m_categoryIndex); diff --git a/iphone/Maps/Bookmarks/PlacePageVC.h b/iphone/Maps/Bookmarks/PlacePageVC.h index 0c8af551d5..e7d80ec700 100644 --- a/iphone/Maps/Bookmarks/PlacePageVC.h +++ b/iphone/Maps/Bookmarks/PlacePageVC.h @@ -10,8 +10,9 @@ namespace url_scheme { struct ApiPoint; } @interface PlacePageVC : UITableViewController -- (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; +- (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; + @end diff --git a/iphone/Maps/Bookmarks/PlacePageVC.mm b/iphone/Maps/Bookmarks/PlacePageVC.mm index d5d2e6cd83..dcc89326de 100644 --- a/iphone/Maps/Bookmarks/PlacePageVC.mm +++ b/iphone/Maps/Bookmarks/PlacePageVC.mm @@ -41,22 +41,22 @@ typedef enum {Editing, Saved} Mode; // Currently displays bookmark description (notes) @property(nonatomic, copy) NSString * pinNotes; // Stores displayed bookmark icon file name -@property(nonatomic, retain) NSString * pinColor; +@property(nonatomic) NSString * pinColor; // If we clicked already existing bookmark, it will be here -@property(nonatomic, assign) BookmarkAndCategory pinEditedBookmark; +@property(nonatomic) BookmarkAndCategory pinEditedBookmark; -@property(nonatomic, assign) CGPoint pinGlobalPosition; +@property(nonatomic) CGPoint pinGlobalPosition; -@property (nonatomic, retain) PlaceAndCompasView * placeAndCompass; +@property (nonatomic) PlaceAndCompasView * placeAndCompass; -@property (nonatomic, retain) UIView * pickerView; -@property (retain) ShareActionSheet * shareActionSheet; +@property (nonatomic) UIView * pickerView; +@property (nonatomic) ShareActionSheet * shareActionSheet; @end @implementation PlacePageVC -- (id) initWithInfo:(search::AddressInfo const &)info point:(CGPoint)point +- (id)initWithInfo:(search::AddressInfo const &)info point:(CGPoint)point { self = [super initWithStyle:UITableViewStyleGrouped]; if (self) @@ -71,7 +71,7 @@ typedef enum {Editing, Saved} Mode; return self; } -- (id) initWithApiPoint:(url_scheme::ApiPoint const &)apiPoint +- (id)initWithApiPoint:(url_scheme::ApiPoint const &)apiPoint { self = [super initWithStyle:UITableViewStyleGrouped]; if (self) @@ -86,7 +86,7 @@ typedef enum {Editing, Saved} Mode; return self; } -- (id) initWithBookmark:(BookmarkAndCategory)bmAndCat +- (id)initWithBookmark:(BookmarkAndCategory)bmAndCat { self = [super initWithStyle:UITableViewStyleGrouped]; if (self) @@ -112,7 +112,7 @@ typedef enum {Editing, Saved} Mode; return self; } -- (id) initWithName:(NSString *)name andGlobalPoint:(CGPoint)point +- (id)initWithName:(NSString *)name andGlobalPoint:(CGPoint)point { self = [super initWithStyle:UITableViewStyleGrouped]; if (self) @@ -123,20 +123,14 @@ typedef enum {Editing, Saved} Mode; color:@"" category:MakeEmptyBookmarkAndCategory() point:point]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged) name:UIDeviceOrientationDidChangeNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged) name:UIDeviceOrientationDidChangeNotification object:nil]; } return self; } -- (void) dealloc +- (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - self.pickerView = nil; - self.pinTitle = nil; - self.pinNotes = nil; - self.pinColor = nil; - self.placeAndCompass = nil; - [super dealloc]; } - (void)viewWillAppear:(BOOL)animated @@ -156,7 +150,7 @@ typedef enum {Editing, Saved} Mode; [super viewWillAppear:animated]; } --(void)viewDidLoad +- (void)viewDidLoad { [super viewDidLoad]; self.title = NSLocalizedString(@"info", nil); @@ -220,7 +214,7 @@ typedef enum {Editing, Saved} Mode; { // @TODO Refactor - we can do better CGRect z = CGRectMake(0, 0, self.tableView.frame.size.width, [self getDescriptionHeight] + MARGIN); - UIView * view = [[[UIView alloc] initWithFrame:z] autorelease]; + UIView * view = [[UIView alloc] initWithFrame:z]; z.origin.x = SMALLMARGIN; z.size.width -= SMALLMARGIN; UITextView * textView = [[UITextView alloc] initWithFrame:z]; @@ -233,7 +227,6 @@ typedef enum {Editing, Saved} Mode; textView.font = [UIFont fontWithName:@"Helvetica" size:18]; textView.editable = NO; [view addSubview:textView]; - [textView release]; return view; } return nil; @@ -251,7 +244,12 @@ typedef enum {Editing, Saved} Mode; - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { if (m_mode == Saved && section == 1) - 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] autorelease]; + 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; } @@ -279,7 +277,7 @@ typedef enum {Editing, Saved} Mode; { if (indexPath.section == 1) { - SelectSetVC * vc = [[[SelectSetVC alloc] initWithIndex:&m_categoryIndex] autorelease]; + SelectSetVC * vc = [[SelectSetVC alloc] initWithIndex:&m_categoryIndex]; [self pushToNavigationControllerAndSetControllerToPopoverSize:vc]; } else if (indexPath.section == 2) @@ -291,7 +289,7 @@ typedef enum {Editing, Saved} Mode; - (BOOL)textFieldShouldReturn:(UITextField *)textField { - if (textField.text.length == 0) + if ([textField.text length] == 0) return YES; // Hide keyboard [textField resignFirstResponder]; @@ -304,7 +302,7 @@ typedef enum {Editing, Saved} Mode; return NO; } --(void)pushToNavigationControllerAndSetControllerToPopoverSize:(UIViewController *)vc +- (void)pushToNavigationControllerAndSetControllerToPopoverSize:(UIViewController *)vc { if (isIPad) [vc setContentSizeForViewInPopover:[self contentSizeForViewInPopover]]; @@ -316,7 +314,7 @@ typedef enum {Editing, Saved} Mode; return 1; } --(void)getSuperView:(double &)height width:(double &)width rect:(CGRect &)rect +- (void)getSuperView:(double &)height width:(double &)width rect:(CGRect &)rect { if (isIPhone) { @@ -334,7 +332,7 @@ typedef enum {Editing, Saved} Mode; } } --(void)addRightNavigationItemWithAction:(SEL)selector +- (void)addRightNavigationItemWithAction:(SEL)selector { UIBarButtonItem * but; if (m_mode == Saved) @@ -342,10 +340,9 @@ typedef enum {Editing, Saved} Mode; else but = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:selector]; self.navigationItem.rightBarButtonItem = but; - [but release]; } --(void)save +- (void)save { [self.view endEditing:YES]; [self savePin]; @@ -353,14 +350,14 @@ typedef enum {Editing, Saved} Mode; GetFramework().GetBalloonManager().Hide(); } --(void)edit +- (void)edit { m_mode = Editing; [self.tableView reloadData]; [self addRightNavigationItemWithAction:@selector(save)]; } --(void)remove +- (void)remove { if (IsValid(_pinEditedBookmark)) { @@ -381,7 +378,7 @@ typedef enum {Editing, Saved} Mode; [self.shareActionSheet show]; } --(void)savePin +- (void)savePin { Framework & f = GetFramework(); if (_pinEditedBookmark == MakeEmptyBookmarkAndCategory()) @@ -439,7 +436,7 @@ typedef enum {Editing, Saved} Mode; } } --(void)addBookmarkToCategory:(size_t)index +- (void)addBookmarkToCategory:(size_t)index { Bookmark bm(m2::PointD(_pinGlobalPosition.x, _pinGlobalPosition.y), [self.pinTitle UTF8String], [self.pinColor UTF8String]); bm.SetDescription([self.pinNotes UTF8String]); @@ -447,7 +444,7 @@ typedef enum {Editing, Saved} Mode; _pinEditedBookmark = pair(index, GetFramework().AddBookmark(index, bm)); } --(void)initializeProperties:(NSString *)name notes:(NSString *)notes color:(NSString *)color category:(BookmarkAndCategory) bmAndCat point:(CGPoint)point +- (void)initializeProperties:(NSString *)name notes:(NSString *)notes color:(NSString *)color category:(BookmarkAndCategory) bmAndCat point:(CGPoint)point { Framework & f = GetFramework(); @@ -463,9 +460,9 @@ typedef enum {Editing, Saved} Mode; m_selectedRow = [ColorPickerView getColorIndex:self.pinColor]; } --(UITextView *)createTextFieldForCell:(UIFont *)font color:(UIColor *)color +- (UITextView *)createTextFieldForCell:(UIFont *)font color:(UIColor *)color { - UITextView * txtView = [[[UITextView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 142.0)] autorelease]; + UITextView * txtView = [[UITextView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 142.0)]; txtView.delegate = self; txtView.AutoresizingMask = UIViewAutoresizingFlexibleWidth; txtView.textColor = color; @@ -475,7 +472,7 @@ typedef enum {Editing, Saved} Mode; return txtView; } --(UITableViewCell *)cellForEditingModeWithTable:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +- (UITableViewCell *)cellForEditingModeWithTable:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString * cellId; switch (indexPath.section) @@ -488,7 +485,7 @@ typedef enum {Editing, Saved} Mode; UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellId]; if (!cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellId] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellId]; if (indexPath.section == 0) { cell.textLabel.text = NSLocalizedString(@"name", @"Add bookmark dialog - bookmark name"); @@ -501,7 +498,7 @@ typedef enum {Editing, Saved} Mode; 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] autorelease]; + UITextField * f = [[UITextField alloc] initWithFrame:r]; f.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; f.enablesReturnKeyAutomatically = YES; f.returnKeyType = UIReturnKeyDone; @@ -534,7 +531,7 @@ typedef enum {Editing, Saved} Mode; 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)] autorelease]; + 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; @@ -557,7 +554,7 @@ typedef enum {Editing, Saved} Mode; break; case 2: - cell.accessoryView = [[[UIImageView alloc] initWithImage:[CircleView createCircleImageWith:BUTTONDIAMETER andColor:[ColorPickerView buttonColor:m_selectedRow]]] autorelease]; + cell.accessoryView = [[UIImageView alloc] initWithImage:[CircleView createCircleImageWith:BUTTONDIAMETER andColor:[ColorPickerView buttonColor:m_selectedRow]]]; break; case 3: UITextView * t = (UITextView *)[cell viewWithTag:TEXTVIEW_TAG]; @@ -570,7 +567,7 @@ typedef enum {Editing, Saved} Mode; return cell; } --(UITableViewCell *)cellForSaveModeWithTable:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +- (UITableViewCell *)cellForSaveModeWithTable:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell * cell = nil; if (indexPath.section == 0) @@ -578,12 +575,11 @@ typedef enum {Editing, Saved} Mode; cell = [tableView dequeueReusableCellWithIdentifier:@"CoordinatesCELL"]; if (!cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CoordinatesCELL"] autorelease]; + 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:)] autorelease]; + UILongPressGestureRecognizer * longTouch = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)]; longTouch.minimumPressDuration = 0.5; longTouch.delegate = self; [cell addGestureRecognizer:longTouch]; @@ -593,7 +589,7 @@ typedef enum {Editing, Saved} Mode; return cell; } --(void)orientationChanged +- (void)orientationChanged { if (m_mode == Saved) { @@ -602,7 +598,7 @@ typedef enum {Editing, Saved} Mode; } } --(void)goToTheMap +- (void)goToTheMap { GetFramework().GetBalloonManager().Hide(); if (isIPad) @@ -611,12 +607,12 @@ typedef enum {Editing, Saved} Mode; [self.navigationController popToRootViewControllerAnimated:YES]; } --(CGFloat)getDescriptionHeight +- (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 +- (void)handleLongPress:(UILongPressGestureRecognizer *)gestureRecognizer { if (gestureRecognizer.state == UIGestureRecognizerStateBegan) { @@ -649,10 +645,10 @@ typedef enum {Editing, Saved} Mode; [UIPasteboard generalPasteboard].string = [self coordinatesToString]; } --(NSString *)coordinatesToString +- (NSString *)coordinatesToString { - NSLocale * decimalPointLocale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]; - return [[[NSString alloc] initWithFormat:@"%@" locale:decimalPointLocale, [NSString stringWithFormat:@"%.05f %.05f", MercatorBounds::YToLat(self.pinGlobalPosition.y), MercatorBounds::XToLon(self.pinGlobalPosition.x)]] autorelease]; + 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 @@ -684,20 +680,20 @@ typedef enum {Editing, Saved} Mode; return NSLocalizedString(@"description", nil); } --(PlaceAndCompasView *)getCompassView +- (PlaceAndCompasView *)getCompassView { if (!self.placeAndCompass) _placeAndCompass = [[PlaceAndCompasView alloc] initWithName:self.pinTitle placeSecondaryName:[NSString stringWithUTF8String:GetFramework().GetBmCategory(_pinEditedBookmark.first)->GetName().c_str()] placeGlobalPoint:_pinGlobalPosition width:self.tableView.frame.size.width]; return self.placeAndCompass; } --(void)showPicker +- (void)showPicker { double height, width; CGRect rect; [self getSuperView:height width:width rect:rect]; - self.pickerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, width, height)] autorelease]; - ColorPickerView * colorPicker = [[[ColorPickerView alloc] initWithWidth:min(height, width) andSelectButton:m_selectedRow] autorelease]; + 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; @@ -706,7 +702,7 @@ typedef enum {Editing, Saved} Mode; [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)] autorelease]; + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissPicker)]; [self.pickerView addGestureRecognizer:tap]; if (isIPhone) { @@ -720,12 +716,12 @@ typedef enum {Editing, Saved} Mode; [self.view.superview addSubview:self.pickerView]; } --(void)dismissPicker +- (void)dismissPicker { [self.pickerView removeFromSuperview]; } --(void)colorPicked:(size_t)colorIndex +- (void)colorPicked:(size_t)colorIndex { if (colorIndex != m_selectedRow) { diff --git a/iphone/Maps/Bookmarks/SelectSetVC.h b/iphone/Maps/Bookmarks/SelectSetVC.h index 5351b1a3d2..8f5b49fb0f 100644 --- a/iphone/Maps/Bookmarks/SelectSetVC.h +++ b/iphone/Maps/Bookmarks/SelectSetVC.h @@ -4,6 +4,6 @@ { size_t * m_index; } -- (id) initWithIndex:(size_t *)index; +- (id)initWithIndex:(size_t *)index; @end diff --git a/iphone/Maps/Bookmarks/SelectSetVC.mm b/iphone/Maps/Bookmarks/SelectSetVC.mm index ac1d6db486..23f943f94d 100644 --- a/iphone/Maps/Bookmarks/SelectSetVC.mm +++ b/iphone/Maps/Bookmarks/SelectSetVC.mm @@ -4,7 +4,7 @@ @implementation SelectSetVC -- (id) initWithIndex:(size_t *)index +- (id)initWithIndex:(size_t *)index { self = [super initWithStyle:UITableViewStyleGrouped]; if (self) @@ -39,7 +39,7 @@ static NSString * kSetCellId = @"AddSetCell"; UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:kSetCellId]; if (cell == nil) - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kSetCellId] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kSetCellId]; // Customize cell if (indexPath.section == 0) { @@ -69,7 +69,6 @@ if (isIPad) [asVC setContentSizeForViewInPopover:[self contentSizeForViewInPopover]]; [self.navigationController pushViewController:asVC animated:YES]; - [asVC release]; } else { diff --git a/iphone/Maps/Classes/CircleView.h b/iphone/Maps/Classes/CircleView.h index 8735382246..f53981e45a 100644 --- a/iphone/Maps/Classes/CircleView.h +++ b/iphone/Maps/Classes/CircleView.h @@ -1,7 +1,9 @@ #import @interface CircleView : UIView --(id)initWithFrame:(CGRect)frame andColor:(UIColor *)color; -+(UIImage *)createCircleImageWith:(CGFloat)diameter andColor:(UIColor *)color; -+(UIImage *)createCircleImageWith:(CGFloat)diameter andColor:(UIColor *)color andSubview:(UIView *)view; + +- (id)initWithFrame:(CGRect)frame andColor:(UIColor *)color; ++ (UIImage *)createCircleImageWith:(CGFloat)diameter andColor:(UIColor *)color; ++ (UIImage *)createCircleImageWith:(CGFloat)diameter andColor:(UIColor *)color andSubview:(UIView *)view; + @end diff --git a/iphone/Maps/Classes/CircleView.mm b/iphone/Maps/Classes/CircleView.mm index 15c365a2e5..b91d883292 100644 --- a/iphone/Maps/Classes/CircleView.mm +++ b/iphone/Maps/Classes/CircleView.mm @@ -3,12 +3,14 @@ #import @interface CircleView() -@property (nonatomic, retain) UIColor * circleColor; + +@property (nonatomic) UIColor * circleColor; + @end @implementation CircleView --(id)initWithFrame:(CGRect)frame andColor:(UIColor *)color +- (id)initWithFrame:(CGRect)frame andColor:(UIColor *)color { self = [super initWithFrame:frame]; if (self) @@ -27,28 +29,22 @@ CGContextFillPath(ctx); } --(void)dealloc ++ (UIView *)createViewWithCircleDiameter:(CGFloat)diameter andColor:(UIColor *)color { - self.circleColor = nil; - [super dealloc]; -} - -+(UIView *)createViewWithCircleDiameter:(CGFloat)diameter andColor:(UIColor *)color -{ - UIView * circleView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, diameter, diameter)] autorelease]; + UIView * circleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, diameter, diameter)]; circleView.backgroundColor = [UIColor clearColor]; - CircleView * circle = [[[CircleView alloc] initWithFrame:CGRectMake(0.5, 0.5, diameter - 1, diameter - 1) andColor:color] autorelease]; + CircleView * circle = [[CircleView alloc] initWithFrame:CGRectMake(0.5, 0.5, diameter - 1, diameter - 1) andColor:color]; [circleView addSubview:circle]; return circleView; } -+(UIImage *)createCircleImageWith:(CGFloat)diameter andColor:(UIColor *)color ++ (UIImage *)createCircleImageWith:(CGFloat)diameter andColor:(UIColor *)color { UIView * circle = [self createViewWithCircleDiameter:diameter andColor:color]; return [self imageWithView:circle]; } -+(UIImage *)createCircleImageWith:(CGFloat)diameter andColor:(UIColor *)color andSubview:(UIView *)view ++ (UIImage *)createCircleImageWith:(CGFloat)diameter andColor:(UIColor *)color andSubview:(UIView *)view { UIView * circle = [self createViewWithCircleDiameter:diameter andColor:color]; [circle addSubview:view]; @@ -56,7 +52,7 @@ } -+(UIImage *) imageWithView:(UIView *)view ++ (UIImage *)imageWithView:(UIView *)view { UIGraphicsBeginImageContextWithOptions(view.bounds.size, NO, 0.0); [view.layer renderInContext:UIGraphicsGetCurrentContext()]; diff --git a/iphone/Maps/Classes/ColorPickerView.h b/iphone/Maps/Classes/ColorPickerView.h index 597e0b2c70..f937a494cc 100644 --- a/iphone/Maps/Classes/ColorPickerView.h +++ b/iphone/Maps/Classes/ColorPickerView.h @@ -6,11 +6,12 @@ @interface ColorPickerView : UIView -@property (nonatomic, assign) id delegate; +@property (nonatomic, weak) id delegate; - (id)initWithWidth:(CGFloat)width andSelectButton:(size_t)selectedIndex; + (UIColor *)buttonColor:(size_t)index; + (UIColor *)colorForName:(NSString *)name; + (NSString *)colorName:(size_t)index; + (size_t)getColorIndex:(NSString *)name; + @end diff --git a/iphone/Maps/Classes/ColorPickerView.mm b/iphone/Maps/Classes/ColorPickerView.mm index 1db7f4d49b..dc5c55b8ba 100644 --- a/iphone/Maps/Classes/ColorPickerView.mm +++ b/iphone/Maps/Classes/ColorPickerView.mm @@ -42,7 +42,7 @@ static Tcolor const g_color [] = self.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin| UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleBottomMargin; - UILabel * header = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, customWidth, HEADERHEIGHT)] autorelease]; + UILabel * header = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, customWidth, HEADERHEIGHT)]; header.backgroundColor = [UIColor clearColor]; header.text = NSLocalizedString(@"bookmark_color", nil); header.font = [UIFont fontWithName:@"Helvetica" size:20]; @@ -51,7 +51,7 @@ static Tcolor const g_color [] = [self addSubview:header]; - UIView * line = [[[UIView alloc] initWithFrame:CGRectMake(0, HEADERHEIGHT - LINEHEIGHT, customWidth, LINEHEIGHT)] autorelease]; + UIView * line = [[UIView alloc] initWithFrame:CGRectMake(0, HEADERHEIGHT - LINEHEIGHT, customWidth, LINEHEIGHT)]; line.backgroundColor = [UIColor colorWithRed:51/255.f green:204/255.f blue:255/255.f alpha:1]; [self addSubview:line]; @@ -67,7 +67,7 @@ static Tcolor const g_color [] = CGFloat const selectionDiametr = buttonDiameter * 0.6; CGFloat const origin = buttonDiameter / 2 - selectionDiametr / 2; UIColor * col = [UIColor colorWithRed:1.f green:1.f blue:1.f alpha:1]; - CircleView * selectedCircle = [[[CircleView alloc] initWithFrame:CGRectMake(origin, origin, selectionDiametr, selectionDiametr) andColor:col] autorelease]; + CircleView * selectedCircle = [[CircleView alloc] initWithFrame:CGRectMake(origin, origin, selectionDiametr, selectionDiametr) andColor:col]; [button setBackgroundImage:[CircleView createCircleImageWith:buttonDiameter andColor:c andSubview:selectedCircle] forState:UIControlStateNormal]; } @@ -78,7 +78,6 @@ static Tcolor const g_color [] = button.tag = i; [button setContentMode:UIViewContentModeScaleAspectFit]; [self addSubview:button]; - [button release]; } } return self; diff --git a/iphone/Maps/Classes/CompassView.h b/iphone/Maps/Classes/CompassView.h index c4caec26e7..35c1883a88 100644 --- a/iphone/Maps/Classes/CompassView.h +++ b/iphone/Maps/Classes/CompassView.h @@ -3,9 +3,10 @@ // Custom view which drows an arrow @interface CompassView : UIView // Rotation angle in radians (decart system) -@property (nonatomic, assign) float angle; +@property (nonatomic) float angle; // NO by default - do not display anything // If set to YES - use angle to display the arrow -@property (nonatomic, assign) BOOL showArrow; -@property (nonatomic, retain) UIColor * color; +@property (nonatomic) BOOL showArrow; +@property (nonatomic) UIColor * color; + @end diff --git a/iphone/Maps/Classes/CompassView.mm b/iphone/Maps/Classes/CompassView.mm index e86a49034b..1f24285afe 100644 --- a/iphone/Maps/Classes/CompassView.mm +++ b/iphone/Maps/Classes/CompassView.mm @@ -4,9 +4,6 @@ @implementation CompassView -@synthesize angle; -@synthesize showArrow; - - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; @@ -15,26 +12,26 @@ self.opaque = NO; self.clearsContextBeforeDrawing = YES; self.showArrow = NO; - _color = [[UIColor alloc] initWithRed:DEFAULTCOLOR green:DEFAULTCOLOR blue:DEFAULTCOLOR alpha:1.0]; + self.color = [[UIColor alloc] initWithRed:DEFAULTCOLOR green:DEFAULTCOLOR blue:DEFAULTCOLOR alpha:1.0]; } return self; } - (void)setAngle:(float)aAngle { - angle = aAngle; + _angle = aAngle; [self setNeedsDisplay]; } - (void)setShowArrow:(BOOL)showOrNot { - showArrow = showOrNot; + _showArrow = showOrNot; [self setNeedsDisplay]; } - (void)drawRect:(CGRect)rect { - if (showArrow) + if (self.showArrow) { // Draws an arrow looking to the right like this: // => @@ -66,7 +63,7 @@ [aPath closePath]; CGAffineTransform matrix = CGAffineTransformMakeTranslation(w2, w2); - matrix = CGAffineTransformRotate(matrix, -angle); + 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]; @@ -77,10 +74,4 @@ // Do not draw anything if showArrow property is not set } --(void)dealloc -{ - self.color = nil; - [super dealloc]; -} - @end diff --git a/iphone/Maps/Classes/CustomNavigationView.mm b/iphone/Maps/Classes/CustomNavigationView.mm index e17b5b144f..9f0160b0fa 100644 --- a/iphone/Maps/Classes/CustomNavigationView.mm +++ b/iphone/Maps/Classes/CustomNavigationView.mm @@ -2,15 +2,6 @@ @implementation CustomNavigationView -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - // Initialization code - } - return self; -} - - (void)layoutSubviews { UINavigationBar * navBar = (UINavigationBar *)[self.subviews objectAtIndex:0]; @@ -25,13 +16,4 @@ table.frame = rTable; } -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect -{ - // Drawing code -} -*/ - @end diff --git a/iphone/Maps/Classes/EAGLView.h b/iphone/Maps/Classes/EAGLView.h index 95f8b453dc..0f4092af9e 100644 --- a/iphone/Maps/Classes/EAGLView.h +++ b/iphone/Maps/Classes/EAGLView.h @@ -35,8 +35,8 @@ namespace graphics CGRect lastViewSize; } -- (void) initRenderPolicy; -- (CGPoint) viewPoint2GlobalPoint:(CGPoint)pt; -- (CGPoint) globalPoint2ViewPoint:(CGPoint)pt; +- (void)initRenderPolicy; +- (CGPoint)viewPoint2GlobalPoint:(CGPoint)pt; +- (CGPoint)globalPoint2ViewPoint:(CGPoint)pt; @end diff --git a/iphone/Maps/Classes/EAGLView.mm b/iphone/Maps/Classes/EAGLView.mm index 0cef454a4b..2d0ae5a298 100644 --- a/iphone/Maps/Classes/EAGLView.mm +++ b/iphone/Maps/Classes/EAGLView.mm @@ -29,7 +29,7 @@ } // The GL view is stored in the nib file. When it's unarchived it's sent -initWithCoder: -- (id)initWithCoder:(NSCoder*)coder +- (id)initWithCoder:(NSCoder *)coder { NSLog(@"EAGLView initWithCoder Started"); @@ -45,7 +45,6 @@ if (!renderContext.get()) { NSLog(@"EAGLView initWithCoder Error"); - [self release]; return nil; } @@ -53,14 +52,9 @@ // ColorFormat : RGB565 // Backbuffer : YES, (to prevent from loosing content when mixing with ordinary layers). - eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:NO], - kEAGLDrawablePropertyRetainedBacking, - kEAGLColorFormatRGB565, - kEAGLDrawablePropertyColorFormat, - nil]; + eaglLayer.drawableProperties = @{kEAGLDrawablePropertyRetainedBacking : @NO, kEAGLDrawablePropertyColorFormat : kEAGLColorFormatRGB565}; // Correct retina display support in opengl renderbuffer - self.contentScaleFactor = [[UIScreen mainScreen] scale]; + self.contentScaleFactor = [UIScreen mainScreen].scale; } NSLog(@"EAGLView initWithCoder Ended"); @@ -180,7 +174,6 @@ { delete videoTimer; [EAGLContext setCurrentContext:nil]; - [super dealloc]; } - (CGPoint)viewPoint2GlobalPoint:(CGPoint)pt diff --git a/iphone/Maps/Classes/MWMApi.h b/iphone/Maps/Classes/MWMApi.h index 0f3722d220..19e435100a 100644 --- a/iphone/Maps/Classes/MWMApi.h +++ b/iphone/Maps/Classes/MWMApi.h @@ -3,7 +3,9 @@ namespace url_scheme { struct ApiPoint; } @interface MWMApi : NSObject -+(NSURL *)getBackUrl:(url_scheme::ApiPoint const &)apiPoint; -+(void)openAppWithPoint:(url_scheme::ApiPoint const &)apiPoint; -+(BOOL)canOpenApiUrl:(url_scheme::ApiPoint const &)apiPoint; + ++ (NSURL *)getBackUrl:(url_scheme::ApiPoint const &)apiPoint; ++ (void)openAppWithPoint:(url_scheme::ApiPoint const &)apiPoint; ++ (BOOL)canOpenApiUrl:(url_scheme::ApiPoint const &)apiPoint; + @end diff --git a/iphone/Maps/Classes/MWMApi.mm b/iphone/Maps/Classes/MWMApi.mm index 26aeb79766..4a4c7956b6 100644 --- a/iphone/Maps/Classes/MWMApi.mm +++ b/iphone/Maps/Classes/MWMApi.mm @@ -5,29 +5,31 @@ #include "../../../search/result.hpp" @implementation MWMApi -+(NSURL *)getBackUrl:(url_scheme::ApiPoint const &)apiPoint + ++ (NSURL *)getBackUrl:(url_scheme::ApiPoint const &)apiPoint { string const str = GetFramework().GenerateApiBackUrl(apiPoint); return [NSURL URLWithString:[NSString stringWithUTF8String:str.c_str()]]; } -+(void)openAppWithPoint:(url_scheme::ApiPoint const &)apiPoint ++ (void)openAppWithPoint:(url_scheme::ApiPoint const &)apiPoint { NSString * z = [NSString stringWithUTF8String:apiPoint.m_id.c_str()]; NSURL * url = [NSURL URLWithString:z]; - if ([APP canOpenURL:url]) - [APP openURL:url]; + if ([[UIApplication sharedApplication] canOpenURL:url]) + [[UIApplication sharedApplication] openURL:url]; else - [APP openURL:[MWMApi getBackUrl:apiPoint]]; + [[UIApplication sharedApplication] openURL:[MWMApi getBackUrl:apiPoint]]; } -+(BOOL)canOpenApiUrl:(url_scheme::ApiPoint const &)apiPoint ++ (BOOL)canOpenApiUrl:(url_scheme::ApiPoint const &)apiPoint { NSString * z = [NSString stringWithUTF8String:apiPoint.m_id.c_str()]; - if ([APP canOpenURL:[NSURL URLWithString:z]]) + if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:z]]) return YES; - if ([APP canOpenURL:[MWMApi getBackUrl:apiPoint]]) + if ([[UIApplication sharedApplication] canOpenURL:[MWMApi getBackUrl:apiPoint]]) return YES; return NO; } + @end diff --git a/iphone/Maps/Classes/MapViewController.h b/iphone/Maps/Classes/MapViewController.h index 3adfc8a9b7..4dd4f5cef1 100644 --- a/iphone/Maps/Classes/MapViewController.h +++ b/iphone/Maps/Classes/MapViewController.h @@ -51,6 +51,6 @@ namespace search { struct AddressInfo; } @property (nonatomic) BOOL isApiMode; @property (weak, nonatomic) IBOutlet UIView * zoomButtonsView; -@property (nonatomic, strong) SideToolbar * sideToolbar; +@property (nonatomic) SideToolbar * sideToolbar; @end diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 09286eefa2..cd9face2ac 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -43,7 +43,7 @@ const long long LITE_IDL = 431183278L; @property (nonatomic) UIView * fadeView; @property (nonatomic) LocationButton * locationButton; -@property (nonatomic, strong) UINavigationBar * apiNavigationBar; +@property (nonatomic) UINavigationBar * apiNavigationBar; @property ShareActionSheet * shareActionSheet; @property MPInterstitialAdController * interstitialAd; @property MPAdView * topBannerAd; diff --git a/iphone/Maps/Classes/MapsAppDelegate.h b/iphone/Maps/Classes/MapsAppDelegate.h index 6bd0d48183..e4590a23d3 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.h +++ b/iphone/Maps/Classes/MapsAppDelegate.h @@ -17,7 +17,7 @@ BOOL m_didOpenedWithUrl; } -@property (nonatomic, retain) IBOutlet MapViewController * m_mapViewController; +@property (nonatomic) IBOutlet MapViewController * m_mapViewController; @property (nonatomic, readonly) LocationManager * m_locationManager; + (MapsAppDelegate *)theApp; diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index 2acad1537d..e868c4e557 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -42,29 +42,25 @@ void InitLocalizedStrings() } @interface MapsAppDelegate() -@property (nonatomic, retain) NSString * lastGuidesUrl; +@property (nonatomic) NSString * lastGuidesUrl; @end @implementation MapsAppDelegate -@synthesize m_mapViewController; -@synthesize m_locationManager; - - -+ (MapsAppDelegate *) theApp ++ (MapsAppDelegate *)theApp { - return (MapsAppDelegate *)[APP delegate]; + return (MapsAppDelegate *)[UIApplication sharedApplication].delegate; } -- (void) applicationWillTerminate: (UIApplication *) application +- (void)applicationWillTerminate:(UIApplication *)application { - [m_mapViewController onTerminate]; + [self.m_mapViewController onTerminate]; } -- (void) applicationDidEnterBackground: (UIApplication *) application +- (void)applicationDidEnterBackground:(UIApplication *)application { - [m_mapViewController onEnterBackground]; - if(m_activeDownloadsCounter) + [self.m_mapViewController onEnterBackground]; + if (m_activeDownloadsCounter) { m_backgroundTask = [application beginBackgroundTaskWithExpirationHandler:^{ [application endBackgroundTask:m_backgroundTask]; @@ -73,11 +69,11 @@ void InitLocalizedStrings() } } -- (void) applicationWillEnterForeground: (UIApplication *) application +- (void)applicationWillEnterForeground:(UIApplication *)application { - [m_locationManager orientationChanged]; + [self.m_locationManager orientationChanged]; [AppInfo sharedInfo].launchCount++; - [m_mapViewController onEnterForeground]; + [self.m_mapViewController onEnterForeground]; } - (void)applicationDidBecomeActive:(UIApplication *)application @@ -85,12 +81,11 @@ void InitLocalizedStrings() if (!m_didOpenedWithUrl) { UIPasteboard * pasteboard = [UIPasteboard generalPasteboard]; - if (pasteboard.string.length) + if ([pasteboard.string length]) { if (GetFramework().ShowMapForURL([pasteboard.string UTF8String])) { [self showMap]; - pasteboard.string = @""; } } @@ -114,55 +109,47 @@ void InitLocalizedStrings() return m_settingsManager; } -- (void) dealloc +- (void)dealloc { - [m_locationManager release]; - [m_settingsManager release]; - self.m_mapViewController = nil; - [m_navController release]; - [m_window release]; - self.lastGuidesUrl = nil; - [super dealloc]; - // Global cleanup DeleteFramework(); } -- (void) disableStandby +- (void)disableStandby { ++m_standbyCounter; - APP.idleTimerDisabled = YES; + [UIApplication sharedApplication].idleTimerDisabled = YES; } -- (void) enableStandby +- (void)enableStandby { --m_standbyCounter; if (m_standbyCounter <= 0) { - APP.idleTimerDisabled = NO; + [UIApplication sharedApplication].idleTimerDisabled = NO; m_standbyCounter = 0; } } -- (void) disableDownloadIndicator +- (void)disableDownloadIndicator { --m_activeDownloadsCounter; if (m_activeDownloadsCounter <= 0) { - APP.networkActivityIndicatorVisible = NO; + [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; m_activeDownloadsCounter = 0; - if ([APP applicationState] == UIApplicationStateBackground) + if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) { - [APP endBackgroundTask:m_backgroundTask]; + [[UIApplication sharedApplication] endBackgroundTask:m_backgroundTask]; m_backgroundTask = UIBackgroundTaskInvalid; } } } -- (void) enableDownloadIndicator +- (void)enableDownloadIndicator { ++m_activeDownloadsCounter; - APP.networkActivityIndicatorVisible = YES; + [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; } - (void)customizeAppearance @@ -177,7 +164,7 @@ void InitLocalizedStrings() [[UIBarButtonItem appearance] setTintColor:[UIColor whiteColor]]; } if ([UINavigationBar instancesRespondToSelector:@selector(setShadowImage:)]) - [[UINavigationBar appearance] setShadowImage:[[[UIImage alloc] init] autorelease]]; + [[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]]; [[UINavigationBar appearance] setTitleTextAttributes:attributes]; } @@ -191,12 +178,12 @@ void InitLocalizedStrings() InitLocalizedStrings(); - [m_mapViewController onEnterForeground]; + [self.m_mapViewController onEnterForeground]; - [Preferences setup:m_mapViewController]; - m_locationManager = [[LocationManager alloc] init]; + [Preferences setup:self.m_mapViewController]; + _m_locationManager = [[LocationManager alloc] init]; - m_navController = [[NavigationController alloc] initWithRootViewController:m_mapViewController]; + m_navController = [[NavigationController alloc] initWithRootViewController:self.m_mapViewController]; m_navController.navigationBarHidden = YES; m_window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; m_window.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; @@ -230,7 +217,7 @@ void InitLocalizedStrings() return [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey] != nil; } --(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification +- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { NSDictionary * dict = notification.userInfo; if ([[dict objectForKey:@"Proposal"] isEqual:@"OpenGuides"]) @@ -239,15 +226,11 @@ void InitLocalizedStrings() UIAlertView * view = [[UIAlertView alloc] initWithTitle:[dict objectForKey:@"GuideTitle"] message:[dict objectForKey:@"GuideMessage"] delegate:self cancelButtonTitle:NSLocalizedString(@"later", nil) otherButtonTitles:NSLocalizedString(@"get_it_now", nil), nil]; view.tag = NOTIFICATION_ALERT_VIEW_TAG; [view show]; - [view release]; } } // We don't support HandleOpenUrl as it's deprecated from iOS 4.2 -- (BOOL)application:(UIApplication *)application - openURL:(NSURL *)url - sourceApplication:(NSString *)sourceApplication - annotation:(id)annotation +- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { NSString * scheme = url.scheme; Framework & f = GetFramework(); @@ -277,7 +260,7 @@ void InitLocalizedStrings() [[Statistics instance] logApiUsage:sourceApplication]; [self showMap]; - [m_mapViewController prepareForApi]; + [self.m_mapViewController prepareForApi]; return YES; } } @@ -299,7 +282,7 @@ void InitLocalizedStrings() return NO; } --(void)showLoadFileAlertIsSuccessful:(BOOL) successful +- (void)showLoadFileAlertIsSuccessful:(BOOL)successful { m_loadingAlertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"load_kmz_title", nil) message: @@ -309,10 +292,9 @@ void InitLocalizedStrings() m_loadingAlertView.delegate = self; [m_loadingAlertView show]; [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(dismissAlert) userInfo:nil repeats:NO]; - [m_loadingAlertView release]; } --(void)dismissAlert +- (void)dismissAlert { if (m_loadingAlertView) [m_loadingAlertView dismissWithClickedButtonIndex:0 animated:YES]; @@ -326,7 +308,7 @@ void InitLocalizedStrings() { [[Statistics instance] logEvent:@"Download Guides Proposal" withParameters:@{@"Answer" : @"YES"}]; NSURL * url = [NSURL URLWithString:self.lastGuidesUrl]; - [APP openURL:url]; + [[UIApplication sharedApplication] openURL:url]; } else [[Statistics instance] logEvent:@"Download Guides Proposal" withParameters:@{@"Answer" : @"NO"}]; @@ -335,14 +317,14 @@ void InitLocalizedStrings() m_loadingAlertView = nil; } --(void)showMap +- (void)showMap { [m_navController popToRootViewControllerAnimated:YES]; - [m_mapViewController.sideToolbar setMenuHidden:YES animated:NO]; - [m_mapViewController dismissPopover]; + [self.m_mapViewController.sideToolbar setMenuHidden:YES animated:NO]; + [self.m_mapViewController dismissPopover]; } --(void)subscribeToStorage +- (void)subscribeToStorage { typedef void (*TChangeFunc)(id, SEL, storage::TIndex const &); SEL changeSel = @selector(OnCountryChange:); @@ -356,7 +338,7 @@ void InitLocalizedStrings() bind(progressImpl, self, emptySel, _1, _2)); } -- (void) OnCountryChange: (storage::TIndex const &)index +- (void)OnCountryChange:(storage::TIndex const &)index { Framework const & f = GetFramework(); guides::GuideInfo guide; @@ -364,17 +346,15 @@ void InitLocalizedStrings() [self ShowNotificationWithGuideInfo:guide]; } -- (void) EmptyFunction: (storage::TIndex const &) index withProgress: (pair const &) progress -{ -} +- (void)EmptyFunction:(storage::TIndex const &)index withProgress:(pair const &)progress {} --(BOOL) ShowNotificationWithGuideInfo:(guides::GuideInfo const &)guide +- (BOOL)ShowNotificationWithGuideInfo:(guides::GuideInfo const &)guide { guides::GuidesManager & guidesManager = GetFramework().GetGuidesManager(); string const appID = guide.GetAppID(); if (guidesManager.WasAdvertised(appID) || - [APP canOpenURL:[NSURL URLWithString:[NSString stringWithUTF8String:appID.c_str()]]]) + [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:[NSString stringWithUTF8String:appID.c_str()]]]) return NO; UILocalNotification * notification = [[UILocalNotification alloc] init]; @@ -393,10 +373,10 @@ void InitLocalizedStrings() @"GuideMessage" : message }; - [APP scheduleLocalNotification:notification]; - [notification release]; + [[UIApplication sharedApplication] scheduleLocalNotification:notification]; guidesManager.SetWasAdvertised(appID); + return YES; } diff --git a/iphone/Maps/Classes/PlaceAndCompasView.h b/iphone/Maps/Classes/PlaceAndCompasView.h index 7e948d632b..4a126e452a 100644 --- a/iphone/Maps/Classes/PlaceAndCompasView.h +++ b/iphone/Maps/Classes/PlaceAndCompasView.h @@ -5,7 +5,7 @@ @interface PlaceAndCompasView : UIView --(void)drawView; +- (void)drawView; - (id)initWithName:(NSString *)placeName placeSecondaryName:(NSString *)placeSecondaryName placeGlobalPoint:(CGPoint)point width:(CGFloat)width; diff --git a/iphone/Maps/Classes/PlaceAndCompasView.mm b/iphone/Maps/Classes/PlaceAndCompasView.mm index 7be015b793..d6186c0230 100644 --- a/iphone/Maps/Classes/PlaceAndCompasView.mm +++ b/iphone/Maps/Classes/PlaceAndCompasView.mm @@ -26,12 +26,12 @@ @property (nonatomic, copy) NSString * name; @property (nonatomic, copy) NSString * secondaryInfo; -@property (nonatomic, retain) CompassView * compass; -@property (nonatomic, retain) UITextView * nameView; -@property (nonatomic, retain) UITextView * secondaryInfoView; -@property (nonatomic, retain) UILabel * distanceLabel; -@property (nonatomic, retain) CircleView * circle; -@property (nonatomic, assign) double screenWidth; +@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 @@ -60,7 +60,7 @@ if ([placeName length] == 0) { _name = [[NSString alloc] initWithString:placeSecondaryName]; - _secondaryInfo = [[NSString alloc] initWithString:@""]; + _secondaryInfo = @""; } else { @@ -97,21 +97,12 @@ return self; } --(void)dealloc +- (void)dealloc { [m_locationManager stop:self]; - - self.name = nil; - self.secondaryInfo = nil; - self.compass = nil; - self.distanceLabel = nil; - - self.nameView = nil; - self.secondaryInfoView = nil; - [super dealloc]; } --(void)drawView +- (void)drawView { if ([self canShowArrow]) [self drawWithArrow]; @@ -119,7 +110,7 @@ [self drawWithoutArrow]; } --(void)drawWithoutArrow +- (void)drawWithoutArrow { [self.compass setShowArrow:NO]; self.distanceLabel.frame = CGRectZero; @@ -144,7 +135,7 @@ self.frame = CGRectMake(0, 0, width, [self countHeight]); } --(void)drawWithArrow +- (void)drawWithArrow { double width = [self getCurrentSuperViewWidth]; [self.compass setShowArrow:YES]; @@ -203,7 +194,7 @@ MercatorBounds::LatToY(lat)), m2::PointD(m_xGlobal, m_yGlobal)) + northRad; } --(BOOL)canShowArrow +- (BOOL)canShowArrow { if ([self getAzimut] >= 0.0) return YES; @@ -211,7 +202,7 @@ return NO; } --(double)getAzimut +- (double)getAzimut { double azimut = -1.0; double lat = 0.0, lon = 0.0; @@ -230,12 +221,12 @@ return azimut; } --(double)getTextHeight:(NSString *)text font:(UIFont *)font +- (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 +- (CGFloat) countHeight { if (self.secondaryInfo.length) return self.secondaryInfoView.frame.origin.y + self.secondaryInfoView.frame.size.height + SMALLMARGIN; @@ -243,7 +234,7 @@ return self.nameView.frame.origin.y + self.nameView.frame.size.height + SMALLMARGIN; } --(CGFloat)getCurrentSuperViewWidth +- (CGFloat)getCurrentSuperViewWidth { double width = self.superview.bounds.size.width; if (width == 0) diff --git a/iphone/Maps/Classes/PlacePreviewViewController.h b/iphone/Maps/Classes/PlacePreviewViewController.h index ed0ed3d061..fa11875935 100644 --- a/iphone/Maps/Classes/PlacePreviewViewController.h +++ b/iphone/Maps/Classes/PlacePreviewViewController.h @@ -5,7 +5,9 @@ namespace search { struct AddressInfo; } namespace url_scheme { struct ApiPoint; } @interface PlacePreviewViewController : UITableViewController --(id)initWith:(search::AddressInfo const &)info point:(CGPoint)point; --(id)initWithApiPoint:(url_scheme::ApiPoint const &)apiPoint; --(id)initWithPoint:(CGPoint)point; + +- (id)initWith:(search::AddressInfo const &)info point:(CGPoint)point; +- (id)initWithApiPoint:(url_scheme::ApiPoint const &)apiPoint; +- (id)initWithPoint:(CGPoint)point; + @end diff --git a/iphone/Maps/Classes/PlacePreviewViewController.mm b/iphone/Maps/Classes/PlacePreviewViewController.mm index 67aee19024..59e559925b 100644 --- a/iphone/Maps/Classes/PlacePreviewViewController.mm +++ b/iphone/Maps/Classes/PlacePreviewViewController.mm @@ -35,7 +35,7 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; @implementation PlacePreviewViewController --(id)initWith:(search::AddressInfo const &)info point:(CGPoint)point +- (id)initWith:(search::AddressInfo const &)info point:(CGPoint)point { self = [super initWithStyle:UITableViewStyleGrouped]; if (self) @@ -52,7 +52,7 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; return self; } --(id)initWithApiPoint:(url_scheme::ApiPoint const &)apiPoint +- (id)initWithApiPoint:(url_scheme::ApiPoint const &)apiPoint { self = [super initWithStyle:UITableViewStyleGrouped]; if (self) @@ -65,7 +65,7 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; return self; } --(id)initWithPoint:(CGPoint)point +- (id)initWithPoint:(CGPoint)point { self = [super initWithStyle:UITableViewStyleGrouped]; if (self) @@ -76,7 +76,7 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; return self; } --(void)viewWillAppear:(BOOL)animated +- (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; if (isIPad) @@ -85,7 +85,7 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; #pragma mark - Table view data source --(void)viewDidLoad +- (void)viewDidLoad { [super viewDidLoad]; [self setTitle:NSLocalizedString(@"info", nil)]; @@ -118,12 +118,11 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; cell = [tableView dequeueReusableCellWithIdentifier:@"CoordinatesCELL"]; if (!cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CoordinatesCELL"] autorelease]; + 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:)] autorelease]; + UILongPressGestureRecognizer * longTouch = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)]; longTouch.minimumPressDuration = 0.5; longTouch.delegate = self; [cell addGestureRecognizer:longTouch]; @@ -136,7 +135,7 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; cell = [tableView dequeueReusableCellWithIdentifier:@"ApiReturnCell"]; if (!cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ApiReturnCell"] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ApiReturnCell"]; cell.textLabel.textAlignment = NSTextAlignmentCenter; UIButton * tmp = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [tmp setTitle:@"tmp" forState:UIControlStateNormal]; @@ -168,7 +167,7 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; { if (section == 1) { - TwoButtonsView * myView = [[[TwoButtonsView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, TWOBUTTONSHEIGHT) leftButtonSelector:@selector(share) rightButtonSelector:@selector(addToBookmark) leftButtonTitle:NSLocalizedString(@"share", nil) rightButtontitle:NSLocalizedString(@"add_to_bookmarks", nil) target:self] autorelease]; + TwoButtonsView * myView = [[TwoButtonsView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, TWOBUTTONSHEIGHT) leftButtonSelector:@selector(share) rightButtonSelector:@selector(addToBookmark) leftButtonTitle:NSLocalizedString(@"share", nil) rightButtontitle:NSLocalizedString(@"add_to_bookmarks", nil) target:self]; return myView; } return nil; @@ -203,7 +202,7 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; [self.shareActionSheet show]; } --(void)addToBookmark +- (void)addToBookmark { if (!GetPlatform().HasBookmarks()) { @@ -216,7 +215,6 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; alert.tag = BALLOON_PROPOSAL_ALERT_VIEW; [alert show]; - [alert release]; } else { @@ -228,7 +226,6 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; else p = [[PlacePageVC alloc] initWithName:NSLocalizedString(@"my_position", nil) andGlobalPoint:m_point]; [self.navigationController pushViewController:p animated:YES]; - [p release]; } } @@ -247,19 +244,19 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; } } --(NSURL *)getBackUrl +- (NSURL *)getBackUrl { string const str = GetFramework().GenerateApiBackUrl(m_apiPoint); return [NSURL URLWithString:[NSString stringWithUTF8String:str.c_str()]]; } --(void)orientationChanged +- (void)orientationChanged { [self.placeAndCompass drawView]; [self.tableView reloadData]; } --(void)handleLongPress:(UILongPressGestureRecognizer *)gestureRecognizer +- (void)handleLongPress:(UILongPressGestureRecognizer *)gestureRecognizer { if (gestureRecognizer.state == UIGestureRecognizerStateBegan) { @@ -292,22 +289,20 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; [UIPasteboard generalPasteboard].string = [self coordinatesToString]; } --(NSString *)coordinatesToString +- (NSString *)coordinatesToString { NSString * result = nil; if (m_previewType == APIPOINT) result = [NSString stringWithFormat:@"%.05f %.05f", m_apiPoint.m_lat, m_apiPoint.m_lon]; else result = [NSString stringWithFormat:@"%.05f %.05f", MercatorBounds::YToLat(m_point.y), MercatorBounds::XToLon(m_point.x)]; - NSLocale * decimalPointLocale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]; - return [[[NSString alloc] initWithFormat:@"%@" locale:decimalPointLocale, result] autorelease]; + NSLocale * decimalPointLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; + return [[NSString alloc] initWithFormat:@"%@" locale:decimalPointLocale, result]; } --(void)dealloc +- (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - self.placeAndCompass = nil; - [super dealloc]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation @@ -315,7 +310,7 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type; return YES; } --(PlaceAndCompasView *)getCompassView +- (PlaceAndCompasView *)getCompassView { if (!self.placeAndCompass) { diff --git a/iphone/Maps/Classes/RenderContext.mm b/iphone/Maps/Classes/RenderContext.mm index 8e3b833b34..11a5b91cda 100644 --- a/iphone/Maps/Classes/RenderContext.mm +++ b/iphone/Maps/Classes/RenderContext.mm @@ -14,7 +14,7 @@ namespace iphone RenderContext::~RenderContext() { - [m_context release]; + } void RenderContext::makeCurrent() diff --git a/iphone/Maps/Classes/SearchCell.h b/iphone/Maps/Classes/SearchCell.h index 74acd8a0c8..1da3360344 100644 --- a/iphone/Maps/Classes/SearchCell.h +++ b/iphone/Maps/Classes/SearchCell.h @@ -1,8 +1,6 @@ #import @interface SearchCell : UITableViewCell -{ -} @property (nonatomic, readonly) UILabel * featureName; @property (nonatomic, readonly) UILabel * featureType; diff --git a/iphone/Maps/Classes/SearchCell.mm b/iphone/Maps/Classes/SearchCell.mm index 8832d75938..ddcf48ea86 100644 --- a/iphone/Maps/Classes/SearchCell.mm +++ b/iphone/Maps/Classes/SearchCell.mm @@ -2,11 +2,6 @@ @implementation SearchCell -@synthesize featureName; -@synthesize featureType; -@synthesize featureCountry; -@synthesize featureDistance; - - (id)initWithReuseIdentifier:(NSString *)identifier { self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; @@ -16,24 +11,24 @@ UIFont * large = [UIFont fontWithName:@"Helvetica-Bold" size:[UIFont labelFontSize] + 1]; UIFont * small = [UIFont fontWithName:@"Helvetica" size:[UIFont systemFontSize]]; - featureName = [[[UILabel alloc] init] autorelease]; - featureName.font = large; - featureType = [[[UILabel alloc] init] autorelease]; - featureType.font = small; - featureType.textColor = [UIColor grayColor]; - featureType.textAlignment = UITextAlignmentRight; - featureCountry = [[[UILabel alloc] init] autorelease]; - featureCountry.font = small; - featureCountry.textColor = [UIColor grayColor]; - featureDistance = [[[UILabel alloc] init] autorelease]; - featureDistance.font = small; - featureDistance.textColor = [UIColor grayColor]; - featureDistance.textAlignment = UITextAlignmentRight; + _featureName = [[UILabel alloc] init]; + _featureName.font = large; + _featureType = [[UILabel alloc] init]; + _featureType.font = small; + _featureType.textColor = [UIColor grayColor]; + _featureType.textAlignment = UITextAlignmentRight; + _featureCountry = [[UILabel alloc] init]; + _featureCountry.font = small; + _featureCountry.textColor = [UIColor grayColor]; + _featureDistance = [[UILabel alloc] init]; + _featureDistance.font = small; + _featureDistance.textColor = [UIColor grayColor]; + _featureDistance.textAlignment = UITextAlignmentRight; - [self.contentView addSubview:featureName]; - [self.contentView addSubview:featureType]; - [self.contentView addSubview:featureCountry]; - [self.contentView addSubview:featureDistance]; + [self.contentView addSubview:_featureName]; + [self.contentView addSubview:_featureType]; + [self.contentView addSubview:_featureCountry]; + [self.contentView addSubview:_featureDistance]; } return self; } @@ -57,9 +52,9 @@ CGFloat xTopDelim = (int)(r.origin.x + w / 2); CGFloat xBottomDelim = xTopDelim; - if (featureDistance.text.length) + if ([_featureDistance.text length]) { - CGSize const distanceTextSize = [featureDistance.text sizeWithFont:featureDistance.font]; + CGSize const distanceTextSize = [_featureDistance.text sizeWithFont:_featureDistance.font]; if (xTopDelim + distanceTextSize.width < r.origin.x + w) xTopDelim = r.origin.x + w - distanceTextSize.width - KPaddingX; } @@ -68,17 +63,17 @@ xTopDelim = r.origin.x + w - KPaddingX; } - featureName.frame = CGRectMake(r.origin.x, r.origin.y, xTopDelim - r.origin.x, yDelim - r.origin.y); - featureDistance.frame = CGRectMake(xTopDelim, r.origin.y, r.origin.x + w - xTopDelim, yDelim - r.origin.y); + _featureName.frame = CGRectMake(r.origin.x, r.origin.y, xTopDelim - r.origin.x, yDelim - r.origin.y); + _featureDistance.frame = CGRectMake(xTopDelim, r.origin.y, r.origin.x + w - xTopDelim, yDelim - r.origin.y); - if (featureType.text.length) + if ([_featureType.text length]) { - CGSize const typeTextSize = [featureType.text sizeWithFont:featureType.font]; + CGSize const typeTextSize = [_featureType.text sizeWithFont:_featureType.font]; if (xBottomDelim + typeTextSize.width < r.origin.x + w) xBottomDelim = r.origin.x + w - typeTextSize.width - KPaddingX; } - featureCountry.frame = CGRectMake(r.origin.x, yDelim, xBottomDelim - r.origin.x, r.origin.y + h - yDelim); - featureType.frame = CGRectMake(xBottomDelim, yDelim, r.origin.x + w - xBottomDelim, r.origin.y + h - yDelim); + _featureCountry.frame = CGRectMake(r.origin.x, yDelim, xBottomDelim - r.origin.x, r.origin.y + h - yDelim); + _featureType.frame = CGRectMake(xBottomDelim, yDelim, r.origin.x + w - xBottomDelim, r.origin.y + h - yDelim); } @end diff --git a/iphone/Maps/Classes/SearchVC.h b/iphone/Maps/Classes/SearchVC.h index cc8b783386..223526f9e2 100644 --- a/iphone/Maps/Classes/SearchVC.h +++ b/iphone/Maps/Classes/SearchVC.h @@ -16,7 +16,7 @@ class Framework; NSArray * categoriesNames; } -@property NSMutableArray * searchResults; +@property (nonatomic) NSMutableArray * searchResults; @property (nonatomic) UISearchBar * searchBar; @property (nonatomic) ScopeView * scopeView; diff --git a/iphone/Maps/Classes/SearchVC.mm b/iphone/Maps/Classes/SearchVC.mm index a14f21ca18..7422ce1e40 100644 --- a/iphone/Maps/Classes/SearchVC.mm +++ b/iphone/Maps/Classes/SearchVC.mm @@ -115,14 +115,14 @@ static void OnSearchResultCallback(search::Results const & res) @interface SearchVC () @property (nonatomic) BOOL searching; -@property (nonatomic) UIActivityIndicatorView *activityIndicator; +@property (nonatomic) UIActivityIndicatorView * activityIndicator; @end @implementation SearchVC @synthesize searchResults = _searchResults; -- (id) init +- (id)init { if ((self = [super initWithNibName:nil bundle:nil])) { @@ -174,8 +174,6 @@ static void OnSearchResultCallback(search::Results const & res) params.SetPosition(lat, lon); } - - - (UISearchBar *)searchBar { if (!_searchBar) @@ -652,7 +650,7 @@ void setSearchType(search::SearchParams & params) [self onCloseButton:nil]; } --(void)clearCacheResults +- (void)clearCacheResults { for (int i = 0; i < [_searchResults count]; ++i) { @@ -660,7 +658,7 @@ void setSearchType(search::SearchParams & params) } } --(void)proceedSearchWithString:(NSString *)searchText andForceSearch:(BOOL)forceSearch +- (void)proceedSearchWithString:(NSString *)searchText andForceSearch:(BOOL)forceSearch { g_numberOfRowsInEmptySearch = 0; [m_table reloadData]; @@ -668,7 +666,7 @@ void setSearchType(search::SearchParams & params) return; search::SearchParams params; setSearchType(params); - if(forceSearch) + if (forceSearch) { params.SetForceSearch(true); } diff --git a/iphone/Maps/Classes/ShareActionSheet.h b/iphone/Maps/Classes/ShareActionSheet.h index 2064c2b4af..6d723dca65 100644 --- a/iphone/Maps/Classes/ShareActionSheet.h +++ b/iphone/Maps/Classes/ShareActionSheet.h @@ -7,10 +7,10 @@ - (instancetype)initWithText:(NSString *)text gX:(double)gX gY:(double)gY myPosition:(BOOL)myPosition; -@property (strong) NSString * text; -@property double gX; -@property double gY; -@property BOOL myPosition; +@property (nonatomic) NSString * text; +@property (nonatomic) double gX; +@property (nonatomic) double gY; +@property (nonatomic) BOOL myPosition; @end diff --git a/iphone/Maps/Classes/TwoButtonsView.h b/iphone/Maps/Classes/TwoButtonsView.h index b751015ffe..f2f2b43ac2 100644 --- a/iphone/Maps/Classes/TwoButtonsView.h +++ b/iphone/Maps/Classes/TwoButtonsView.h @@ -1,5 +1,7 @@ #import @interface TwoButtonsView : UIView --(id)initWithFrame:(CGRect)frame leftButtonSelector:(SEL)leftSel rightButtonSelector:(SEL)rightTitle leftButtonTitle:(NSString *)leftTitle rightButtontitle:(NSString *)rightTitle target:(id)target; + +- (id)initWithFrame:(CGRect)frame leftButtonSelector:(SEL)leftSel rightButtonSelector:(SEL)rightTitle leftButtonTitle:(NSString *)leftTitle rightButtontitle:(NSString *)rightTitle target:(id)target; + @end diff --git a/iphone/Maps/Classes/TwoButtonsView.m b/iphone/Maps/Classes/TwoButtonsView.m index 4ff4785127..4b3cd67324 100644 --- a/iphone/Maps/Classes/TwoButtonsView.m +++ b/iphone/Maps/Classes/TwoButtonsView.m @@ -4,13 +4,14 @@ @interface TwoButtonsView() -@property (nonatomic, retain) UIButton * leftButton; -@property (nonatomic, retain) UIButton * rightButton; +@property (nonatomic) UIButton * leftButton; +@property (nonatomic) UIButton * rightButton; + @end @implementation TwoButtonsView --(id)initWithFrame:(CGRect)frame leftButtonSelector:(SEL)leftSel rightButtonSelector:(SEL)rightSel leftButtonTitle:(NSString *)leftTitle rightButtontitle:(NSString *)rightTitle target:(id)target +- (id)initWithFrame:(CGRect)frame leftButtonSelector:(SEL)leftSel rightButtonSelector:(SEL)rightSel leftButtonTitle:(NSString *)leftTitle rightButtontitle:(NSString *)rightTitle target:(id)target { self = [super initWithFrame:frame]; if (self) @@ -33,7 +34,7 @@ return self; } --(void)layoutSubviews +- (void)layoutSubviews { [super layoutSubviews]; double const buttonWidth = (self.superview.bounds.size.width - 3 * MARGIN) / 2; @@ -41,10 +42,4 @@ [self.rightButton setFrame:CGRectMake(2 * MARGIN + buttonWidth, 0, buttonWidth, self.frame.size.height)]; } --(void)dealloc -{ - self.leftButton = nil; - self.rightButton = nil; - [super dealloc]; -} @end diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index e9a537a367..0defa907bd 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -25,118 +25,118 @@ 97387547184E475000170BC4 /* MessageComposeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97387545184E475000170BC4 /* MessageComposeViewController.m */; }; 9747264318323080006B7CB7 /* UIKitCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 9747264118323080006B7CB7 /* UIKitCategories.m */; }; 9747264418323080006B7CB7 /* UIKitCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 9747264118323080006B7CB7 /* UIKitCategories.m */; }; - 9747277B18328E65006B7CB7 /* SideToolbar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9747277818328E65006B7CB7 /* SideToolbar.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 9747277C18328E65006B7CB7 /* SideToolbar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9747277818328E65006B7CB7 /* SideToolbar.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 9747277D18328E65006B7CB7 /* SideToolbarCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9747277A18328E65006B7CB7 /* SideToolbarCell.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 9747277E18328E65006B7CB7 /* SideToolbarCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9747277A18328E65006B7CB7 /* SideToolbarCell.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 9747278418338F0C006B7CB7 /* UIViewController+Navigation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9747278318338F0C006B7CB7 /* UIViewController+Navigation.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 9747278518338F0C006B7CB7 /* UIViewController+Navigation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9747278318338F0C006B7CB7 /* UIViewController+Navigation.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; + 9747277B18328E65006B7CB7 /* SideToolbar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9747277818328E65006B7CB7 /* SideToolbar.mm */; }; + 9747277C18328E65006B7CB7 /* SideToolbar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9747277818328E65006B7CB7 /* SideToolbar.mm */; }; + 9747277D18328E65006B7CB7 /* SideToolbarCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9747277A18328E65006B7CB7 /* SideToolbarCell.m */; }; + 9747277E18328E65006B7CB7 /* SideToolbarCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9747277A18328E65006B7CB7 /* SideToolbarCell.m */; }; + 9747278418338F0C006B7CB7 /* UIViewController+Navigation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9747278318338F0C006B7CB7 /* UIViewController+Navigation.m */; }; + 9747278518338F0C006B7CB7 /* UIViewController+Navigation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9747278318338F0C006B7CB7 /* UIViewController+Navigation.m */; }; 97719D381843AE6F00BDD815 /* btn-zoom-in.png in Resources */ = {isa = PBXBuildFile; fileRef = 97719D361843AE6F00BDD815 /* btn-zoom-in.png */; }; 97719D391843AE6F00BDD815 /* btn-zoom-in.png in Resources */ = {isa = PBXBuildFile; fileRef = 97719D361843AE6F00BDD815 /* btn-zoom-in.png */; }; 97719D3A1843AE6F00BDD815 /* btn-zoom-out.png in Resources */ = {isa = PBXBuildFile; fileRef = 97719D371843AE6F00BDD815 /* btn-zoom-out.png */; }; 97719D3B1843AE6F00BDD815 /* btn-zoom-out.png in Resources */ = {isa = PBXBuildFile; fileRef = 97719D371843AE6F00BDD815 /* btn-zoom-out.png */; }; - 97719D3E1843AEAF00BDD815 /* BuyButtonCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97719D3D1843AEAF00BDD815 /* BuyButtonCell.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 97719D3F1843AEAF00BDD815 /* BuyButtonCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97719D3D1843AEAF00BDD815 /* BuyButtonCell.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 97719D421843AF1E00BDD815 /* ScopeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97719D411843AF1E00BDD815 /* ScopeView.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 97719D431843AF1E00BDD815 /* ScopeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97719D411843AF1E00BDD815 /* ScopeView.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; + 97719D3E1843AEAF00BDD815 /* BuyButtonCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97719D3D1843AEAF00BDD815 /* BuyButtonCell.mm */; }; + 97719D3F1843AEAF00BDD815 /* BuyButtonCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97719D3D1843AEAF00BDD815 /* BuyButtonCell.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 */; }; 97719D491843B6F700BDD815 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97719D471843B6F200BDD815 /* Security.framework */; }; 97719D4B1843B86700BDD815 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97719D4A1843B86700BDD815 /* Main_iPad.storyboard */; }; 97719D4C1843B86700BDD815 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97719D4A1843B86700BDD815 /* Main_iPad.storyboard */; }; - 978F9240183B660F000D6C7C /* SettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F9239183B660F000D6C7C /* SettingsViewController.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 978F9241183B660F000D6C7C /* SettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F9239183B660F000D6C7C /* SettingsViewController.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 978F9242183B660F000D6C7C /* SelectableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 978F923A183B660F000D6C7C /* SelectableCell.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 978F9243183B660F000D6C7C /* SelectableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 978F923A183B660F000D6C7C /* SelectableCell.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 978F9244183B660F000D6C7C /* SwitchCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 978F923B183B660F000D6C7C /* SwitchCell.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 978F9245183B660F000D6C7C /* SwitchCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 978F923B183B660F000D6C7C /* SwitchCell.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; + 978F9240183B660F000D6C7C /* SettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F9239183B660F000D6C7C /* SettingsViewController.mm */; }; + 978F9241183B660F000D6C7C /* SettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F9239183B660F000D6C7C /* SettingsViewController.mm */; }; + 978F9242183B660F000D6C7C /* SelectableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 978F923A183B660F000D6C7C /* SelectableCell.m */; }; + 978F9243183B660F000D6C7C /* SelectableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 978F923A183B660F000D6C7C /* SelectableCell.m */; }; + 978F9244183B660F000D6C7C /* SwitchCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 978F923B183B660F000D6C7C /* SwitchCell.m */; }; + 978F9245183B660F000D6C7C /* SwitchCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 978F923B183B660F000D6C7C /* SwitchCell.m */; }; 978F9247183B6671000D6C7C /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 978F9246183B6671000D6C7C /* Main_iPhone.storyboard */; }; 978F9248183B6671000D6C7C /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 978F9246183B6671000D6C7C /* Main_iPhone.storyboard */; }; 978F9253183BD530000D6C7C /* NavigationController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F9252183BD530000D6C7C /* NavigationController.mm */; }; 978F9254183BD530000D6C7C /* NavigationController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F9252183BD530000D6C7C /* NavigationController.mm */; }; - 97C9851E186AE3C500AF7E9E /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9851C186AE3C500AF7E9E /* Reachability.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 97C9851F186AE3C500AF7E9E /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9851C186AE3C500AF7E9E /* Reachability.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 97C98522186AE3CF00AF7E9E /* AppInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97C98520186AE3CF00AF7E9E /* AppInfo.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 97C98523186AE3CF00AF7E9E /* AppInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97C98520186AE3CF00AF7E9E /* AppInfo.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - 97C985F1186C487900AF7E9E /* MPGoogleAdMobBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98528186C487800AF7E9E /* MPGoogleAdMobBannerCustomEvent.m */; }; - 97C985F2186C487900AF7E9E /* MPGoogleAdMobInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9852A186C487800AF7E9E /* MPGoogleAdMobInterstitialCustomEvent.m */; }; + 97C9851E186AE3C500AF7E9E /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9851C186AE3C500AF7E9E /* Reachability.m */; }; + 97C9851F186AE3C500AF7E9E /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9851C186AE3C500AF7E9E /* Reachability.m */; }; + 97C98522186AE3CF00AF7E9E /* AppInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97C98520186AE3CF00AF7E9E /* AppInfo.mm */; }; + 97C98523186AE3CF00AF7E9E /* AppInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97C98520186AE3CF00AF7E9E /* AppInfo.mm */; }; + 97C985F1186C487900AF7E9E /* MPGoogleAdMobBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98528186C487800AF7E9E /* MPGoogleAdMobBannerCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C985F2186C487900AF7E9E /* MPGoogleAdMobInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9852A186C487800AF7E9E /* MPGoogleAdMobInterstitialCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 97C985F3186C487900AF7E9E /* libGoogleAdMobAds.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C98535186C487800AF7E9E /* libGoogleAdMobAds.a */; }; - 97C985F5186C487900AF7E9E /* MPiAdBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98539186C487800AF7E9E /* MPiAdBannerCustomEvent.m */; }; - 97C985F6186C487900AF7E9E /* MPiAdInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9853B186C487800AF7E9E /* MPiAdInterstitialCustomEvent.m */; }; - 97C985F7186C487900AF7E9E /* MPMillennialBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9853E186C487800AF7E9E /* MPMillennialBannerCustomEvent.m */; }; - 97C985F8186C487900AF7E9E /* MPMillennialInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98540186C487800AF7E9E /* MPMillennialInterstitialCustomEvent.m */; }; + 97C985F5186C487900AF7E9E /* MPiAdBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98539186C487800AF7E9E /* MPiAdBannerCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C985F6186C487900AF7E9E /* MPiAdInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9853B186C487800AF7E9E /* MPiAdInterstitialCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C985F7186C487900AF7E9E /* MPMillennialBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9853E186C487800AF7E9E /* MPMillennialBannerCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C985F8186C487900AF7E9E /* MPMillennialInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98540186C487800AF7E9E /* MPMillennialInterstitialCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 97C985F9186C487900AF7E9E /* libMMSDK_5.1.1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C98542186C487800AF7E9E /* libMMSDK_5.1.1.a */; }; 97C985FC186C487900AF7E9E /* SpeechKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C9854A186C487800AF7E9E /* SpeechKit.framework */; }; - 97C985FD186C487900AF7E9E /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9854E186C487800AF7E9E /* CDataScanner.m */; }; - 97C985FE186C487900AF7E9E /* CFilteringJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98551186C487800AF7E9E /* CFilteringJSONSerializer.m */; }; - 97C985FF186C487900AF7E9E /* CJSONDeserializer_BlocksExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98553186C487800AF7E9E /* CJSONDeserializer_BlocksExtensions.m */; }; - 97C98600186C487900AF7E9E /* CJSONSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98555186C487800AF7E9E /* CJSONSerialization.m */; }; - 97C98601186C487900AF7E9E /* CJSONSerializedData.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98557186C487800AF7E9E /* CJSONSerializedData.m */; }; - 97C98602186C487900AF7E9E /* CDataScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9855A186C487800AF7E9E /* CDataScanner_Extensions.m */; }; - 97C98603186C487900AF7E9E /* NSDictionary_JSONExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9855C186C487800AF7E9E /* NSDictionary_JSONExtensions.m */; }; - 97C98604186C487900AF7E9E /* CJSONDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9855F186C487800AF7E9E /* CJSONDeserializer.m */; }; - 97C98605186C487900AF7E9E /* CJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98561186C487800AF7E9E /* CJSONScanner.m */; }; - 97C98606186C487900AF7E9E /* CJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98563186C487800AF7E9E /* CJSONSerializer.m */; }; - 97C98609186C487900AF7E9E /* MPBannerAdManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9856A186C487800AF7E9E /* MPBannerAdManager.m */; }; - 97C9860A186C487900AF7E9E /* MPBannerCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9856D186C487800AF7E9E /* MPBannerCustomEventAdapter.m */; }; - 97C9860B186C487900AF7E9E /* MPBaseBannerAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9856F186C487800AF7E9E /* MPBaseBannerAdapter.m */; }; - 97C9860C186C487900AF7E9E /* MPLegacyBannerCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98571186C487800AF7E9E /* MPLegacyBannerCustomEventAdapter.m */; }; - 97C9860D186C487900AF7E9E /* MPAdAlertGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98576186C487800AF7E9E /* MPAdAlertGestureRecognizer.m */; }; - 97C9860E186C487900AF7E9E /* MPAdAlertManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98578186C487800AF7E9E /* MPAdAlertManager.m */; }; - 97C9860F186C487900AF7E9E /* MPAdBrowserController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9857A186C487800AF7E9E /* MPAdBrowserController.m */; }; + 97C985FD186C487900AF7E9E /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9854E186C487800AF7E9E /* CDataScanner.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C985FE186C487900AF7E9E /* CFilteringJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98551186C487800AF7E9E /* CFilteringJSONSerializer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C985FF186C487900AF7E9E /* CJSONDeserializer_BlocksExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98553186C487800AF7E9E /* CJSONDeserializer_BlocksExtensions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98600186C487900AF7E9E /* CJSONSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98555186C487800AF7E9E /* CJSONSerialization.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98601186C487900AF7E9E /* CJSONSerializedData.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98557186C487800AF7E9E /* CJSONSerializedData.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98602186C487900AF7E9E /* CDataScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9855A186C487800AF7E9E /* CDataScanner_Extensions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98603186C487900AF7E9E /* NSDictionary_JSONExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9855C186C487800AF7E9E /* NSDictionary_JSONExtensions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98604186C487900AF7E9E /* CJSONDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9855F186C487800AF7E9E /* CJSONDeserializer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98605186C487900AF7E9E /* CJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98561186C487800AF7E9E /* CJSONScanner.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98606186C487900AF7E9E /* CJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98563186C487800AF7E9E /* CJSONSerializer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98609186C487900AF7E9E /* MPBannerAdManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9856A186C487800AF7E9E /* MPBannerAdManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9860A186C487900AF7E9E /* MPBannerCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9856D186C487800AF7E9E /* MPBannerCustomEventAdapter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9860B186C487900AF7E9E /* MPBaseBannerAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9856F186C487800AF7E9E /* MPBaseBannerAdapter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9860C186C487900AF7E9E /* MPLegacyBannerCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98571186C487800AF7E9E /* MPLegacyBannerCustomEventAdapter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9860D186C487900AF7E9E /* MPAdAlertGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98576186C487800AF7E9E /* MPAdAlertGestureRecognizer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9860E186C487900AF7E9E /* MPAdAlertManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98578186C487800AF7E9E /* MPAdAlertManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9860F186C487900AF7E9E /* MPAdBrowserController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9857A186C487800AF7E9E /* MPAdBrowserController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 97C98610186C487900AF7E9E /* MPAdBrowserController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 97C9857B186C487800AF7E9E /* MPAdBrowserController.xib */; }; - 97C98611186C487900AF7E9E /* MPAdConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9857D186C487800AF7E9E /* MPAdConfiguration.m */; }; - 97C98612186C487900AF7E9E /* MPAdDestinationDisplayAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9857F186C487800AF7E9E /* MPAdDestinationDisplayAgent.m */; }; - 97C98613186C487900AF7E9E /* MPAdServerCommunicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98581186C487800AF7E9E /* MPAdServerCommunicator.m */; }; - 97C98614186C487900AF7E9E /* MPAdServerURLBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98583186C487800AF7E9E /* MPAdServerURLBuilder.m */; }; - 97C98615186C487900AF7E9E /* MPFacebookKeywordProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98585186C487800AF7E9E /* MPFacebookKeywordProvider.m */; }; - 97C98616186C487900AF7E9E /* MPLastResortDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98588186C487800AF7E9E /* MPLastResortDelegate.m */; }; - 97C98617186C487900AF7E9E /* MPProgressOverlayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9858A186C487800AF7E9E /* MPProgressOverlayView.m */; }; - 97C98618186C487900AF7E9E /* MPURLResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9858C186C487800AF7E9E /* MPURLResolver.m */; }; - 97C98619186C487900AF7E9E /* MPAdWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9858F186C487800AF7E9E /* MPAdWebView.m */; }; - 97C9861A186C487900AF7E9E /* MPAdWebViewAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98591186C487800AF7E9E /* MPAdWebViewAgent.m */; }; - 97C9861B186C487900AF7E9E /* MPHTMLBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98593186C487800AF7E9E /* MPHTMLBannerCustomEvent.m */; }; - 97C9861C186C487900AF7E9E /* MPHTMLInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98595186C487800AF7E9E /* MPHTMLInterstitialCustomEvent.m */; }; - 97C9861D186C487900AF7E9E /* MPHTMLInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98597186C487800AF7E9E /* MPHTMLInterstitialViewController.m */; }; - 97C9861E186C487900AF7E9E /* MPBaseInterstitialAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9859A186C487800AF7E9E /* MPBaseInterstitialAdapter.m */; }; - 97C9861F186C487900AF7E9E /* MPInterstitialAdManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9859C186C487800AF7E9E /* MPInterstitialAdManager.m */; }; - 97C98620186C487900AF7E9E /* MPInterstitialCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9859F186C487800AF7E9E /* MPInterstitialCustomEventAdapter.m */; }; - 97C98621186C487900AF7E9E /* MPInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985A1186C487800AF7E9E /* MPInterstitialViewController.m */; }; - 97C98622186C487900AF7E9E /* MPLegacyInterstitialCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985A3186C487800AF7E9E /* MPLegacyInterstitialCustomEventAdapter.m */; }; - 97C98623186C487900AF7E9E /* MPInstanceProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985A6186C487900AF7E9E /* MPInstanceProvider.m */; }; + 97C98611186C487900AF7E9E /* MPAdConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9857D186C487800AF7E9E /* MPAdConfiguration.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98612186C487900AF7E9E /* MPAdDestinationDisplayAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9857F186C487800AF7E9E /* MPAdDestinationDisplayAgent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98613186C487900AF7E9E /* MPAdServerCommunicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98581186C487800AF7E9E /* MPAdServerCommunicator.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98614186C487900AF7E9E /* MPAdServerURLBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98583186C487800AF7E9E /* MPAdServerURLBuilder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98615186C487900AF7E9E /* MPFacebookKeywordProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98585186C487800AF7E9E /* MPFacebookKeywordProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98616186C487900AF7E9E /* MPLastResortDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98588186C487800AF7E9E /* MPLastResortDelegate.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98617186C487900AF7E9E /* MPProgressOverlayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9858A186C487800AF7E9E /* MPProgressOverlayView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98618186C487900AF7E9E /* MPURLResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9858C186C487800AF7E9E /* MPURLResolver.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98619186C487900AF7E9E /* MPAdWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9858F186C487800AF7E9E /* MPAdWebView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9861A186C487900AF7E9E /* MPAdWebViewAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98591186C487800AF7E9E /* MPAdWebViewAgent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9861B186C487900AF7E9E /* MPHTMLBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98593186C487800AF7E9E /* MPHTMLBannerCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9861C186C487900AF7E9E /* MPHTMLInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98595186C487800AF7E9E /* MPHTMLInterstitialCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9861D186C487900AF7E9E /* MPHTMLInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C98597186C487800AF7E9E /* MPHTMLInterstitialViewController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9861E186C487900AF7E9E /* MPBaseInterstitialAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9859A186C487800AF7E9E /* MPBaseInterstitialAdapter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9861F186C487900AF7E9E /* MPInterstitialAdManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9859C186C487800AF7E9E /* MPInterstitialAdManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98620186C487900AF7E9E /* MPInterstitialCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C9859F186C487800AF7E9E /* MPInterstitialCustomEventAdapter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98621186C487900AF7E9E /* MPInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985A1186C487800AF7E9E /* MPInterstitialViewController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98622186C487900AF7E9E /* MPLegacyInterstitialCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985A3186C487800AF7E9E /* MPLegacyInterstitialCustomEventAdapter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98623186C487900AF7E9E /* MPInstanceProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985A6186C487900AF7E9E /* MPInstanceProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 97C98624186C487900AF7E9E /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 97C985A8186C487900AF7E9E /* LICENSE */; }; - 97C98625186C487900AF7E9E /* MPMRAIDBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985AA186C487900AF7E9E /* MPMRAIDBannerCustomEvent.m */; }; - 97C98626186C487900AF7E9E /* MPMRAIDInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985AC186C487900AF7E9E /* MPMRAIDInterstitialCustomEvent.m */; }; - 97C98627186C487900AF7E9E /* MPMRAIDInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985AE186C487900AF7E9E /* MPMRAIDInterstitialViewController.m */; }; - 97C98628186C487900AF7E9E /* MRAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985B1186C487900AF7E9E /* MRAdView.m */; }; - 97C98629186C487900AF7E9E /* MRAdViewDisplayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985B3186C487900AF7E9E /* MRAdViewDisplayController.m */; }; - 97C9862A186C487900AF7E9E /* MRBundleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985B5186C487900AF7E9E /* MRBundleManager.m */; }; - 97C9862B186C487900AF7E9E /* MRCalendarManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985B7186C487900AF7E9E /* MRCalendarManager.m */; }; - 97C9862C186C487900AF7E9E /* MRCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985B9186C487900AF7E9E /* MRCommand.m */; }; - 97C9862D186C487900AF7E9E /* MRDimmingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985BB186C487900AF7E9E /* MRDimmingView.m */; }; - 97C9862E186C487900AF7E9E /* MRImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985BD186C487900AF7E9E /* MRImageDownloader.m */; }; - 97C9862F186C487900AF7E9E /* MRJavaScriptEventEmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985BF186C487900AF7E9E /* MRJavaScriptEventEmitter.m */; }; - 97C98630186C487900AF7E9E /* MRPictureManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985C1186C487900AF7E9E /* MRPictureManager.m */; }; - 97C98631186C487900AF7E9E /* MRProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985C3186C487900AF7E9E /* MRProperty.m */; }; - 97C98632186C487900AF7E9E /* MRVideoPlayerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985C5186C487900AF7E9E /* MRVideoPlayerManager.m */; }; - 97C98633186C487900AF7E9E /* NSURL+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985C9186C487900AF7E9E /* NSURL+MPAdditions.m */; }; - 97C98634186C487900AF7E9E /* UIViewController+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985CB186C487900AF7E9E /* UIViewController+MPAdditions.m */; }; - 97C98635186C487900AF7E9E /* UIWebView+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985CD186C487900AF7E9E /* UIWebView+MPAdditions.m */; }; - 97C98636186C487900AF7E9E /* MPAnalyticsTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985CF186C487900AF7E9E /* MPAnalyticsTracker.m */; }; - 97C98637186C487900AF7E9E /* MPError.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985D1186C487900AF7E9E /* MPError.m */; }; - 97C98638186C487900AF7E9E /* MPGlobal.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985D3186C487900AF7E9E /* MPGlobal.m */; }; - 97C98639186C487900AF7E9E /* MPIdentityProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985D5186C487900AF7E9E /* MPIdentityProvider.m */; }; - 97C9863A186C487900AF7E9E /* MPLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985D7186C487900AF7E9E /* MPLogging.m */; }; - 97C9863B186C487900AF7E9E /* MPReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985D9186C487900AF7E9E /* MPReachability.m */; }; - 97C9863C186C487900AF7E9E /* MPSessionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985DB186C487900AF7E9E /* MPSessionTracker.m */; }; - 97C9863D186C487900AF7E9E /* MPStoreKitProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985DD186C487900AF7E9E /* MPStoreKitProvider.m */; }; - 97C9863E186C487900AF7E9E /* MPTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985DF186C487900AF7E9E /* MPTimer.m */; }; - 97C9863F186C487900AF7E9E /* MPAdConversionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985E1186C487900AF7E9E /* MPAdConversionTracker.m */; }; - 97C98640186C487900AF7E9E /* MPAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985E3186C487900AF7E9E /* MPAdView.m */; }; - 97C98641186C487900AF7E9E /* MPBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985E5186C487900AF7E9E /* MPBannerCustomEvent.m */; }; - 97C98642186C487900AF7E9E /* MPInterstitialAdController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985E9186C487900AF7E9E /* MPInterstitialAdController.m */; }; - 97C98643186C487900AF7E9E /* MPInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985EB186C487900AF7E9E /* MPInterstitialCustomEvent.m */; }; + 97C98625186C487900AF7E9E /* MPMRAIDBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985AA186C487900AF7E9E /* MPMRAIDBannerCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98626186C487900AF7E9E /* MPMRAIDInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985AC186C487900AF7E9E /* MPMRAIDInterstitialCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98627186C487900AF7E9E /* MPMRAIDInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985AE186C487900AF7E9E /* MPMRAIDInterstitialViewController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98628186C487900AF7E9E /* MRAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985B1186C487900AF7E9E /* MRAdView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98629186C487900AF7E9E /* MRAdViewDisplayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985B3186C487900AF7E9E /* MRAdViewDisplayController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9862A186C487900AF7E9E /* MRBundleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985B5186C487900AF7E9E /* MRBundleManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9862B186C487900AF7E9E /* MRCalendarManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985B7186C487900AF7E9E /* MRCalendarManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9862C186C487900AF7E9E /* MRCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985B9186C487900AF7E9E /* MRCommand.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9862D186C487900AF7E9E /* MRDimmingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985BB186C487900AF7E9E /* MRDimmingView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9862E186C487900AF7E9E /* MRImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985BD186C487900AF7E9E /* MRImageDownloader.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9862F186C487900AF7E9E /* MRJavaScriptEventEmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985BF186C487900AF7E9E /* MRJavaScriptEventEmitter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98630186C487900AF7E9E /* MRPictureManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985C1186C487900AF7E9E /* MRPictureManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98631186C487900AF7E9E /* MRProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985C3186C487900AF7E9E /* MRProperty.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98632186C487900AF7E9E /* MRVideoPlayerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985C5186C487900AF7E9E /* MRVideoPlayerManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98633186C487900AF7E9E /* NSURL+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985C9186C487900AF7E9E /* NSURL+MPAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98634186C487900AF7E9E /* UIViewController+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985CB186C487900AF7E9E /* UIViewController+MPAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98635186C487900AF7E9E /* UIWebView+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985CD186C487900AF7E9E /* UIWebView+MPAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98636186C487900AF7E9E /* MPAnalyticsTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985CF186C487900AF7E9E /* MPAnalyticsTracker.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98637186C487900AF7E9E /* MPError.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985D1186C487900AF7E9E /* MPError.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98638186C487900AF7E9E /* MPGlobal.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985D3186C487900AF7E9E /* MPGlobal.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98639186C487900AF7E9E /* MPIdentityProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985D5186C487900AF7E9E /* MPIdentityProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9863A186C487900AF7E9E /* MPLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985D7186C487900AF7E9E /* MPLogging.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9863B186C487900AF7E9E /* MPReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985D9186C487900AF7E9E /* MPReachability.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9863C186C487900AF7E9E /* MPSessionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985DB186C487900AF7E9E /* MPSessionTracker.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9863D186C487900AF7E9E /* MPStoreKitProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985DD186C487900AF7E9E /* MPStoreKitProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9863E186C487900AF7E9E /* MPTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985DF186C487900AF7E9E /* MPTimer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C9863F186C487900AF7E9E /* MPAdConversionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985E1186C487900AF7E9E /* MPAdConversionTracker.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98640186C487900AF7E9E /* MPAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985E3186C487900AF7E9E /* MPAdView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98641186C487900AF7E9E /* MPBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985E5186C487900AF7E9E /* MPBannerCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98642186C487900AF7E9E /* MPInterstitialAdController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985E9186C487900AF7E9E /* MPInterstitialAdController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 97C98643186C487900AF7E9E /* MPInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C985EB186C487900AF7E9E /* MPInterstitialCustomEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 97C98644186C487900AF7E9E /* MPCloseButtonX.png in Resources */ = {isa = PBXBuildFile; fileRef = 97C985EE186C487900AF7E9E /* MPCloseButtonX.png */; }; 97C98645186C487900AF7E9E /* MPCloseButtonX@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 97C985EF186C487900AF7E9E /* MPCloseButtonX@2x.png */; }; 97C98646186C487900AF7E9E /* MRAID.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 97C985F0186C487900AF7E9E /* MRAID.bundle */; }; @@ -174,8 +174,8 @@ 97F61782183E6172009919E2 /* LocationButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97F6177F183E6172009919E2 /* LocationButton.mm */; }; 97F61794183E7445009919E2 /* LinkCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 97F61793183E7445009919E2 /* LinkCell.m */; }; 97F61795183E7445009919E2 /* LinkCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 97F61793183E7445009919E2 /* LinkCell.m */; }; - CB252D6F16FF82C9001E41E9 /* Statistics.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB252D6C16FF82C8001E41E9 /* Statistics.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - CB252D7016FF82C9001E41E9 /* Statistics.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB252D6C16FF82C8001E41E9 /* Statistics.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; + CB252D6F16FF82C9001E41E9 /* Statistics.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB252D6C16FF82C8001E41E9 /* Statistics.mm */; }; + CB252D7016FF82C9001E41E9 /* Statistics.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB252D6C16FF82C8001E41E9 /* Statistics.mm */; }; ED3B8DB4182CD96F001F124F /* libFlurry_4.3.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ED3B8DB3182CD96F001F124F /* libFlurry_4.3.0.a */; }; ED3B8DB5182CD96F001F124F /* libFlurry_4.3.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ED3B8DB3182CD96F001F124F /* libFlurry_4.3.0.a */; }; ED48BBB117BE6EA8003E7E92 /* MWMApi.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED48BBB017BE6EA8003E7E92 /* MWMApi.mm */; }; @@ -198,8 +198,8 @@ EDB811A4175E1A9C00E36BF2 /* TwoButtonsView.m in Sources */ = {isa = PBXBuildFile; fileRef = EDB811A2175E1A9C00E36BF2 /* TwoButtonsView.m */; }; EDBB18B816972B0600AF0742 /* libzlib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EDBB18B716972B0600AF0742 /* libzlib.a */; }; EDBB18B916972B3000AF0742 /* libzlib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EDBB18B716972B0600AF0742 /* libzlib.a */; }; - EDC5C543175F2CA600420E92 /* ShareActionSheet.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDC5C542175F2CA600420E92 /* ShareActionSheet.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; - EDC5C544175F2CA600420E92 /* ShareActionSheet.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDC5C542175F2CA600420E92 /* ShareActionSheet.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; + EDC5C543175F2CA600420E92 /* ShareActionSheet.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDC5C542175F2CA600420E92 /* ShareActionSheet.mm */; }; + EDC5C544175F2CA600420E92 /* ShareActionSheet.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDC5C542175F2CA600420E92 /* ShareActionSheet.mm */; }; EDCB4E8E175E67120005AA35 /* PlacePreviewViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDCB4E8D175E67110005AA35 /* PlacePreviewViewController.mm */; }; EDCB4E8F175E67120005AA35 /* PlacePreviewViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDCB4E8D175E67110005AA35 /* PlacePreviewViewController.mm */; }; EDF924DB183380CE00539672 /* FacebookSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDF924DA183380CE00539672 /* FacebookSDK.framework */; }; @@ -226,7 +226,7 @@ EEA61604134C496A003A9827 /* 04_padauk.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EEA615E8134C4968003A9827 /* 04_padauk.ttf */; }; EEA61605134C496A003A9827 /* 05_khmeros.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EEA615E9134C4968003A9827 /* 05_khmeros.ttf */; }; EEB7E22211E9079400080A68 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEB7E22111E9079400080A68 /* CoreLocation.framework */; }; - EED10A4511F78D120095FAD4 /* MapViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = EED10A4411F78D120095FAD4 /* MapViewController.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; + EED10A4511F78D120095FAD4 /* MapViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = EED10A4411F78D120095FAD4 /* MapViewController.mm */; }; EEF5745512DE1AD50082F472 /* libfribidi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EEF5745412DE1AD50082F472 /* libfribidi.a */; }; EEFC0BBF12B5656A002914FF /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EE12020311CD464100ABDD5D /* libfreetype.a */; }; EEFE7C1412F8C9E1006AF8C3 /* fonts_blacklist.txt in Resources */ = {isa = PBXBuildFile; fileRef = EEFE7C1212F8C9E1006AF8C3 /* fonts_blacklist.txt */; }; @@ -273,7 +273,7 @@ FA054612155C465E001F4E37 /* SelectSetVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA054611155C465E001F4E37 /* SelectSetVC.mm */; }; FA054613155C465E001F4E37 /* SelectSetVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA054611155C465E001F4E37 /* SelectSetVC.mm */; }; FA065FED128614C400FEA989 /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA065FEC128614C400FEA989 /* MainWindow-iPad.xib */; }; - FA09E01113F71F6C007E69CA /* SearchVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA09E01013F71F6C007E69CA /* SearchVC.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; + FA09E01113F71F6C007E69CA /* SearchVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA09E01013F71F6C007E69CA /* SearchVC.mm */; }; FA140651162A6288002BC1ED /* empty@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA14064D162A6288002BC1ED /* empty@2x.png */; }; FA140652162A6288002BC1ED /* empty@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA14064D162A6288002BC1ED /* empty@2x.png */; }; FA140653162A6288002BC1ED /* empty.png in Resources */ = {isa = PBXBuildFile; fileRef = FA14064E162A6288002BC1ED /* empty.png */; }; @@ -1358,14 +1358,14 @@ FAFB08E9151215EE0041901D /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.mm */; }; FAFB08EA151215EE0041901D /* MapsAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* MapsAppDelegate.mm */; }; FAFB08EB151215EE0041901D /* EAGLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46F26CD710F623BA00ECCA39 /* EAGLView.mm */; }; - FAFB08EC151215EE0041901D /* MapViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = EED10A4411F78D120095FAD4 /* MapViewController.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; + FAFB08EC151215EE0041901D /* MapViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = EED10A4411F78D120095FAD4 /* MapViewController.mm */; }; FAFB08ED151215EE0041901D /* CountriesViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA4135E2120A263C0062D5B4 /* CountriesViewController.mm */; }; FAFB08EE151215EE0041901D /* SettingsManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA4135E7120A263C0062D5B4 /* SettingsManager.mm */; }; FAFB08EF151215EE0041901D /* RenderBuffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = EE7F297D1219ECA300EB67A9 /* RenderBuffer.mm */; }; 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 */; }; - FAFB08F3151215EE0041901D /* SearchVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA09E01013F71F6C007E69CA /* SearchVC.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; + FAFB08F3151215EE0041901D /* SearchVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA09E01013F71F6C007E69CA /* SearchVC.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 */; }; @@ -5207,6 +5207,7 @@ ARCHS = i386; BUNDLE_IDENTIFIER = com.mapswithme.travelguide.simulator; CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_ENABLE_OBJC_ARC = YES; COMPRESS_PNG_FILES = NO; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 2.6.1; @@ -5248,6 +5249,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_IDENTIFIER = com.mapswithme.travelguide; CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_IDENTITY = "iPhone Distribution"; COMPRESS_PNG_FILES = NO; COPY_PHASE_STRIP = YES; @@ -5318,6 +5320,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_IDENTIFIER = com.mapswithme.travelguide.debug; CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; COMPRESS_PNG_FILES = NO; COPY_PHASE_STRIP = NO; @@ -5384,6 +5387,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_IDENTIFIER = com.mapswithme.travelguide.beta; CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_IDENTITY = "iPhone Distribution"; COMPRESS_PNG_FILES = NO; COPY_PHASE_STRIP = YES; @@ -5455,6 +5459,7 @@ ARCHS = i386; BUNDLE_IDENTIFIER = com.mapswithme.full.simulator; CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_ENABLE_OBJC_ARC = YES; COMPRESS_PNG_FILES = NO; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 2.6.1; @@ -5520,6 +5525,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_IDENTIFIER = com.mapswithme.full.debug; CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; COMPRESS_PNG_FILES = NO; COPY_PHASE_STRIP = NO; @@ -5586,6 +5592,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_IDENTIFIER = com.mapswithme.full.beta; CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_IDENTITY = "iPhone Distribution"; COMPRESS_PNG_FILES = NO; COPY_PHASE_STRIP = YES; @@ -5656,6 +5663,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_IDENTIFIER = com.mapswithme.full; CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_IDENTITY = "iPhone Distribution"; COMPRESS_PNG_FILES = NO; COPY_PHASE_STRIP = YES; @@ -5726,6 +5734,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_IDENTIFIER = com.mapswithme.travelguide.release; CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; COMPRESS_PNG_FILES = NO; COPY_PHASE_STRIP = NO; @@ -5795,6 +5804,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_IDENTIFIER = com.mapswithme.full.release; CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; COMPRESS_PNG_FILES = NO; COPY_PHASE_STRIP = NO; @@ -5865,6 +5875,7 @@ ARCHS = i386; BUNDLE_IDENTIFIER = com.mapswithme.full.simulator.release; CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_ENABLE_OBJC_ARC = YES; COMPRESS_PNG_FILES = NO; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 2.6.1; diff --git a/iphone/Maps/Platform/LocationManager.h b/iphone/Maps/Platform/LocationManager.h index a9877bb93e..e9bf37484a 100644 --- a/iphone/Maps/Platform/LocationManager.h +++ b/iphone/Maps/Platform/LocationManager.h @@ -37,4 +37,5 @@ + (NSString *)formatDistance:(double)meters; - (bool)lastLocationIsValid; + @end diff --git a/iphone/Maps/Platform/LocationManager.mm b/iphone/Maps/Platform/LocationManager.mm index bc7caf1f1c..31d6e85af1 100644 --- a/iphone/Maps/Platform/LocationManager.mm +++ b/iphone/Maps/Platform/LocationManager.mm @@ -24,19 +24,14 @@ m_lastLocationTime = nil; m_isCourse = NO; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged) name:UIDeviceOrientationDidChangeNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged) name:UIDeviceOrientationDidChangeNotification object:nil]; } return self; } - (void)dealloc { - [m_observers release]; - [m_locationManager release]; - [m_lastLocationTime release]; [[NSNotificationCenter defaultCenter] removeObserver:self]; - - [super dealloc]; } - (void)start:(id )observer @@ -53,18 +48,18 @@ switch (authStatus) { - case kCLAuthorizationStatusAuthorized: - case kCLAuthorizationStatusNotDetermined: - [m_locationManager startUpdatingLocation]; - if ([CLLocationManager headingAvailable]) - [m_locationManager startUpdatingHeading]; - m_isStarted = YES; - [m_observers addObject:observer]; - break; - case kCLAuthorizationStatusRestricted: - case kCLAuthorizationStatusDenied: - [observer onLocationError:location::EDenied]; - break; + case kCLAuthorizationStatusAuthorized: + case kCLAuthorizationStatusNotDetermined: + [m_locationManager startUpdatingLocation]; + if ([CLLocationManager headingAvailable]) + [m_locationManager startUpdatingHeading]; + m_isStarted = YES; + [m_observers addObject:observer]; + break; + case kCLAuthorizationStatusRestricted: + case kCLAuthorizationStatusDenied: + [observer onLocationError:location::EDenied]; + break; } } else @@ -132,8 +127,7 @@ return; // Save current device time for location. - [m_lastLocationTime release]; - m_lastLocationTime = [[NSDate date] retain]; + m_lastLocationTime = [NSDate date]; location::GpsInfo newInfo; [self location:newLocation toGpsInfo:newInfo]; @@ -224,7 +218,7 @@ { if (meters < 0.) return nil; - + string s; MeasurementUtils::FormatDistance(meters, s); return [NSString stringWithUTF8String:s.c_str()]; @@ -232,15 +226,15 @@ - (bool)lastLocationIsValid { - return (([self lastLocation] != nil) && ([m_lastLocationTime timeIntervalSinceNow] > -300.0)); + return (([self lastLocation] != nil) && ([m_lastLocationTime timeIntervalSinceNow] > -300.0)); } --(void)orientationChanged +- (void)orientationChanged { m_locationManager.headingOrientation = (CLDeviceOrientation)[UIDevice currentDevice].orientation; } --(void)notifyCompassUpdate:(location::CompassInfo const &)newInfo +- (void)notifyCompassUpdate:(location::CompassInfo const &)newInfo { for (id observer in m_observers) if ([observer respondsToSelector:@selector(onCompassUpdate:)]) diff --git a/iphone/Maps/Settings/CountriesViewController.h b/iphone/Maps/Settings/CountriesViewController.h index 2c3fe0f984..be99bdb165 100644 --- a/iphone/Maps/Settings/CountriesViewController.h +++ b/iphone/Maps/Settings/CountriesViewController.h @@ -15,10 +15,10 @@ UITableViewCell * m_clickedCell; } -- (id) initWithIndex: (storage::TIndex const &) index andHeader: (NSString *) header; +- (id)initWithIndex:(storage::TIndex const &)index andHeader:(NSString *)header; -- (void) OnCountryChange: (storage::TIndex const &) index; -- (void) OnDownload: (storage::TIndex const &) index withProgress: (pair const &) progress; -- (void) TryDownloadCountry; +- (void)OnCountryChange:(storage::TIndex const &)index; +- (void)OnDownload:(storage::TIndex const &)index withProgress:(pair const &)progress; +- (void)TryDownloadCountry; @end diff --git a/iphone/Maps/Settings/CountriesViewController.mm b/iphone/Maps/Settings/CountriesViewController.mm index fa20a5ea44..84b52b5fa8 100644 --- a/iphone/Maps/Settings/CountriesViewController.mm +++ b/iphone/Maps/Settings/CountriesViewController.mm @@ -72,12 +72,12 @@ static bool getGuideName(string & name, storage::TIndex const & index) @implementation CountriesViewController -- (void) onCloseButton:(id)sender +- (void)onCloseButton:(id)sender { [[[MapsAppDelegate theApp] settingsManager] hide]; } -- (id) initWithIndex: (TIndex const &) index andHeader: (NSString *)header +- (id)initWithIndex:(TIndex const &)index andHeader:(NSString *)header { m_index = index; if ((self = [super initWithNibName:nil bundle:nil])) @@ -88,7 +88,7 @@ static bool getGuideName(string & name, storage::TIndex const & index) return self; } -- (void) loadView +- (void)loadView { CGRect appRect = [UIScreen mainScreen].applicationFrame; UITableView * countriesTableView = [[UITableView alloc] initWithFrame:appRect style:UITableViewStylePlain]; @@ -96,11 +96,10 @@ static bool getGuideName(string & name, storage::TIndex const & index) countriesTableView.delegate = self; countriesTableView.dataSource = self; self.view = countriesTableView; - [countriesTableView release]; } // Override to allow orientations other than the default portrait orientation. -- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } @@ -119,12 +118,12 @@ static bool getGuideName(string & name, storage::TIndex const & index) } } -- (NSInteger) tableView: (UITableView *)tableView numberOfRowsInSection: (NSInteger)section +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return GetFramework().Storage().CountriesCount(m_index); } -- (NSString *) GetStringForSize: (size_t)size +- (NSString *)GetStringForSize: (size_t)size { if (size > MB) { @@ -139,7 +138,7 @@ static bool getGuideName(string & name, storage::TIndex const & index) } // @TODO Refactor UI to use good icon for "zoom to the country" action -- (UITableViewCellAccessoryType) getZoomIconType +- (UITableViewCellAccessoryType)getZoomIconType { static const UITableViewCellAccessoryType iconType = [UIDevice currentDevice].systemVersion.floatValue < 7.0 ? UITableViewCellAccessoryDetailDisclosureButton @@ -147,7 +146,7 @@ static bool getGuideName(string & name, storage::TIndex const & index) return iconType; } -- (void) UpdateCell:(UITableViewCell *)cell forCountry:(TIndex const &)countryIndex +- (void)UpdateCell:(UITableViewCell *)cell forCountry:(TIndex const &)countryIndex { cell.accessoryView = nil; @@ -166,8 +165,8 @@ static bool getGuideName(string & name, storage::TIndex const & index) [v removeFromSuperview]; if ((s.CountriesCount(countryIndex) == 0) && frm.GetGuideInfo(countryIndex, info)) { - UIImageView * im = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ic_guide_mark"]] autorelease]; - UIView * v = [[[UIView alloc] initWithFrame:im.frame] autorelease]; + UIImageView * im = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ic_guide_mark"]]; + UIView * v = [[UIView alloc] initWithFrame:im.frame]; [v addSubview:im]; v.tag = BAG_TAG; CGRect r = v.frame; @@ -178,7 +177,7 @@ static bool getGuideName(string & name, storage::TIndex const & index) } // do not show status for parent categories - if (![cell.reuseIdentifier isEqual: @"ParentCell"]) + if (![cell.reuseIdentifier isEqual:@"ParentCell"]) { storage::TStatus const st = frm.GetCountryStatus(countryIndex); switch (st) @@ -216,7 +215,6 @@ static bool getGuideName(string & name, storage::TIndex const & index) initWithActivityIndicatorStyle: UIActivityIndicatorViewStyleGray]; cell.accessoryView = indicator; [indicator startAnimating]; - [indicator release]; break; } @@ -247,7 +245,7 @@ static bool getGuideName(string & name, storage::TIndex const & index) } // Customize the appearance of table view cells. -- (UITableViewCell *) tableView: (UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { TIndex index = CalculateIndex(m_index, indexPath); storage::Storage & s = GetFramework().Storage(); @@ -258,9 +256,9 @@ static bool getGuideName(string & name, storage::TIndex const & index) if (cell == nil) { if (hasChildren) - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId]; else - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellId] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellId]; } if (hasChildren) @@ -274,7 +272,7 @@ static bool getGuideName(string & name, storage::TIndex const & index) return cell; } -- (void) actionSheet: (UIActionSheet *) actionSheet clickedButtonAtIndex: (NSInteger) buttonIndex +- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex != actionSheet.cancelButtonIndex) { @@ -312,13 +310,13 @@ static bool getGuideName(string & name, storage::TIndex const & index) } } -- (void) DoDownloadCountry +- (void)DoDownloadCountry { GetFramework().Storage().DownloadCountry(m_clickedIndex); } // 3G warning confirmation handler -- (void) alertView: (UIAlertView *)alertView didDismissWithButtonIndex: (NSInteger)buttonIndex +- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { if (buttonIndex != alertView.cancelButtonIndex) { @@ -328,16 +326,17 @@ static bool getGuideName(string & name, storage::TIndex const & index) - (void) TryDownloadCountry { - NSString * countryName = [[m_clickedCell textLabel] text]; + NSString * countryName = m_clickedCell.textLabel.text; if (FreeDiskSpaceInBytes() < (m_downloadSize + MB)) { // No enough disk space - display warning dialog - [[[[CustomAlertView alloc] initWithTitle:NSLocalizedString(@"not_enough_disk_space", nil) - message:[NSString stringWithFormat:NSLocalizedString(@"free_space_for_country", nil), [self GetStringForSize: m_downloadSize], countryName] + NSString * message = [NSString stringWithFormat:NSLocalizedString(@"free_space_for_country", nil), [self GetStringForSize: m_downloadSize], countryName]; + [[[CustomAlertView alloc] initWithTitle:NSLocalizedString(@"not_enough_disk_space", nil) + message:message delegate:nil cancelButtonTitle:NSLocalizedString(@"ok", nil) - otherButtonTitles:nil] autorelease] show]; + otherButtonTitles:nil] show]; } else { @@ -345,23 +344,22 @@ static bool getGuideName(string & name, storage::TIndex const & index) if (![reachability isReachable]) { // No any connection - skip downloading - [[[[CustomAlertView alloc] initWithTitle:NSLocalizedString(@"no_internet_connection_detected", nil) + [[[CustomAlertView alloc] initWithTitle:NSLocalizedString(@"no_internet_connection_detected", nil) message:NSLocalizedString(@"use_wifi_recommendation_text", nil) delegate:nil cancelButtonTitle:NSLocalizedString(@"ok", nil) - otherButtonTitles:nil] autorelease] show]; + otherButtonTitles:nil] show]; } else { if ([reachability isReachableViaWWAN] && m_downloadSize > MAX_3G_MEGABYTES * MB) { // If user uses 3G, show warning before downloading - [[[[CustomAlertView alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@"no_wifi_ask_cellular_download", nil), countryName] + [[[CustomAlertView alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@"no_wifi_ask_cellular_download", nil), countryName] message:nil delegate:self cancelButtonTitle:NSLocalizedString(@"cancel", nil) - otherButtonTitles:NSLocalizedString(@"use_cellular_data", nil), - nil] autorelease] show]; + otherButtonTitles:NSLocalizedString(@"use_cellular_data", nil), nil] show]; } else [self DoDownloadCountry]; @@ -369,10 +367,10 @@ static bool getGuideName(string & name, storage::TIndex const & index) } } -- (void) tableView: (UITableView *)tableView didSelectRowAtIndexPath: (NSIndexPath *)indexPath +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // deselect the current row (don't keep the table selection persistent) - [tableView deselectRowAtIndexPath: indexPath animated:YES]; + [tableView deselectRowAtIndexPath:indexPath animated:YES]; UITableViewCell * cell = [tableView cellForRowAtIndexPath: indexPath]; // Push the new table view on the stack @@ -382,15 +380,14 @@ static bool getGuideName(string & name, storage::TIndex const & index) if (s.CountriesCount(index)) { - CountriesViewController * newController = [[CountriesViewController alloc] initWithIndex: index andHeader: cell.textLabel.text]; + CountriesViewController * newController = [[CountriesViewController alloc] initWithIndex:index andHeader:cell.textLabel.text]; [self.navigationController pushViewController:newController animated:YES]; - [newController release]; } else [self createActionSheetForCountry:indexPath]; } -- (void) OnCountryChange: (TIndex const &)index +- (void)OnCountryChange:(TIndex const &)index { if (IsOurIndex(index, m_index)) { @@ -402,7 +399,7 @@ static bool getGuideName(string & name, storage::TIndex const & index) } } -- (void) OnDownload:(TIndex const &)index withProgress:(pair const &)progress +- (void)OnDownload:(TIndex const &)index withProgress:(pair const &)progress { if (IsOurIndex(index, m_index)) { @@ -414,7 +411,7 @@ static bool getGuideName(string & name, storage::TIndex const & index) } } --(void)createActionSheetForCountry:(NSIndexPath *)indexPath +- (void)createActionSheetForCountry:(NSIndexPath *)indexPath { UITableView * table = (UITableView *)(self.view); UITableViewCell * cell = [table cellForRowAtIndexPath:indexPath]; @@ -426,7 +423,7 @@ static bool getGuideName(string & name, storage::TIndex const & index) storage::Storage & s = GetFramework().Storage(); m_downloadSize = s.CountrySizeInBytes(m_clickedIndex).second; - NSMutableArray * buttonNames = [[[NSMutableArray alloc] init] autorelease]; + NSMutableArray * buttonNames = [[NSMutableArray alloc] init]; bool canDelete = NO; @@ -440,10 +437,10 @@ static bool getGuideName(string & name, storage::TIndex const & index) case EOnDiskOutOfDate: canDelete = YES; - [buttonNames addObject:[NSString stringWithFormat:NSLocalizedString(@"update_mb_or_kb", nil), [self GetStringForSize: m_downloadSize]]]; + [buttonNames addObject:[NSString stringWithFormat:NSLocalizedString(@"update_mb_or_kb", nil), [self GetStringForSize:m_downloadSize]]]; break; case ENotDownloaded: - [buttonNames addObject:[NSString stringWithFormat:NSLocalizedString(@"download_mb_or_kb", nil), [self GetStringForSize: m_downloadSize]]]; + [buttonNames addObject:[NSString stringWithFormat:NSLocalizedString(@"download_mb_or_kb", nil), [self GetStringForSize:m_downloadSize]]]; break; case EDownloadFailed: @@ -457,11 +454,12 @@ static bool getGuideName(string & name, storage::TIndex const & index) NSString * guideAd = nil; if (getGuideName(guideAdevertiseString, m_clickedIndex)) guideAd = [NSString stringWithUTF8String:guideAdevertiseString.c_str()]; - UIActionSheet * actionSheet = [[[UIActionSheet alloc] initWithTitle:cell.textLabel.text delegate:self - cancelButtonTitle: NSLocalizedString(@"do_nothing", nil) - destructiveButtonTitle: NSLocalizedString(@"cancel_download", nil) - otherButtonTitles: guideAd, nil] autorelease]; - [actionSheet showFromRect:[cell frame] inView:table animated:YES]; + UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle:cell.textLabel.text + delegate:self + cancelButtonTitle:NSLocalizedString(@"do_nothing", nil) + destructiveButtonTitle:NSLocalizedString(@"cancel_download", nil) + otherButtonTitles:guideAd, nil]; + [actionSheet showFromRect:cell.frame inView:table animated:YES]; return; } @@ -475,12 +473,11 @@ static bool getGuideName(string & name, storage::TIndex const & index) ASSERT ( false, () ); } - UIActionSheet * as = [[[UIActionSheet alloc] - initWithTitle: cell.textLabel.text - delegate: self - cancelButtonTitle: nil - destructiveButtonTitle: nil - otherButtonTitles: nil] autorelease]; + UIActionSheet * as = [[UIActionSheet alloc] initWithTitle:cell.textLabel.text + delegate:self + cancelButtonTitle:nil + destructiveButtonTitle:nil + otherButtonTitles:nil]; for (NSString * str in buttonNames) [as addButtonWithTitle:str]; @@ -503,7 +500,7 @@ static bool getGuideName(string & name, storage::TIndex const & index) [as addButtonWithTitle:NSLocalizedString(@"cancel", nil)]; as.cancelButtonIndex = numOfButtons; } - [as showFromRect: [cell frame] inView:(UITableView *)self.view animated: YES]; + [as showFromRect:cell.frame inView:(UITableView *)self.view animated: YES]; } @end diff --git a/iphone/Maps/Settings/LinkCell.h b/iphone/Maps/Settings/LinkCell.h index 46c517573a..3be026f45f 100644 --- a/iphone/Maps/Settings/LinkCell.h +++ b/iphone/Maps/Settings/LinkCell.h @@ -3,6 +3,6 @@ @interface LinkCell : UITableViewCell -@property (retain, nonatomic) IBOutlet UILabel * titleLabel; +@property (nonatomic) IBOutlet UILabel * titleLabel; @end diff --git a/iphone/Maps/Settings/Preferences.h b/iphone/Maps/Settings/Preferences.h index c05dd502d4..33b74086ba 100644 --- a/iphone/Maps/Settings/Preferences.h +++ b/iphone/Maps/Settings/Preferences.h @@ -2,5 +2,7 @@ // Initialize default preferences if they're not initialized @interface Preferences : NSObject + + (void)setup:(id)controller; + @end diff --git a/iphone/Maps/Settings/Preferences.mm b/iphone/Maps/Settings/Preferences.mm index 0430dce6a4..7c58e47308 100644 --- a/iphone/Maps/Settings/Preferences.mm +++ b/iphone/Maps/Settings/Preferences.mm @@ -9,11 +9,10 @@ //********************* Helper delegate to handle async dialog message ****************** @interface PrefDelegate : NSObject -@property (nonatomic, assign) id m_controller; +@property (nonatomic, weak) id m_controller; @end @implementation PrefDelegate -@synthesize m_controller; @end //*************************************************************************************** @@ -45,11 +44,11 @@ /*This code counts conversion Guides->MWM. We rely on setting with name "Units", and by the time this code will be executed, Framework->GuidesManager should be initialised*/ set s; GetFramework().GetGuidesManager().GetGuidesId(s); - NSMutableDictionary * guidesUrls = [[[NSMutableDictionary alloc] init] autorelease]; + NSMutableDictionary * guidesUrls = [[NSMutableDictionary alloc] init]; for (set::iterator it = s.begin(); it != s.end();++it) { NSString * countryUrl = [NSString stringWithUTF8String:it->c_str()]; - if ([APP canOpenURL:[NSURL URLWithString:countryUrl]]) + if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:countryUrl]]) guidesUrls[countryUrl] = @1; } if ([guidesUrls count]) diff --git a/iphone/Maps/Settings/SettingsManager.h b/iphone/Maps/Settings/SettingsManager.h index 7b9394e641..03c9b7f2e4 100644 --- a/iphone/Maps/Settings/SettingsManager.h +++ b/iphone/Maps/Settings/SettingsManager.h @@ -8,7 +8,7 @@ int m_slotID; } -- (void) show:(UIViewController *)prevController; -- (void) hide; +- (void)show:(UIViewController *)prevController; +- (void)hide; @end diff --git a/iphone/Maps/Settings/SettingsManager.mm b/iphone/Maps/Settings/SettingsManager.mm index 8357199b5e..5d1e838552 100644 --- a/iphone/Maps/Settings/SettingsManager.mm +++ b/iphone/Maps/Settings/SettingsManager.mm @@ -12,15 +12,8 @@ using namespace storage; // Settings are always present globally @implementation SettingsManager -- (void) dealloc -{ - [m_navigationController release]; - [super dealloc]; -} - - /// Get right controller from the stack -- (UIViewController *) ControllerByIndex:(TIndex const &)index +- (UIViewController *)ControllerByIndex:(TIndex const &)index { NSArray * controllers = m_navigationController.viewControllers; NSInteger count = [controllers count] - 1; @@ -33,24 +26,24 @@ using namespace storage; return nil; } -- (void) OnCountryChange: (TIndex const &)index +- (void)OnCountryChange:(TIndex const &)index { UIViewController * controller = [self ControllerByIndex:index]; if (controller && [controller respondsToSelector:@selector(OnCountryChange:)]) [(CountriesViewController *)controller OnCountryChange: index]; } -- (void) OnCountryDownload: (TIndex const &) index withProgress: (pair const &) progress +- (void)OnCountryDownload:(TIndex const &)index withProgress:(pair const &)progress { UIViewController * controller = [self ControllerByIndex:index]; if (controller && [controller respondsToSelector:@selector(OnDownload:withProgress:)]) - [(CountriesViewController *)controller OnDownload: index withProgress: progress]; + [(CountriesViewController *)controller OnDownload:index withProgress:progress]; } -- (void) show:(UIViewController *)prevController +- (void)show:(UIViewController *)prevController { - CountriesViewController * countriesController = [[[CountriesViewController alloc] - initWithIndex:TIndex() andHeader:NSLocalizedString(@"download_maps", @"Settings/Downloader - Main downloader window title")] autorelease]; + NSString * header = NSLocalizedString(@"download_maps", @"Settings/Downloader - Main downloader window title"); + CountriesViewController * countriesController = [[CountriesViewController alloc] initWithIndex:TIndex() andHeader:header]; // m_navigationController = [[UINavigationController alloc] initWithRootViewController:countriesController]; Framework & f = GetFramework(); diff --git a/iphone/Maps/Statistics/AppInfo.h b/iphone/Maps/Statistics/AppInfo.h index d11c9c1dd5..52884e1d63 100644 --- a/iphone/Maps/Statistics/AppInfo.h +++ b/iphone/Maps/Statistics/AppInfo.h @@ -12,13 +12,13 @@ extern NSString * const AppFeatureBannerAd; - (BOOL)featureAvailable:(NSString *)featureName; - (NSString *)snapshot; -@property (nonatomic, strong, readonly) NSString * countryCode; -@property (nonatomic, strong, readonly) NSString * bundleVersion; -@property (nonatomic, strong, readonly) NSString * deviceInfo; -@property (nonatomic, strong, readonly) NSString * firmwareVersion; -@property (nonatomic, strong, readonly) NSString * uniqueId; -@property (nonatomic, strong, readonly) NSString * advertisingId; -@property (nonatomic, strong, readonly) Reachability * reachability; +@property (nonatomic, readonly) NSString * countryCode; +@property (nonatomic, readonly) NSString * bundleVersion; +@property (nonatomic, readonly) NSString * deviceInfo; +@property (nonatomic, readonly) NSString * firmwareVersion; +@property (nonatomic, readonly) NSString * uniqueId; +@property (nonatomic, readonly) NSString * advertisingId; +@property (nonatomic, readonly) Reachability * reachability; @property (nonatomic) NSInteger launchCount; @end diff --git a/iphone/Maps/Statistics/AppInfo.mm b/iphone/Maps/Statistics/AppInfo.mm index 6e52b73e84..3593eff57d 100644 --- a/iphone/Maps/Statistics/AppInfo.mm +++ b/iphone/Maps/Statistics/AppInfo.mm @@ -12,15 +12,15 @@ NSString * const AppFeatureBannerAd = @"BannerAd"; @interface AppInfo () @property (nonatomic) NSDictionary * features; -@property NSDictionary * featuresByDefault; +@property (nonatomic) NSDictionary * featuresByDefault; -@property (nonatomic, strong) NSString * countryCode; -@property (nonatomic, strong) NSString * bundleVersion; -@property (nonatomic, strong) NSString * deviceInfo; -@property (nonatomic, strong) NSString * firmwareVersion; -@property (nonatomic, strong) NSString * uniqueId; -@property (nonatomic, strong) NSString * advertisingId; -@property (nonatomic, strong) Reachability * reachability; +@property (nonatomic) NSString * countryCode; +@property (nonatomic) NSString * bundleVersion; +@property (nonatomic) NSString * deviceInfo; +@property (nonatomic) NSString * firmwareVersion; +@property (nonatomic) NSString * uniqueId; +@property (nonatomic) NSString * advertisingId; +@property (nonatomic) Reachability * reachability; @end diff --git a/iphone/Maps/Statistics/Reachability.m b/iphone/Maps/Statistics/Reachability.m index 3b71f3e97e..fe455ab6e4 100755 --- a/iphone/Maps/Statistics/Reachability.m +++ b/iphone/Maps/Statistics/Reachability.m @@ -11,11 +11,11 @@ NSString *const kReachabilityChangedNotification = @"kReachabilityChangedNotific #if NEEDS_DISPATCH_RETAIN_RELEASE @property (nonatomic, assign) dispatch_queue_t reachabilitySerialQueue; #else -@property (nonatomic, strong) dispatch_queue_t reachabilitySerialQueue; +@property (nonatomic) dispatch_queue_t reachabilitySerialQueue; #endif -@property (nonatomic, strong) id reachabilityObject; +@property (nonatomic) id reachabilityObject; - (void)reachabilityChanged:(SCNetworkReachabilityFlags)flags; - (BOOL)isReachableWithFlags:(SCNetworkReachabilityFlags)flags; diff --git a/iphone/Maps/main.mm b/iphone/Maps/main.mm index b7db62eada..54326aa9ec 100644 --- a/iphone/Maps/main.mm +++ b/iphone/Maps/main.mm @@ -36,8 +36,8 @@ int main(int argc, char * argv[]) int retVal; @autoreleasepool { - Dummy * dummy = [[Dummy alloc] autorelease]; - NSThread * thread = [[[NSThread alloc] initWithTarget:dummy selector:@selector(dummyThread:) object:nil] autorelease]; + Dummy * dummy = [Dummy alloc]; + NSThread * thread = [[NSThread alloc] initWithTarget:dummy selector:@selector(dummyThread:) object:nil]; [thread start]; [[NSUserDefaults standardUserDefaults] setBool:(Settings::IsFirstLaunch()) forKey:FIRST_LAUNCH_KEY];