Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
38
iphone/Maps/UI/Editor/MWMEditorAdditionalNamesHeader.m
Normal file
38
iphone/Maps/UI/Editor/MWMEditorAdditionalNamesHeader.m
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#import "MWMButton.h"
|
||||
#import "MWMEditorAdditionalNamesHeader.h"
|
||||
|
||||
@interface MWMEditorAdditionalNamesHeader ()
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel * label;
|
||||
@property(copy, nonatomic) MWMVoidBlock toggleBlock;
|
||||
@property (weak, nonatomic) IBOutlet MWMButton * toggleButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMEditorAdditionalNamesHeader
|
||||
|
||||
+ (instancetype)header:(MWMVoidBlock)toggleBlock
|
||||
{
|
||||
MWMEditorAdditionalNamesHeader * h =
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
h.label.text = L(@"place_name").uppercaseString;
|
||||
h.toggleBlock = toggleBlock;
|
||||
return h;
|
||||
}
|
||||
|
||||
- (IBAction)toggleAction
|
||||
{
|
||||
self.toggleBlock();
|
||||
}
|
||||
|
||||
- (void)setShowAdditionalNames:(BOOL)showAdditionalNames
|
||||
{
|
||||
[self.toggleButton setTitle:showAdditionalNames ? L(@"hide") : L(@"show") forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
- (void)setAdditionalNamesVisible:(BOOL)visible
|
||||
{
|
||||
self.toggleButton.hidden = !visible;
|
||||
}
|
||||
|
||||
@end
|
||||
Loading…
Add table
Add a link
Reference in a new issue