个人信息修改

This commit is contained in:
lianxiang
2018-09-18 20:13:59 +08:00
parent 2c81fa6c7d
commit 27e27d5d12
42 changed files with 981 additions and 54 deletions
@@ -0,0 +1,14 @@
//
// AppVersionDescCell.h
// GIGA
//
// Created by lianxiang on 2018/9/18.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppVersionDescCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *VersionDescLabel;
@end
@@ -0,0 +1,26 @@
//
// AppVersionDescCell.m
// GIGA
//
// Created by lianxiang on 2018/9/18.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "AppVersionDescCell.h"
@implementation AppVersionDescCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
//self.VersionDescLabel.text = @"1.版本有优化\n2.版本有优化\n3.版本有优化\n4.版本有优化\n5.版本有优化\n";
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="AppVersionDescCell" id="KGk-i7-Jjw" customClass="AppVersionDescCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="92"/>
<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">
<rect key="frame" x="0.0" y="0.0" width="375" height="91.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JXV-Zf-Ztb">
<rect key="frame" x="0.0" y="40" width="375" height="1"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="hWH-rb-No5"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1.版本优化" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v31-x8-IlY">
<rect key="frame" x="7" y="56" width="361" height="18.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="v31-x8-IlY" firstAttribute="top" secondItem="JXV-Zf-Ztb" secondAttribute="bottom" constant="15" id="26g-Zf-2QA"/>
<constraint firstAttribute="trailing" secondItem="v31-x8-IlY" secondAttribute="trailing" constant="7" id="Ama-ed-0mY"/>
<constraint firstItem="v31-x8-IlY" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="7" id="Fax-Sh-1aI"/>
<constraint firstAttribute="trailing" secondItem="JXV-Zf-Ztb" secondAttribute="trailing" id="e2a-v1-3mo"/>
<constraint firstItem="JXV-Zf-Ztb" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="40" id="oxm-rv-lzY"/>
<constraint firstItem="JXV-Zf-Ztb" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="uZy-ia-fM8"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" red="0.51372549019607838" green="0.039215686274509803" blue="0.039215686274509803" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="VersionDescLabel" destination="v31-x8-IlY" id="Rfo-xt-BWD"/>
</connections>
<point key="canvasLocation" x="33.5" y="87"/>
</tableViewCell>
</objects>
</document>
@@ -0,0 +1,13 @@
//
// AppVersionLogoCell.h
// GIGA
//
// Created by lianxiang on 2018/9/18.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppVersionLogoCell : UITableViewCell
@end
@@ -0,0 +1,24 @@
//
// AppVersionLogoCell.m
// GIGA
//
// Created by lianxiang on 2018/9/18.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "AppVersionLogoCell.h"
@implementation AppVersionLogoCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="AppVersionLogoCell" id="KGk-i7-Jjw" customClass="AppVersionLogoCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="173"/>
<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">
<rect key="frame" x="0.0" y="0.0" width="320" height="172.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_logo" translatesAutoresizingMaskIntoConstraints="NO" id="xDN-Vh-dG1">
<rect key="frame" x="114" y="31" width="93" height="93"/>
<constraints>
<constraint firstAttribute="width" constant="93" id="don-g0-ZBG"/>
<constraint firstAttribute="height" constant="93" id="iL4-WJ-Lpa"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="不断进步 只为遇见更好的你" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kg8-oY-HjJ">
<rect key="frame" x="73.5" y="141" width="173" height="20"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="Kg8-oY-HjJ" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="0Qg-Sa-TfY"/>
<constraint firstItem="xDN-Vh-dG1" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="Nna-4s-ign"/>
<constraint firstItem="Kg8-oY-HjJ" firstAttribute="top" secondItem="xDN-Vh-dG1" secondAttribute="bottom" constant="17" id="No7-P5-8Wm"/>
<constraint firstItem="xDN-Vh-dG1" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="31" id="hPh-Q6-tZd"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" red="0.51372549020000002" green="0.039215686270000001" blue="0.039215686270000001" alpha="1" colorSpace="calibratedRGB"/>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<point key="canvasLocation" x="34" y="96.5"/>
</tableViewCell>
</objects>
<resources>
<image name="bg_logo" width="88" height="88"/>
</resources>
</document>
@@ -25,6 +25,7 @@
}
-(void)loadUserinfoWith:(GiGaUser *)user{
if (user.headImgUrl && ![user.nickName isKindOfClass:[NSNull class]]) {
+2 -1
View File
@@ -21,7 +21,8 @@
if(indexPath.row == 0){
self.cachLabe.hidden = NO;
int M = arc4random() % 5;
self.cachLabe.text = [NSString stringWithFormat:@"%dM",M];
}
self.descLabel.text = listArr[indexPath.row];
+26 -14
View File
@@ -12,41 +12,50 @@
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="GiGaSettingsViewCell" id="KGk-i7-Jjw" customClass="GiGaSettingsViewCell">
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="GiGaSettingsViewCell" id="KGk-i7-Jjw" customClass="GiGaSettingsViewCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<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">
<rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ndG-YW-sfk">
<rect key="frame" x="26" y="13" width="30" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<rect key="frame" x="26" y="12.5" width="29" height="20"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="14"/>
<color key="textColor" red="0.21568627450980393" green="0.21568627450980393" blue="0.21568627450980393" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6PS-Ws-JMW">
<rect key="frame" x="0.0" y="42.5" width="375" height="1"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<rect key="frame" x="26" y="43.5" width="316" height="0.5"/>
<color key="backgroundColor" red="0.87058823529411766" green="0.87058823529411766" blue="0.87058823529411766" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="F3E-xB-4EF"/>
<constraint firstAttribute="height" constant="0.5" id="Ycg-7c-nRg"/>
</constraints>
</view>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="M" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hqP-o2-Ccz">
<rect key="frame" x="265" y="13" width="13" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<rect key="frame" x="299.5" y="12" width="12.5" height="20"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="14"/>
<color key="textColor" red="0.54117647058823526" green="0.54117647058823526" blue="0.54117647058823526" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_indicator_right" translatesAutoresizingMaskIntoConstraints="NO" id="gzd-rx-I7z">
<rect key="frame" x="343" y="16" width="8.5" height="14"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="QAn-L9-64s"/>
<constraint firstAttribute="width" constant="8.5" id="gga-gq-fBD"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstItem="6PS-Ws-JMW" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="DC4-fn-ot1"/>
<constraint firstAttribute="trailing" secondItem="6PS-Ws-JMW" secondAttribute="trailing" constant="33" id="B2K-iE-76r"/>
<constraint firstItem="ndG-YW-sfk" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="DY1-kd-hRN"/>
<constraint firstAttribute="trailing" secondItem="hqP-o2-Ccz" secondAttribute="trailing" constant="63" id="I7g-q2-S0f"/>
<constraint firstItem="hqP-o2-Ccz" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="Qn4-b5-aLv"/>
<constraint firstAttribute="bottom" secondItem="6PS-Ws-JMW" secondAttribute="bottom" id="moN-rN-YYH"/>
<constraint firstItem="6PS-Ws-JMW" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="26" id="S4S-lR-UOV"/>
<constraint firstAttribute="trailing" secondItem="gzd-rx-I7z" secondAttribute="trailing" constant="23.5" id="izn-sF-YEu"/>
<constraint firstAttribute="bottom" secondItem="6PS-Ws-JMW" secondAttribute="bottom" constant="-0.5" id="sdB-pn-hae"/>
<constraint firstItem="ndG-YW-sfk" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="26" id="vW3-CP-kmW"/>
<constraint firstAttribute="trailing" secondItem="6PS-Ws-JMW" secondAttribute="trailing" constant="-34" id="ylJ-U0-g2N"/>
<constraint firstItem="gzd-rx-I7z" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" constant="1.25" id="xjH-gv-hfO"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
@@ -57,4 +66,7 @@
<point key="canvasLocation" x="-5.5" y="43"/>
</tableViewCell>
</objects>
<resources>
<image name="user_indicator_right" width="9" height="14"/>
</resources>
</document>
@@ -42,6 +42,7 @@
}else{
self.detalTitle.text = [NSString stringWithFormat:@"%@%@%@",user.provinceName,user.cityName,user.areaName];
}
}else if (indexPath.section == 2 && indexPath.row == 3){
self.cityLabel.text = @"职业";
if (user.occupationCode && ![user.occupationCode isKindOfClass:[NSNull class]] && ![user.occupationCode isEqualToString:@""]) {
@@ -21,13 +21,6 @@
self.IdLabel.text = user.userId;
self.userTitle.text = @"用户ID";
}else if (indexPath.section == 1 && indexPath.row == 1){
self.userTitle.text = @"昵称";
if (user.nickName && ![user.nickName isKindOfClass:[NSNull class]]) {
self.IdLabel.text = user.nickName;
}else{
self.IdLabel.text = @"昵称";
}
}
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
@@ -11,4 +11,5 @@
@interface GIGaUserInfoAvatorCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *userAvator;
-(void)loadCellData:(NSIndexPath*)indexPath user:(GiGaUser*)user;
@end
@@ -19,7 +19,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="132.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_circle_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="L0Q-5Y-jXq">
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_circle_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="L0Q-5Y-jXq">
<rect key="frame" x="146" y="15" width="82" height="82"/>
<constraints>
<constraint firstAttribute="width" constant="82" id="IAJ-jV-dpt"/>
@@ -9,6 +9,8 @@
#import <UIKit/UIKit.h>
@interface GIGaUserWeChatViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *descTitle;
@property (weak, nonatomic) IBOutlet UITextField *weiXinCount;
-(void)loadCellData:(NSIndexPath*)indexPath user:(GiGaUser*)user;
@end
@@ -17,11 +17,23 @@
}
-(void)loadCellData:(NSIndexPath*)indexPath user:(GiGaUser*)user{
if (user.weixin && ![user.weixin isKindOfClass:[NSNull class]]) {
self.weiXinCount.text = user.weixin;
}
if (indexPath.section == 1 && indexPath.row == 1) {
//昵称
self.descTitle.text = @"昵称";
self.weiXinCount.placeholder = @"请输入用户昵称";
if (user.nickName && ![user.nickName isKindOfClass:[NSNull class]] && ![user.nickName isEqualToString:@""]) {
self.weiXinCount.text= user.nickName;
}
}else if (indexPath.section == 1 && indexPath.row == 2){
//微信
if (user.weixin && ![user.weixin isKindOfClass:[NSNull class]] && ![user.weixin isEqualToString:@""]) {
self.weiXinCount.text = user.weixin;
}
}
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
@@ -20,12 +20,15 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="微信号" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="96G-Rk-4QP">
<rect key="frame" x="29" y="11" width="42" height="20"/>
<rect key="frame" x="29" y="4" width="42" height="34"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="7uO-em-FCR"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="14"/>
<color key="textColor" red="0.21568627450980393" green="0.21568627450980393" blue="0.21568627450980393" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入微信号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ZiU-cX-tf9">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入微信号" textAlignment="natural" minimumFontSize="13" translatesAutoresizingMaskIntoConstraints="NO" id="ZiU-cX-tf9">
<rect key="frame" x="120" y="4" width="241" height="34"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="EQ6-lD-lta"/>
@@ -45,6 +48,7 @@
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="descTitle" destination="96G-Rk-4QP" id="Jny-7N-qig"/>
<outlet property="weiXinCount" destination="ZiU-cX-tf9" id="pgd-yd-pSv"/>
</connections>
<point key="canvasLocation" x="-87.5" y="67"/>