Add Detail Function and change some data form.
This commit is contained in:
parent
9c8094b91a
commit
7b857ff195
Binary file not shown.
Binary file not shown.
@ -22,6 +22,7 @@
|
||||
07F817A71E3A210700EDEC0E /* ME.png in Resources */ = {isa = PBXBuildFile; fileRef = 07F817A61E3A210700EDEC0E /* ME.png */; };
|
||||
07F817AB1E3A226500EDEC0E /* PointType.png in Resources */ = {isa = PBXBuildFile; fileRef = 07F817AA1E3A226500EDEC0E /* PointType.png */; };
|
||||
07F817AD1E3A22E500EDEC0E /* PointType.ico in Resources */ = {isa = PBXBuildFile; fileRef = 07F817AC1E3A22E500EDEC0E /* PointType.ico */; };
|
||||
07F817B21E3A995600EDEC0E /* Detail.m in Sources */ = {isa = PBXBuildFile; fileRef = 07F817B11E3A995600EDEC0E /* Detail.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@ -68,6 +69,8 @@
|
||||
07F817AA1E3A226500EDEC0E /* PointType.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = PointType.png; sourceTree = "<group>"; };
|
||||
07F817AC1E3A22E500EDEC0E /* PointType.ico */ = {isa = PBXFileReference; lastKnownFileType = image.ico; path = PointType.ico; sourceTree = "<group>"; };
|
||||
07F817AE1E3A50F800EDEC0E /* Post.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Post.h; sourceTree = "<group>"; };
|
||||
07F817B01E3A994C00EDEC0E /* Detail.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Detail.h; sourceTree = "<group>"; };
|
||||
07F817B11E3A995600EDEC0E /* Detail.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Detail.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -121,6 +124,7 @@
|
||||
070A8CFC1E389EAD00EA67A3 /* MPSE */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
07F817AF1E3A993F00EDEC0E /* Detail */,
|
||||
0768B3631E39A9AF0063CC0A /* User */,
|
||||
070A8D301E38A54900EA67A3 /* Map */,
|
||||
070A8D001E389EAD00EA67A3 /* AppDelegate.h */,
|
||||
@ -193,6 +197,15 @@
|
||||
name = User;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
07F817AF1E3A993F00EDEC0E /* Detail */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
07F817B01E3A994C00EDEC0E /* Detail.h */,
|
||||
07F817B11E3A995600EDEC0E /* Detail.m */,
|
||||
);
|
||||
name = Detail;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@ -331,6 +344,7 @@
|
||||
files = (
|
||||
0768B3651E39A9CD0063CC0A /* User.m in Sources */,
|
||||
070A8D051E389EAD00EA67A3 /* ViewController.m in Sources */,
|
||||
07F817B21E3A995600EDEC0E /* Detail.m in Sources */,
|
||||
070A8D021E389EAD00EA67A3 /* AppDelegate.m in Sources */,
|
||||
070A8D351E38B73A00EA67A3 /* Map.m in Sources */,
|
||||
070A8CFF1E389EAD00EA67A3 /* main.m in Sources */,
|
||||
|
@ -6,9 +6,28 @@
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="fFo-Ce-lMs">
|
||||
<objects>
|
||||
<viewController id="388-G4-e1w" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="eM6-QA-AYX"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="QRe-1I-q0S"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="IWD-ME-4me">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Qvd-AI-vIC" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1674" y="54"/>
|
||||
</scene>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
@ -21,17 +40,18 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<containerView opaque="NO" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lIA-Cw-fve">
|
||||
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lIA-Cw-fve">
|
||||
<rect key="frame" x="0.0" y="284" width="375" height="383"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<connections>
|
||||
<segue destination="F8D-2s-aNJ" kind="embed" id="n13-fX-LIN"/>
|
||||
</connections>
|
||||
</containerView>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="raG-41-ikj">
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="raG-41-ikj">
|
||||
<rect key="frame" x="293" y="237" width="66" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="66" id="HjZ-hu-Tyy"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
@ -39,34 +59,59 @@
|
||||
<action selector="ShareClick:" destination="BYZ-38-t0r" eventType="touchUpInside" id="iXa-fw-ICN"/>
|
||||
</connections>
|
||||
</button>
|
||||
<navigationBar contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VBK-EO-4jN">
|
||||
<navigationBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VBK-EO-4jN">
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<textAttributes key="titleTextAttributes">
|
||||
<offsetWrapper key="textShadowOffset" horizontal="0.0" vertical="0.0"/>
|
||||
</textAttributes>
|
||||
<items>
|
||||
<navigationItem title="Title" id="e8d-iI-SwZ">
|
||||
<barButtonItem key="rightBarButtonItem" title="Item" id="Nq0-Dn-Zx7"/>
|
||||
<barButtonItem key="rightBarButtonItem" title="Item" id="Nq0-Dn-Zx7">
|
||||
<connections>
|
||||
<segue destination="388-G4-e1w" kind="modal" id="6Qn-l3-BL6"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
</items>
|
||||
</navigationBar>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dGH-ch-S7e">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dGH-ch-S7e">
|
||||
<rect key="frame" x="16" y="237" width="278" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="4u8-pN-bgg"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yx6-nU-6ou">
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yx6-nU-6ou">
|
||||
<rect key="frame" x="0.0" y="81" width="375" height="148"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="148" id="0jd-EB-VHS"/>
|
||||
</constraints>
|
||||
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences" autocorrectionType="yes" spellCheckingType="yes"/>
|
||||
</textView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="yx6-nU-6ou" secondAttribute="trailing" id="0NW-vR-Jgp"/>
|
||||
<constraint firstItem="yx6-nU-6ou" firstAttribute="leading" secondItem="VBK-EO-4jN" secondAttribute="leading" id="1qu-4l-HtK"/>
|
||||
<constraint firstItem="dGH-ch-S7e" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" id="2xY-V4-NKh"/>
|
||||
<constraint firstItem="lIA-Cw-fve" firstAttribute="top" secondItem="dGH-ch-S7e" secondAttribute="bottom" constant="26" id="EEb-Kq-rJQ"/>
|
||||
<constraint firstItem="yx6-nU-6ou" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="KS3-nj-ix1"/>
|
||||
<constraint firstItem="dGH-ch-S7e" firstAttribute="bottom" secondItem="raG-41-ikj" secondAttribute="bottom" id="WEs-iJ-1U2"/>
|
||||
<constraint firstItem="yx6-nU-6ou" firstAttribute="top" secondItem="VBK-EO-4jN" secondAttribute="bottom" constant="17" id="ZU6-Hq-lrS"/>
|
||||
<constraint firstItem="raG-41-ikj" firstAttribute="trailing" secondItem="8bC-Xf-vdC" secondAttribute="trailingMargin" id="bkO-Ls-12L"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="dGH-ch-S7e" secondAttribute="trailing" constant="65" id="btZ-cg-gPa"/>
|
||||
<constraint firstItem="yx6-nU-6ou" firstAttribute="trailing" secondItem="VBK-EO-4jN" secondAttribute="trailing" id="dgB-Pr-gLr"/>
|
||||
<constraint firstItem="lIA-Cw-fve" firstAttribute="bottom" secondItem="wfy-db-euE" secondAttribute="top" id="etQ-BF-isc"/>
|
||||
<constraint firstItem="yx6-nU-6ou" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" constant="81" id="lHN-V7-zcf"/>
|
||||
<constraint firstItem="yx6-nU-6ou" firstAttribute="leading" secondItem="lIA-Cw-fve" secondAttribute="leading" id="oWO-IC-Ds2"/>
|
||||
<constraint firstItem="dGH-ch-S7e" firstAttribute="top" secondItem="raG-41-ikj" secondAttribute="top" id="rAx-Vc-la9"/>
|
||||
<constraint firstItem="yx6-nU-6ou" firstAttribute="trailing" secondItem="lIA-Cw-fve" secondAttribute="trailing" id="uoE-63-YTk"/>
|
||||
<constraint firstItem="dGH-ch-S7e" firstAttribute="top" secondItem="yx6-nU-6ou" secondAttribute="bottom" constant="8" symbolic="YES" id="uzn-fh-riL"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="LocationLabel" destination="dGH-ch-S7e" id="GMl-sD-xVF"/>
|
||||
@ -78,6 +123,103 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="128.80000000000001" y="53.523238380809602"/>
|
||||
</scene>
|
||||
<!--Detail View Delegate-->
|
||||
<scene sceneID="Xy0-ei-Fb4">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="DetailViewSelected" id="wsw-1c-mAR" customClass="DetailViewDelegate" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="l4F-eZ-w5B"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="UYU-aX-y8Q"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="amE-fD-mR0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Goy-jb-aE8">
|
||||
<rect key="frame" x="74" y="80" width="170" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="170" id="hLt-rz-V3i"/>
|
||||
<constraint firstAttribute="height" constant="21" id="z0t-h3-ZWo"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ME.png" translatesAutoresizingMaskIntoConstraints="NO" id="gpU-8k-6Os">
|
||||
<rect key="frame" x="16" y="80" width="50" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="50" id="OSF-NZ-CWV"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JOH-Lg-XLC">
|
||||
<rect key="frame" x="74" y="109" width="170" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="4Bx-Gr-9Ny"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<navigationBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wHr-2r-i1R">
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<items>
|
||||
<navigationItem title="Title" id="wQx-V9-H2j">
|
||||
<barButtonItem key="leftBarButtonItem" title="返回" id="7Rz-xn-WTf">
|
||||
<connections>
|
||||
<segue destination="BYZ-38-t0r" kind="modal" id="dQF-2D-KJF"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
</items>
|
||||
</navigationBar>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ScB-eh-E3u">
|
||||
<rect key="frame" x="16" y="343" width="343" height="304"/>
|
||||
</imageView>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="jZJ-nX-eq3">
|
||||
<rect key="frame" x="16" y="138" width="343" height="197"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="197" id="OrO-lG-b2S"/>
|
||||
</constraints>
|
||||
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
</textView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="gpU-8k-6Os" firstAttribute="top" secondItem="Goy-jb-aE8" secondAttribute="top" id="3BP-4K-FFo"/>
|
||||
<constraint firstItem="JOH-Lg-XLC" firstAttribute="top" secondItem="Goy-jb-aE8" secondAttribute="bottom" constant="8" symbolic="YES" id="3Pm-s1-Sv6"/>
|
||||
<constraint firstItem="jZJ-nX-eq3" firstAttribute="trailing" secondItem="ScB-eh-E3u" secondAttribute="trailing" id="4Hp-lU-log"/>
|
||||
<constraint firstItem="wHr-2r-i1R" firstAttribute="centerX" secondItem="jZJ-nX-eq3" secondAttribute="centerX" id="7fl-RA-zcL"/>
|
||||
<constraint firstItem="jZJ-nX-eq3" firstAttribute="top" secondItem="JOH-Lg-XLC" secondAttribute="bottom" constant="8" symbolic="YES" id="8B2-i3-4tF"/>
|
||||
<constraint firstItem="gpU-8k-6Os" firstAttribute="top" secondItem="wHr-2r-i1R" secondAttribute="bottom" constant="16" id="GP9-MZ-I4L"/>
|
||||
<constraint firstItem="Goy-jb-aE8" firstAttribute="trailing" secondItem="JOH-Lg-XLC" secondAttribute="trailing" id="Hdc-g6-NfN"/>
|
||||
<constraint firstItem="jZJ-nX-eq3" firstAttribute="top" secondItem="gpU-8k-6Os" secondAttribute="bottom" constant="8" symbolic="YES" id="Kba-yI-sUr"/>
|
||||
<constraint firstItem="jZJ-nX-eq3" firstAttribute="leading" secondItem="ScB-eh-E3u" secondAttribute="leading" id="MPk-jn-j5S"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wHr-2r-i1R" secondAttribute="trailing" id="McW-lP-Mhi"/>
|
||||
<constraint firstItem="Goy-jb-aE8" firstAttribute="leading" secondItem="JOH-Lg-XLC" secondAttribute="leading" id="WKS-13-ThH"/>
|
||||
<constraint firstItem="gpU-8k-6Os" firstAttribute="leading" secondItem="jZJ-nX-eq3" secondAttribute="leading" id="ajg-L4-cSj"/>
|
||||
<constraint firstItem="gpU-8k-6Os" firstAttribute="leading" secondItem="amE-fD-mR0" secondAttribute="leadingMargin" id="etj-hf-dOJ"/>
|
||||
<constraint firstItem="ScB-eh-E3u" firstAttribute="top" secondItem="jZJ-nX-eq3" secondAttribute="bottom" constant="8" symbolic="YES" id="gZj-As-XKX"/>
|
||||
<constraint firstItem="wHr-2r-i1R" firstAttribute="top" secondItem="l4F-eZ-w5B" secondAttribute="bottom" id="oIq-EC-vqF"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ScB-eh-E3u" secondAttribute="bottom" constant="20" symbolic="YES" id="pEQ-z0-HVl"/>
|
||||
<constraint firstItem="wHr-2r-i1R" firstAttribute="leading" secondItem="amE-fD-mR0" secondAttribute="leading" id="s9v-tq-48T"/>
|
||||
<constraint firstItem="Goy-jb-aE8" firstAttribute="leading" secondItem="gpU-8k-6Os" secondAttribute="trailing" constant="8" symbolic="YES" id="vuQ-tQ-lnP"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="PostText" destination="jZJ-nX-eq3" id="FcV-Mc-RZD"/>
|
||||
<outlet property="Time" destination="JOH-Lg-XLC" id="p8S-Hi-Jg7"/>
|
||||
<outlet property="TopBar" destination="wHr-2r-i1R" id="jAH-L1-wQG"/>
|
||||
<outlet property="UserImgine" destination="gpU-8k-6Os" id="Ivc-iu-hh4"/>
|
||||
<outlet property="UserName" destination="Goy-jb-aE8" id="erJ-Am-4DQ"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="2iQ-s3-hMh" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="128.80000000000001" y="789.35532233883066"/>
|
||||
</scene>
|
||||
<!--Map Delegate-->
|
||||
<scene sceneID="ctx-WF-MVe">
|
||||
<objects>
|
||||
@ -90,12 +232,17 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="383"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="t3q-fN-iR7">
|
||||
<mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="t3q-fN-iR7">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="383"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</mapView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="t3q-fN-iR7" secondAttribute="trailing" id="5DX-as-VTm"/>
|
||||
<constraint firstItem="t3q-fN-iR7" firstAttribute="top" secondItem="BUT-2B-6vr" secondAttribute="bottom" id="IoO-G3-cL2"/>
|
||||
<constraint firstItem="t3q-fN-iR7" firstAttribute="bottom" secondItem="F2h-ZB-mag" secondAttribute="top" id="JM8-xf-Itj"/>
|
||||
<constraint firstItem="t3q-fN-iR7" firstAttribute="leading" secondItem="iZ8-dL-F8N" secondAttribute="leading" id="SQi-2O-XwS"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="w6o-mA-7S7"/>
|
||||
<connections>
|
||||
@ -107,4 +254,7 @@
|
||||
<point key="canvasLocation" x="901.60000000000002" y="180.35982008995504"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="ME.png" width="128" height="128"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
21
MPSE/Detail.h
Normal file
21
MPSE/Detail.h
Normal file
@ -0,0 +1,21 @@
|
||||
//
|
||||
// Detail.h
|
||||
// MPSE
|
||||
//
|
||||
// Created by Saturneric on 17/1/27.
|
||||
// Copyright © 2017年 Bakantu Eric. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "Post.h"
|
||||
|
||||
@interface DetailViewDelegate : UIViewController
|
||||
|
||||
@property (strong ,nonatomic) MSPost *ThisPost;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *UserName;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *Time;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *UserImgine;
|
||||
@property (weak, nonatomic) IBOutlet UITextView *PostText;
|
||||
@property (weak, nonatomic) IBOutlet UINavigationBar *TopBar;
|
||||
|
||||
@end
|
33
MPSE/Detail.m
Normal file
33
MPSE/Detail.m
Normal file
@ -0,0 +1,33 @@
|
||||
//
|
||||
// Detail.m
|
||||
// MPSE
|
||||
//
|
||||
// Created by Saturneric on 17/1/27.
|
||||
// Copyright © 2017年 Bakantu Eric. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Detail.h"
|
||||
|
||||
@interface DetailViewDelegate()
|
||||
|
||||
@end
|
||||
|
||||
@implementation DetailViewDelegate
|
||||
|
||||
@synthesize ThisPost= _ThisPost;
|
||||
@synthesize UserName = _UserName;
|
||||
@synthesize Time = _Time;
|
||||
@synthesize PostText = _PostText;
|
||||
@synthesize TopBar = _TopBar;
|
||||
|
||||
- (void)viewDidLoad{
|
||||
[super viewDidLoad];
|
||||
[_UserName setText:_ThisPost.Username];
|
||||
_Time.text = _ThisPost.Time;
|
||||
_PostText.text = [NSString stringWithFormat:@" %@",_ThisPost.Text];
|
||||
}
|
||||
- (void)viewDidDisappear:(BOOL)animated{
|
||||
[super viewDidDisappear:animated];
|
||||
}
|
||||
|
||||
@end
|
@ -8,8 +8,16 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MapKit/MapKit.h>
|
||||
#import <MapKit/MKAnnotation.h>
|
||||
#import "Post.h";
|
||||
|
||||
@interface MapDelegate : UIViewController<MKMapViewDelegate>
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface MKAnnotationViewPlus : MKAnnotationView
|
||||
|
||||
@property(strong,nonatomic) MSPost *Post;
|
||||
|
||||
@end
|
||||
|
62
MPSE/Map.m
62
MPSE/Map.m
@ -7,19 +7,24 @@
|
||||
//
|
||||
|
||||
#import "Map.h"
|
||||
#import "Post.h"
|
||||
#import "Detail.h"
|
||||
|
||||
@implementation MKAnnotationViewPlus
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@interface MapDelegate(){
|
||||
UIImage * UserImagine;
|
||||
UIImage * PointImagine;
|
||||
NSString * UserID;
|
||||
NSString * PostID;
|
||||
}
|
||||
|
||||
|
||||
@property (weak, nonatomic) IBOutlet MKMapView *MapNear;
|
||||
@property (strong, nonatomic) MKPointAnnotation<MKAnnotation> *AnnotationPointTarget;
|
||||
@property (nonatomic) CLLocationCoordinate2D MyLocationNow;
|
||||
@property (strong, nonatomic) MSPost *ThisPost;
|
||||
@property (strong, nonatomic) MKAnnotationViewPlus *SelectedAnnotationView;
|
||||
|
||||
@end
|
||||
|
||||
@ -62,28 +67,27 @@
|
||||
}
|
||||
|
||||
-(void)MapAddAnnotation:(NSNotification *) Notification{
|
||||
NSArray *SharePost = Notification.object;
|
||||
MSPost *SharePost = Notification.object;
|
||||
self.AnnotationPointTarget = [[MKPointAnnotation alloc] init];
|
||||
|
||||
[_AnnotationPointTarget setTitle: [SharePost objectAtIndex:0]];
|
||||
if ([[SharePost objectAtIndex:1] length] >25){
|
||||
[_AnnotationPointTarget setSubtitle:[SharePost objectAtIndex:1]];
|
||||
}
|
||||
else{
|
||||
[_AnnotationPointTarget setSubtitle:[SharePost objectAtIndex:1]];
|
||||
}
|
||||
UserImagine = [SharePost objectAtIndex:2];
|
||||
self.ThisPost = SharePost;
|
||||
|
||||
//Need to be rewrite
|
||||
[_AnnotationPointTarget setTitle: @"ME"];
|
||||
UserImagine = [UIImage imageNamed:@"ME.png"];
|
||||
|
||||
_AnnotationPointTarget.subtitle = self.ThisPost.Text;
|
||||
_AnnotationPointTarget.coordinate = _MyLocationNow;
|
||||
[_MapNear addAnnotation:_AnnotationPointTarget];
|
||||
|
||||
}
|
||||
|
||||
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation{
|
||||
- (MKAnnotationViewPlus *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation{
|
||||
if([annotation isKindOfClass:[MKUserLocation class]]) return nil;
|
||||
if([annotation isKindOfClass:[MKPointAnnotation class]]){
|
||||
MKAnnotationView *DefineView = (MKAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:@"ShareBy"];
|
||||
MKAnnotationViewPlus *DefineView = (MKAnnotationViewPlus *)[mapView dequeueReusableAnnotationViewWithIdentifier:@"ShareBy"];
|
||||
if(!DefineView){
|
||||
DefineView = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"ShareBy"];
|
||||
DefineView = [[MKAnnotationViewPlus alloc] initWithAnnotation:annotation reuseIdentifier:@"ShareBy"];
|
||||
[DefineView setImage:PointImagine];
|
||||
DefineView.canShowCallout = YES;
|
||||
|
||||
@ -97,18 +101,23 @@
|
||||
DetailButton.frame = CGRectMake(0, 0, 50, 50);
|
||||
DetailButton.backgroundColor = [UIColor clearColor];
|
||||
[DetailButton setTitle:@"详情" forState:UIControlStateNormal];
|
||||
|
||||
NSArray *ThisAnnotationDetail = [[NSArray alloc] initWithObjects:annotation,TargetImagineView, nil];
|
||||
|
||||
|
||||
[DetailButton addTarget:self action: @selector(DetailButtonOnClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
//NSArray *ThisAnnotationDetail = [[NSArray alloc] initWithObjects:annotation,TargetImagineView, nil];
|
||||
|
||||
UILabel *DescribtionText = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 120, 80)];
|
||||
DescribtionText.text = self.ThisPost.Text;
|
||||
[DescribtionText setNumberOfLines:5];
|
||||
DescribtionText.font = [UIFont fontWithName:@"System" size:4];
|
||||
|
||||
|
||||
TargetImagineView.contentMode = UIViewContentModeScaleToFill;
|
||||
[LeftView addSubview:TargetImagineView];
|
||||
[DefineView setLeftCalloutAccessoryView:LeftView];
|
||||
[DefineView setRightCalloutAccessoryView:DetailButton];
|
||||
[DefineView setDetailCalloutAccessoryView:DetailButton];
|
||||
[DefineView setDetailCalloutAccessoryView:DescribtionText];
|
||||
DefineView.canShowCallout = YES;
|
||||
DefineView.Post = self.ThisPost;
|
||||
}
|
||||
return DefineView;
|
||||
}
|
||||
@ -116,6 +125,19 @@
|
||||
}
|
||||
|
||||
- (void)DetailButtonOnClick:(UIButton *) button{
|
||||
UIStoryboard *MainStoryBroad = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
|
||||
|
||||
DetailViewDelegate *ThisDetailView = [MainStoryBroad instantiateViewControllerWithIdentifier:@"DetailViewSelected"];
|
||||
|
||||
ThisDetailView.ThisPost = self.SelectedAnnotationView.Post;
|
||||
NSLog(@"%@",self.SelectedAnnotationView.Post);
|
||||
[self presentViewController:ThisDetailView animated:YES completion:^{}];
|
||||
|
||||
}
|
||||
|
||||
-(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationViewPlus *)view
|
||||
{
|
||||
self.SelectedAnnotationView = view;
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,11 +7,15 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MapKit/MapKit.h>
|
||||
|
||||
@interface MSPost : NSObject
|
||||
|
||||
@property(nonatomic) NSString *UserID;
|
||||
@property(nonatomic) NSString *PostID;
|
||||
@property(nonatomic) NSString *Username;
|
||||
@property(nonatomic) NSString *Text;
|
||||
@property(nonatomic) NSString *Time;
|
||||
@property(nonatomic) CLLocationCoordinate2D *Location;
|
||||
|
||||
@end
|
||||
|
11
MPSE/User.h
11
MPSE/User.h
@ -43,4 +43,15 @@
|
||||
@property (nonatomic, weak) NSString *serverCode;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@interface MSAskForImagine : NSObject
|
||||
|
||||
@property(strong,nonatomic)NSString *UserID;
|
||||
@property(strong,nonatomic)MSConnectServer *Server;
|
||||
|
||||
- (void)GetUserImagine;
|
||||
- (void)GetUserImagineSuccess:(UIImage *)imagine;
|
||||
- (void)GetUserImagineFail:(NSString *)error;
|
||||
|
||||
@end
|
||||
|
58
MPSE/User.m
58
MPSE/User.m
@ -7,3 +7,61 @@
|
||||
//
|
||||
|
||||
#import "User.h"
|
||||
#import "Post.h"
|
||||
|
||||
@implementation MSUserMe
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation MSLoginMe
|
||||
|
||||
- (void)doLogin{
|
||||
|
||||
}
|
||||
|
||||
-(void)ifLoginSuccess:(MSUserMe *)userInfo{
|
||||
|
||||
}
|
||||
|
||||
-(void)ifLoginFailed:(NSString *)error{
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MSRegisterMe
|
||||
|
||||
- (void)doRegister{
|
||||
|
||||
}
|
||||
|
||||
-(void)ifRegisterSuccess{
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MSPost
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation MSAskForImagine
|
||||
|
||||
- (void)GetUserImagine{
|
||||
|
||||
}
|
||||
|
||||
- (void)GetUserImagineSuccess:(UIImage *)imagine{
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)GetUserImagineFail:(NSString *)error{
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "ViewController.h"
|
||||
#import "Post.h"
|
||||
|
||||
@interface ViewController ()
|
||||
|
||||
@ -71,13 +72,19 @@
|
||||
NSString *ShareTextNow = _ShareText.text;
|
||||
NSString *Username = @"Me";
|
||||
UIImage *UserImagine = [UIImage imageNamed:@"Me.png"];
|
||||
MSPost *ThisPost = [[MSPost alloc] init];
|
||||
NSString *PostID = [[NSUUID UUID] UUIDString];
|
||||
NSString *Time = @"2017-1-1";
|
||||
|
||||
NSUUID *PostID = [[NSUUID alloc] init];
|
||||
ThisPost.PostID = PostID;
|
||||
ThisPost.Text = ShareTextNow;
|
||||
ThisPost.Username = Username;
|
||||
ThisPost.Time = Time;
|
||||
|
||||
|
||||
NSArray *SharePost = [[NSArray alloc] initWithObjects:Username,ShareTextNow,UserImagine,nil];
|
||||
//NSArray *SharePost = [[NSArray alloc] initWithObjects:Username,ShareTextNow,UserImagine,nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"MapAddTarget" object:SharePost];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"MapAddTarget" object:ThisPost];
|
||||
[[[UIApplication sharedApplication] keyWindow] endEditing:YES];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user