[iOS] Deselect site after tapping it
This commit is contained in:
parent
eaa989c64d
commit
3d0856a7e4
2 changed files with 7 additions and 4 deletions
|
@ -330,7 +330,7 @@
|
||||||
<nil key="textColor"/>
|
<nil key="textColor"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label>
|
||||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" highlighted="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="DJv-Ey-Hka">
|
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" highlighted="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Required" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="DJv-Ey-Hka">
|
||||||
<nil key="textColor"/>
|
<nil key="textColor"/>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" returnKeyType="done" secureTextEntry="YES"/>
|
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" returnKeyType="done" secureTextEntry="YES"/>
|
||||||
|
|
|
@ -65,17 +65,20 @@ clearNSMutableString(NSMutableString *string)
|
||||||
- (void)viewWillAppear: (BOOL)animated
|
- (void)viewWillAppear: (BOOL)animated
|
||||||
{
|
{
|
||||||
SiteStorage *siteStorage = self.mainViewController.siteStorage;
|
SiteStorage *siteStorage = self.mainViewController.siteStorage;
|
||||||
NSInteger row =
|
NSIndexPath *indexPath =
|
||||||
self.mainViewController.tableView.indexPathForSelectedRow.row;
|
self.mainViewController.tableView.indexPathForSelectedRow;
|
||||||
|
|
||||||
[_name release];
|
[_name release];
|
||||||
_name = [siteStorage.sites[row] retain];
|
_name = [siteStorage.sites[indexPath.row] retain];
|
||||||
_length = [siteStorage lengthForSite: _name];
|
_length = [siteStorage lengthForSite: _name];
|
||||||
_legacy = [siteStorage isSiteLegacy: _name];
|
_legacy = [siteStorage isSiteLegacy: _name];
|
||||||
|
|
||||||
self.nameField.text = [_name NSObject];
|
self.nameField.text = [_name NSObject];
|
||||||
self.lengthField.text = [NSString stringWithFormat: @"%zu", _length];
|
self.lengthField.text = [NSString stringWithFormat: @"%zu", _length];
|
||||||
self.legacySwitch.on = _legacy;
|
self.legacySwitch.on = _legacy;
|
||||||
|
|
||||||
|
[self.mainViewController.tableView deselectRowAtIndexPath: indexPath
|
||||||
|
animated: YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)viewDidAppear: (BOOL)animated
|
- (void)viewDidAppear: (BOOL)animated
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue