forked from organicmaps/organicmaps
[ios] Small fixes.
This commit is contained in:
parent
24c01811de
commit
6ae54edeb1
10 changed files with 61 additions and 15 deletions
|
@ -102,7 +102,7 @@
|
|||
<constraint firstAttribute="trailing" secondItem="R6E-kO-6Lb" secondAttribute="trailing" constant="14" id="z2B-cN-g56"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="pressBackground"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="menuBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
return;
|
||||
|
||||
[super setHighlighted:highlighted];
|
||||
self.icon.tintColor = self.label.textColor = highlighted ? [UIColor blackHintText] : [UIColor blackPrimaryText];
|
||||
self.label.textColor = highlighted ? [UIColor blackHintText] : [UIColor blackPrimaryText];
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<mutableArray key="HelveticaNeue.ttc">
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular16"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
shouldChangeCharactersInRange:(NSRange)range
|
||||
replacementString:(NSString *)string
|
||||
{
|
||||
NSAssert(string, @"String can't be nil!");
|
||||
if (!string)
|
||||
return YES;
|
||||
|
||||
NSString * newString =
|
||||
[textField.text stringByReplacingCharactersInRange:range withString:string];
|
||||
BOOL const isCorrect = [textField.validator validateString:newString];
|
||||
|
|
|
@ -42,6 +42,47 @@ namespace
|
|||
[self configTable];
|
||||
[self configNavBar];
|
||||
[self configSearchBar];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillShow:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillHide:)
|
||||
name:UIKeyboardWillHideNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)notification
|
||||
{
|
||||
CGSize const keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
|
||||
CGFloat const bottomInset = UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]) ?
|
||||
keyboardSize.height : keyboardSize.width;
|
||||
|
||||
UIEdgeInsets const contentInsets = {.bottom = bottomInset};
|
||||
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[UIView animateWithDuration:rate.floatValue animations:^
|
||||
{
|
||||
self.tableView.contentInset = contentInsets;
|
||||
self.tableView.scrollIndicatorInsets = contentInsets;
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide:(NSNotification *)notification
|
||||
{
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[UIView animateWithDuration:rate.floatValue animations:^
|
||||
{
|
||||
self.tableView.contentInset = {};
|
||||
self.tableView.scrollIndicatorInsets = {};
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)configTable
|
||||
|
|
|
@ -8,8 +8,7 @@ namespace
|
|||
NSString * const kStreetEditorEditCell = @"MWMStreetEditorEditTableViewCell";
|
||||
} // namespace
|
||||
|
||||
@interface MWMStreetEditorViewController ()<UITableViewDelegate, UITableViewDataSource,
|
||||
MWMStreetEditorCommonTableViewCellProtocol,
|
||||
@interface MWMStreetEditorViewController ()<MWMStreetEditorCommonTableViewCellProtocol,
|
||||
MWMStreetEditorEditCellProtocol>
|
||||
|
||||
@property (nonatomic) NSMutableArray<NSString *> * streets;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
- (void)sendNote:(string const &)note
|
||||
{
|
||||
NSAssert(!note.empty(), @"String can't be empty!");
|
||||
osm::Editor::Instance().CreateNote(m_point, note);
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
|
|
|
@ -1222,7 +1222,7 @@
|
|||
<scene sceneID="XbW-Wc-ZB3">
|
||||
<objects>
|
||||
<tableViewController id="Lfa-Zp-orR" customClass="MWMEditorViewController" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="onDrag" dataMode="prototypes" style="grouped" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="HU6-ak-Eu1">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="interactive" dataMode="prototypes" style="grouped" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="HU6-ak-Eu1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
|
@ -1247,7 +1247,7 @@
|
|||
<scene sceneID="vQV-Ee-44C">
|
||||
<objects>
|
||||
<tableViewController id="xZs-iI-22O" customClass="MWMCuisineEditorViewController" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="onDrag" dataMode="prototypes" style="grouped" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="SYG-xq-jrS">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="interactive" dataMode="prototypes" style="grouped" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="SYG-xq-jrS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
|
@ -1284,7 +1284,7 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="X1H-IB-Nv1">
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="interactive" dataMode="prototypes" style="grouped" separatorStyle="none" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="X1H-IB-Nv1">
|
||||
<rect key="frame" x="0.0" y="20" width="600" height="536"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
|
@ -1650,7 +1650,7 @@
|
|||
<scene sceneID="MQs-9R-SZd">
|
||||
<objects>
|
||||
<tableViewController id="Ajb-eT-8P5" customClass="MWMReportProblemExtendedController" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="onDrag" dataMode="static" style="grouped" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="Urf-xt-sj3">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="interactive" dataMode="static" style="grouped" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="Urf-xt-sj3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
|
@ -1667,12 +1667,13 @@
|
|||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="6cE-dD-8Es" customClass="MWMTextView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="127"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<inset key="scrollIndicatorInsets" minX="16" minY="12" maxX="16" maxY="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedPlaceholder" value="detailed_problem_description"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</textView>
|
||||
|
@ -2753,7 +2754,7 @@ the world. Join us!</string>
|
|||
<scene sceneID="hgU-jB-a3C">
|
||||
<objects>
|
||||
<tableViewController id="Heu-QR-M0N" customClass="MWMStreetEditorViewController" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="onDrag" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="rJJ-UB-6u2">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="interactive" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="rJJ-UB-6u2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
|
@ -2780,7 +2781,7 @@ the world. Join us!</string>
|
|||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="onDrag" dataMode="prototypes" style="grouped" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="JbV-y9-HBo">
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="interactive" dataMode="prototypes" style="grouped" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="JbV-y9-HBo">
|
||||
<rect key="frame" x="0.0" y="64" width="600" height="536"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
switch (self.mwm_coloring)
|
||||
{
|
||||
case MWMImageColoringBlack:
|
||||
self.tintColor = highlighted ? [UIColor linkBlue] : [UIColor blackSecondaryText];
|
||||
self.tintColor = highlighted ? [UIColor blackHintText] : [UIColor blackSecondaryText];
|
||||
break;
|
||||
|
||||
case MWMImageColoringGray:
|
||||
|
|
Loading…
Add table
Reference in a new issue