forked from organicmaps/organicmaps
[iOS] go to guide page on tap at "more" button in catalog promo
https://jira.mail.ru/browse/MAPSME-11872
This commit is contained in:
parent
0a452804cf
commit
bea03813cf
3 changed files with 6 additions and 9 deletions
|
@ -10,7 +10,7 @@
|
|||
@IBOutlet var guideContainerView: UIView!
|
||||
|
||||
@objc var onMore: MWMVoidBlock?
|
||||
@objc var onGoToCatalog: MWMVoidBlock?
|
||||
@objc var onView: MWMVoidBlock?
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
@ -29,13 +29,10 @@
|
|||
}
|
||||
|
||||
@IBAction func onMoreButton(_ sender: UIButton) {
|
||||
moreButton.isHidden = true
|
||||
moreButtonHeightConstraint.constant = 0
|
||||
placeDescriptionLabel.numberOfLines = 0
|
||||
onMore?()
|
||||
onView?()
|
||||
}
|
||||
|
||||
@IBAction func onCatalogButton(_ sender: UIButton) {
|
||||
onGoToCatalog?()
|
||||
onView?()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="379" id="KGk-i7-Jjw" customClass="CatalogSingleItemCell" customModule="maps_me" customModuleProvider="target">
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="379" id="KGk-i7-Jjw" customClass="CatalogSingleItemCell" customModule="maps_me" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="454"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
|
@ -86,7 +86,7 @@
|
|||
<constraint firstItem="88F-wd-Imb" firstAttribute="leading" secondItem="kay-Ql-Q4u" secondAttribute="leading" constant="16" id="oOE-MR-E9Q"/>
|
||||
<constraint firstItem="kpd-Fx-T2M" firstAttribute="top" secondItem="tjG-Xk-PW2" secondAttribute="bottom" constant="8" id="qTs-xs-PmG"/>
|
||||
<constraint firstItem="tjG-Xk-PW2" firstAttribute="top" secondItem="kay-Ql-Q4u" secondAttribute="top" constant="16" id="rh5-PZ-qDd"/>
|
||||
<constraint firstAttribute="bottom" secondItem="88F-wd-Imb" secondAttribute="bottom" priority="750" constant="4" id="zlw-mE-wCH"/>
|
||||
<constraint firstAttribute="bottom" secondItem="88F-wd-Imb" secondAttribute="bottom" constant="4" id="zlw-mE-wCH"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
|
|
|
@ -651,7 +651,7 @@ std::map<MetainfoRows, Class> const kMetaInfoCells = {
|
|||
[tableView endUpdates];
|
||||
};
|
||||
__weak __typeof(self) ws = self;
|
||||
cell.onGoToCatalog = ^{
|
||||
cell.onView = ^{
|
||||
__strong __typeof(self) self = ws;
|
||||
NSURL *url = [NSURL URLWithString:item.catalogUrl];
|
||||
[self.delegate openCatalogForURL:url];
|
||||
|
|
Loading…
Add table
Reference in a new issue