[ios] Remove excess classes.

This commit is contained in:
v.mikhaylenko 2015-07-09 12:47:41 +03:00 committed by Alex Zolotarev
parent f77996ee94
commit f321740d30
9 changed files with 7 additions and 161 deletions

View file

@ -3,7 +3,6 @@
#import "CircleView.h"
#import "ColorPickerView.h"
#import "Common.h"
#import "CustomNavigationView.h"
#import "MapsAppDelegate.h"
#import "MapViewController.h"
#import "Statistics.h"
@ -12,12 +11,12 @@
#include "Framework.h"
#include "../../../platform/measurement_utils.hpp"
#include "platform/measurement_utils.hpp"
#include "../../../geometry/distance_on_sphere.hpp"
#include "geometry/distance_on_sphere.hpp"
#include "../../../coding/zip_creator.hpp"
#include "../../../coding/internal/file_data.hpp"
#include "coding/zip_creator.hpp"
#include "coding/internal/file_data.hpp"
#define TEXTFIELD_TAG 999

View file

@ -1,5 +0,0 @@
#import <UIKit/UIKit.h>
@interface CustomNavigationView : UIView
@end

View file

@ -1,19 +0,0 @@
#import "CustomNavigationView.h"
@implementation CustomNavigationView
- (void)layoutSubviews
{
UINavigationBar * navBar = (UINavigationBar *)[self.subviews objectAtIndex:0];
[navBar sizeToFit];
[navBar setNeedsDisplay];
UIView * table = [self.subviews objectAtIndex:1];
CGRect rTable;
rTable.origin = CGPointMake(navBar.frame.origin.x, navBar.frame.origin.y + navBar.frame.size.height);
rTable.size = self.bounds.size;
rTable.size.height -= navBar.bounds.size.height;
table.frame = rTable;
}
@end

View file

@ -1,8 +0,0 @@
#import <UIKit/UIKit.h>
@interface LocationButton : UIButton
- (void)setSearching;
@end

View file

@ -1,50 +0,0 @@
#import "LocationButton.h"
#import "UIKitCategories.h"
@implementation LocationButton
{
UIImageView * topImageView;
BOOL searching;
}
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
self.contentMode = UIViewContentModeCenter;
[self setImage:[UIImage imageNamed:@"LocationDefault"] forState:UIControlStateSelected];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:nil];
return self;
}
- (void)willEnterForeground:(NSNotification *)notification
{
if (searching)
[self setSearching];
}
- (void)setImage:(UIImage *)image forState:(UIControlState)state
{
[topImageView removeFromSuperview];
topImageView = [[UIImageView alloc] initWithImage:image];
[self addSubview:topImageView];
topImageView.center = CGPointMake(self.width / 2, self.height / 2);
searching = NO;
}
- (void)setSearching
{
CABasicAnimation * animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
CGFloat count = CGFLOAT_MAX;
animation.toValue = @(2 * M_PI * count);
NSTimeInterval loopDuration = 1.2;
animation.duration = count * loopDuration;
animation.repeatCount = count;
[topImageView.layer addAnimation:animation forKey:@"rotation"];
searching = YES;
}
@end

View file

@ -2,13 +2,12 @@
#import <UIKit/UIKit.h>
#import "ViewController.h"
#import "LocationManager.h"
#import "LocationButton.h"
#import "SearchView.h"
#import "LocationPredictor.h"
#include "../../geometry/point2d.hpp"
#include "../../geometry/rect2d.hpp"
#include "../../indexer/map_style.hpp"
#include "geometry/point2d.hpp"
#include "geometry/rect2d.hpp"
#include "indexer/map_style.hpp"
namespace search { struct AddressInfo; }

View file

@ -1,7 +0,0 @@
#import <UIKit/UIKit.h>
@interface TwoButtonsView : UIView
- (id)initWithFrame:(CGRect)frame leftButtonSelector:(SEL)leftSel rightButtonSelector:(SEL)rightTitle leftButtonTitle:(NSString *)leftTitle rightButtontitle:(NSString *)rightTitle target:(id)target;
@end

View file

@ -1,45 +0,0 @@
#import "TwoButtonsView.h"
#define MARGIN 10
@interface TwoButtonsView()
@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
{
self = [super initWithFrame:frame];
if (self)
{
self.leftButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[self.leftButton addTarget:target action:leftSel forControlEvents:UIControlEventTouchUpInside];
[self.leftButton setTitle:leftTitle forState:UIControlStateNormal];
self.leftButton.titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
self.leftButton.titleLabel.textAlignment = NSTextAlignmentCenter;
self.rightButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[self.rightButton addTarget:target action:rightSel forControlEvents:UIControlEventTouchUpInside];
[self.rightButton setTitle:rightTitle forState:UIControlStateNormal];
self.rightButton.titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
self.rightButton.titleLabel.textAlignment = NSTextAlignmentCenter;
[self addSubview:self.leftButton];
[self addSubview:self.rightButton];
}
return self;
}
- (void)layoutSubviews
{
[super layoutSubviews];
double const buttonWidth = (self.superview.bounds.size.width - 3 * MARGIN) / 2;
[self.leftButton setFrame:CGRectMake(MARGIN, 0, buttonWidth, self.frame.size.height)];
[self.rightButton setFrame:CGRectMake(2 * MARGIN + buttonWidth, 0, buttonWidth, self.frame.size.height)];
}
@end

View file

@ -138,7 +138,6 @@
97ECD87A18362B5400F77A46 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD87918362B5400F77A46 /* MobileCoreServices.framework */; };
97ECD87F1836594400F77A46 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD87E1836594400F77A46 /* StoreKit.framework */; settings = {ATTRIBUTES = (Required, ); }; };
97F0817E19AF72590098FB0B /* BadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97F0817D19AF72590098FB0B /* BadgeView.m */; };
97F61781183E6172009919E2 /* LocationButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97F6177F183E6172009919E2 /* LocationButton.mm */; };
97F61794183E7445009919E2 /* LinkCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 97F61793183E7445009919E2 /* LinkCell.m */; };
97FC99DC19C1A2CD00C1CF98 /* resources-mdpi in Resources */ = {isa = PBXBuildFile; fileRef = 97FC99D919C1A2CD00C1CF98 /* resources-mdpi */; };
97FC99DE19C1A2CD00C1CF98 /* resources-xhdpi in Resources */ = {isa = PBXBuildFile; fileRef = 97FC99DA19C1A2CD00C1CF98 /* resources-xhdpi */; };
@ -162,7 +161,6 @@
CB252D6F16FF82C9001E41E9 /* Statistics.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB252D6C16FF82C8001E41E9 /* Statistics.mm */; };
ED48BBB517C267F5003E7E92 /* ColorPickerView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED48BBB417C267F5003E7E92 /* ColorPickerView.mm */; };
ED48BBBA17C2B1E2003E7E92 /* CircleView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED48BBB917C2B1E2003E7E92 /* CircleView.mm */; };
EDB811A3175E1A9C00E36BF2 /* TwoButtonsView.m in Sources */ = {isa = PBXBuildFile; fileRef = EDB811A2175E1A9C00E36BF2 /* TwoButtonsView.m */; };
EDC5C543175F2CA600420E92 /* ShareActionSheet.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDC5C542175F2CA600420E92 /* ShareActionSheet.mm */; };
EE026F0611D6AC0D00645242 /* classificator.txt in Resources */ = {isa = PBXBuildFile; fileRef = EE026F0511D6AC0D00645242 /* classificator.txt */; };
EE164811135CEE4A003B8A3E /* 06_code2000.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EE164810135CEE49003B8A3E /* 06_code2000.ttf */; };
@ -242,7 +240,6 @@
F6FE2C111B03A016009814AA /* PlacePageNavigationBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6FE2C101B03A015009814AA /* PlacePageNavigationBar.xib */; };
F6FE2C151B04A44E009814AA /* MWMPlacePageEntity.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6FE2C141B04A44E009814AA /* MWMPlacePageEntity.mm */; };
F785EB4016386FC4003A38A8 /* BookmarkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F785EB3F16386FC4003A38A8 /* BookmarkCell.mm */; };
F7B90CD31521E6D200C054EE /* CustomNavigationView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F7B90CD21521E6D100C054EE /* CustomNavigationView.mm */; };
F7E7BA221672328F00B4492E /* atm.png in Resources */ = {isa = PBXBuildFile; fileRef = F7E7BA061672328F00B4492E /* atm.png */; };
F7E7BA231672328F00B4492E /* atm@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F7E7BA071672328F00B4492E /* atm@2x.png */; };
F7E7BA241672328F00B4492E /* bank.png in Resources */ = {isa = PBXBuildFile; fileRef = F7E7BA081672328F00B4492E /* bank.png */; };
@ -505,8 +502,6 @@
97EDDCE418A299C000AEFB7A /* Twitter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Twitter.framework; path = System/Library/Frameworks/Twitter.framework; sourceTree = SDKROOT; };
97F0817C19AF72590098FB0B /* BadgeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BadgeView.h; path = Classes/BadgeView.h; sourceTree = "<group>"; };
97F0817D19AF72590098FB0B /* BadgeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BadgeView.m; path = Classes/BadgeView.m; sourceTree = "<group>"; };
97F6177F183E6172009919E2 /* LocationButton.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocationButton.mm; sourceTree = "<group>"; };
97F61780183E6172009919E2 /* LocationButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationButton.h; sourceTree = "<group>"; };
97F6178F183E742E009919E2 /* LinkCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LinkCell.h; path = Settings/LinkCell.h; sourceTree = "<group>"; };
97F61793183E7445009919E2 /* LinkCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LinkCell.m; path = Settings/LinkCell.m; sourceTree = "<group>"; };
97FC99D919C1A2CD00C1CF98 /* resources-mdpi */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-mdpi"; path = "../../data/resources-mdpi"; sourceTree = "<group>"; };
@ -539,8 +534,6 @@
ED48BBB417C267F5003E7E92 /* ColorPickerView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ColorPickerView.mm; sourceTree = "<group>"; };
ED48BBB817C2B1E2003E7E92 /* CircleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircleView.h; sourceTree = "<group>"; };
ED48BBB917C2B1E2003E7E92 /* CircleView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CircleView.mm; sourceTree = "<group>"; };
EDB811A1175E1A9C00E36BF2 /* TwoButtonsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TwoButtonsView.h; sourceTree = "<group>"; };
EDB811A2175E1A9C00E36BF2 /* TwoButtonsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TwoButtonsView.m; sourceTree = "<group>"; };
EDC5C541175F2CA600420E92 /* ShareActionSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ShareActionSheet.h; path = Classes/ShareActionSheet.h; sourceTree = "<group>"; };
EDC5C542175F2CA600420E92 /* ShareActionSheet.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; name = ShareActionSheet.mm; path = Classes/ShareActionSheet.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
EE026F0511D6AC0D00645242 /* classificator.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = classificator.txt; path = ../../data/classificator.txt; sourceTree = SOURCE_ROOT; };
@ -670,8 +663,6 @@
F6FE2C141B04A44E009814AA /* MWMPlacePageEntity.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageEntity.mm; sourceTree = "<group>"; };
F785EB3E16386FC4003A38A8 /* BookmarkCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BookmarkCell.h; path = Bookmarks/BookmarkCell.h; sourceTree = SOURCE_ROOT; };
F785EB3F16386FC4003A38A8 /* BookmarkCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = BookmarkCell.mm; path = Bookmarks/BookmarkCell.mm; sourceTree = SOURCE_ROOT; };
F7B90CD11521E6D100C054EE /* CustomNavigationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomNavigationView.h; sourceTree = "<group>"; };
F7B90CD21521E6D100C054EE /* CustomNavigationView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CustomNavigationView.mm; sourceTree = "<group>"; };
F7DD848414FE77F8005695E1 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
F7DD848514FE7C7F005695E1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
F7DD848614FE7FE0005695E1 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
@ -1224,12 +1215,6 @@
ED48BBB417C267F5003E7E92 /* ColorPickerView.mm */,
ED48BBB817C2B1E2003E7E92 /* CircleView.h */,
ED48BBB917C2B1E2003E7E92 /* CircleView.mm */,
F7B90CD11521E6D100C054EE /* CustomNavigationView.h */,
F7B90CD21521E6D100C054EE /* CustomNavigationView.mm */,
EDB811A1175E1A9C00E36BF2 /* TwoButtonsView.h */,
EDB811A2175E1A9C00E36BF2 /* TwoButtonsView.m */,
97F61780183E6172009919E2 /* LocationButton.h */,
97F6177F183E6172009919E2 /* LocationButton.mm */,
);
name = "Custom Views";
sourceTree = "<group>";
@ -2143,7 +2128,6 @@
34BC72221B0DECAE0012A34B /* MWMLocationButtonView.mm in Sources */,
FA34BECA1338D72F00FFB2A7 /* CustomAlertView.mm in Sources */,
340F24631B14910500F874CD /* RouteState.mm in Sources */,
97F61781183E6172009919E2 /* LocationButton.mm in Sources */,
9747264318323080006B7CB7 /* UIKitCategories.m in Sources */,
977E26BE19E31BBE00BA2219 /* CountryTreeVC.mm in Sources */,
97A8001418B2140A000C07A2 /* SearchResultCell.m in Sources */,
@ -2165,7 +2149,6 @@
978F9240183B660F000D6C7C /* SettingsViewController.mm in Sources */,
F6CB21601AEE7A5B00FB8963 /* MWMPlacePageInfoCell.mm in Sources */,
B0E1FCDC1A23399E00A8E08B /* RouteOverallInfoView.m in Sources */,
F7B90CD31521E6D200C054EE /* CustomNavigationView.mm in Sources */,
F6DBF9B61AA8779300F2EC2C /* CALayer+RuntimeAttributes.mm in Sources */,
FA36B80D15403A4F004560CC /* BookmarksVC.mm in Sources */,
F6ED135B1B18AA930095C6DE /* MWMExtendedPlacePageView.m in Sources */,
@ -2187,7 +2170,6 @@
F6F533A31B3C248900C1940B /* UIColor+MapsMeColor.mm in Sources */,
CB252D6F16FF82C9001E41E9 /* Statistics.mm in Sources */,
978F9244183B660F000D6C7C /* SwitchCell.m in Sources */,
EDB811A3175E1A9C00E36BF2 /* TwoButtonsView.m in Sources */,
97508423199522D300A7457D /* SettingsAndMoreVC.mm in Sources */,
F6ED13541B1643900095C6DE /* MWMDirectionView.mm in Sources */,
34BC72271B0DECAE0012A34B /* MWMSideMenuView.mm in Sources */,